本文整理匯總了TypeScript中gulp-changed類的典型用法代碼示例。如果您正苦於以下問題:TypeScript gulp-changed類的具體用法?TypeScript gulp-changed怎麽用?TypeScript gulp-changed使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了gulp-changed類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: buildStyles
export default function buildStyles() {
return gulp.src(project.paths.styles)
.pipe(changed(project.paths.output, {extension: '.css'}))
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(gulp.dest(project.paths.output));
};
示例2:
gulp.task('compile-pug', () => {
gulp
.src(TEMPLATES_SRC)
.pipe(changed(APP_DEST))
.pipe(pug())
.pipe(gulp.dest(APP_DEST))
.pipe(browserSync.stream());
});
示例3: 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));
};
示例4: buildStyles
export default function buildStyles() {
let processors = [
autoprefixer({browsers: ['last 1 version']})
];
return gulp.src(project.paths.styles)
.pipe(changed(project.paths.output, {extension: '.css'}))
.pipe(sourcemaps.init())
.pipe(postcss(processors))
.pipe(sourcemaps.write())
.pipe(gulp.dest(project.paths.output));
};
示例5: buildJavaScript
function buildJavaScript() {
if (!typescriptCompiler) {
typescriptCompiler = typescript.create(require('../../tsconfig.json').compilerOptions);
}
return gulp.src(project.paths.dtsSource.concat(project.paths.source))
.pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
.pipe(changed(project.paths.output, {extension: '.js'}))
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(typescriptCompiler())
.pipe(sourcemaps.write({includeContent: false, sourceRoot: '/src'}))
.pipe(gulp.dest(project.paths.output));
}
示例6: buildMarkup
export default function buildMarkup() {
return gulp.src(project.paths.markup)
.pipe(changed(project.paths.output, {extension: '.html'}))
.pipe(gulp.dest(project.paths.output));
}
示例7: buildStyles
export default function buildStyles() {
return gulp.src(project.paths.styles)
.pipe(changed(project.paths.output, {extension: '.css'}))
.pipe(gulp.dest(project.paths.output));
};