當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript gulp-autoprefixer類代碼示例

本文整理匯總了TypeScript中gulp-autoprefixer的典型用法代碼示例。如果您正苦於以下問題:TypeScript gulp-autoprefixer類的具體用法?TypeScript gulp-autoprefixer怎麽用?TypeScript gulp-autoprefixer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了gulp-autoprefixer類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

import * as gulp from "gulp";
import * as autoprefixer from "gulp-autoprefixer";

gulp.src("test.css")
    .pipe(autoprefixer())
    .pipe(gulp.dest("build"));

gulp.src("test.css")
    .pipe(autoprefixer({ browsers: ["Chrome"]}))
    .pipe(gulp.dest("build"));

gulp.src("test.css")
    .pipe(autoprefixer({cascade: false}))
    .pipe(gulp.dest("build"));

gulp.src("test.css")
    .pipe(autoprefixer({remove: false}))
    .pipe(gulp.dest("build"));
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:18,代碼來源:gulp-autoprefixer-tests.ts

示例2:

gulp.task("build.css", ["build.css.dev"], (done: any) => {
    return gulp.src(["src/themes/*.scss"])
        .pipe(sourcemaps.init())
        .pipe(sass({
            includePaths: ["src/**/*.scss"],
        }))        
        .pipe(autoprefixer({
			browsers: ["last 2 versions"],
			cascade: false
		}))  
        .pipe(cleanCSS())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest("./dist")); 
});
開發者ID:QuinntyneBrown,項目名稱:zero-blocks,代碼行數:14,代碼來源:gulpfile.ts

示例3:

gulp.task("build.css.dev", () => {
    gulp.src(["src/themes/*.scss"])
        .pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(sass({
            includePaths: ["src/**/*.scss"],
        }))
        .pipe(autoprefixer({
            browsers: ["last 2 versions"],
            cascade: false
        }))
        .pipe(sourcemaps.write("./"))
        .pipe(plumber.stop())
        .pipe(gulp.dest("./dist/dev"))
});
開發者ID:damyanpetev,項目名稱:zero-blocks,代碼行數:15,代碼來源:gulpfile.ts

示例4:

gulp.task('build.sass', done => {
  const app_cdn = argv.deployUrl ? argv.deployUrl: '';
  gulp.src(join('./src', '**', '*.scss'))
    .pipe(cssGlobbing({  extensions: ['.scss'] }))
    .pipe(sass({
      includePaths:[join('./src', 'stylesheets')],
      style: 'compressed'
    }).on('error', sass.logError))
    .pipe(autoprefixer(AUTOPREFIXER_BROWSERS))
    .pipe(template({
      'APP_CDN': app_cdn,
    }))
    .pipe(gulp.dest('./.styles'))
    .on('end', () => {
      gulp.src('./.styles/stylesheets/main.css')
        .pipe(gulp.dest('./src'))
        .on('end', done);
    });
});
開發者ID:iamthelogik83,項目名稱:front,代碼行數:19,代碼來源:gulpfile.ts

示例5: default

export default (target: string) => {
  const paths = {
    less: [
      './src/less/*.less',
      './src/components/**/*.less',
      `./src/${target}/**/*.less`
    ],
    tbui: [
      './src/less/tb-fonts-variables.less',
      './tools/libs/less/teambition-ui-variables.less',
      './tools/libs/less/teambition-ui-icons.less'
    ]
  }

  const stream = merge2(
    gulp.src(paths.tbui)
      .pipe(concat('tbui.less'))
      .pipe(logError(less())),
    gulp.src(paths.less)
      .pipe(sourcemaps.init({
        loadMaps: true
      }))
      .pipe(logError(less()))
      .pipe(sourcemaps.write())
  )
  .pipe(sourcemaps.init({
    loadMaps: true
  }))
  .pipe(concat('app.css'))
  .pipe(autoprefixer({
    browsers: ['last 2 versions']
  }))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest(`www/css/`))

  return new Promise((resolve, reject) => {
    stream.on('end', () => {
      gutil.log(gutil.colors.yellow('complete less'))
      resolve()
    })
  })
}
開發者ID:jianxc,項目名稱:teambition-mobile-web,代碼行數:42,代碼來源:less.ts


注:本文中的gulp-autoprefixer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。