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


TypeScript gulp-less類代碼示例

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


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

示例1:

gulp.task("less", () => {
    gulp.src("less/**/*.less")
        .pipe(less({
            paths: ["less/includes"]
        }))
        .pipe(gulp.dest("public/css"));
});
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:7,代碼來源:gulp-less-tests.ts

示例2: function

gulp.task('less', function() {
  return gulp.src('./app/style/**/*.less')
    .pipe(less({
      paths: [__dirname + '/app/style']
    }))
    .pipe(gulp.dest('./app/style'));
});
開發者ID:hack-rpi,項目名稱:Email-Board,代碼行數:7,代碼來源:gulpfile.ts

示例3: processCSS

export default function processCSS() {
  gulp.src(project.cssProcessor.source)
    .pipe(changedInPlace({firstPass:true}))
    .pipe(sourcemaps.init())
    .pipe(less())
    .pipe(build.bundle());
};
開發者ID:agileraymond,項目名稱:cli,代碼行數:7,代碼來源:process-less.ts

示例4: buildStyles

export default function buildStyles() {
  gulp.src(project.paths.styles)
    .pipe(changed(project.paths.output, {extension: '.css'}))
    .pipe(sourcemaps.init())
    .pipe(less())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(project.paths.output));
};
開發者ID:itainteasy,項目名稱:cli,代碼行數:8,代碼來源:build-styles-less.ts

示例5: processCSS

export default function processCSS() {
  return gulp.src(project.cssProcessor.source)
    .pipe(changedInPlace({ firstPass: true }))
    .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
    .pipe(sourcemaps.init())
    .pipe(less())
    .pipe(build.bundle());
}
開發者ID:jugglingthebits,項目名稱:C3,代碼行數:8,代碼來源:process-css.ts

示例6:

gulp.task("styles:build", () => {
  return gulp.src(paths.less.sources)
    .pipe(sourcemaps.init({
      loadMaps: true,
    }))
    .pipe(less())
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest(paths.build_dir.css))
})
開發者ID:FourtekIT-incubator,項目名稱:bokeh,代碼行數:9,代碼來源:styles.ts

示例7: 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

示例8: filter

gulp.task('default', () => {
    const jsFilter = filter('**/*.js', {restore: true});
    const lessFilter = filter('**/*.less', {restore: true});

    return gulp.src('assets/**')
        .pipe(jsFilter)
        .pipe(concat('bundle.js'))
        .pipe(jsFilter.restore)
        .pipe(lessFilter)
        .pipe(less())
        .pipe(lessFilter.restore)
        .pipe(gulp.dest('out/'));
});
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:13,代碼來源:gulp-filter-tests.ts

示例9: function

gulp.task("less", function() {
	return gulp.src(["./public/less/style.less"])
	.pipe(less())
	.pipe(cleanCSS())
	.pipe(gulp.dest("./public/"));
});
開發者ID:glenndierckx,項目名稱:node-express-typescript,代碼行數:6,代碼來源:gulpfile.ts


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