gulp.task('buildImages', (done) => { runSequence('minifyImages', 'encodeImages', () => { done(); }); });
// CSS linting task gulp.task('csslint', function (done) { return gulp.src(defaultAssets.client.css) .pipe(plugins.csslint('.csslintrc')) .pipe(plugins.csslint.reporter()) .pipe(plugins.csslint.reporter(function (file) { if (!file.csslint.errorCount) { done(); } })); });
gulp.task('git-check', function(done) { if (!sh.which('git')) { console.log( ' ' + gutil.colors.red('Git is not installed.'), '\n Git, the version control system, is required to download Ionic.', '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' ); process.exit(1); } done(); });
gulp.task('tsc:compile', function(done) { return tsProject .src() .pipe(sourcemaps.init()) .pipe(tsProject()) .pipe(sourcemaps.write('../dist')) .pipe(gulp.dest('dist')) .on('end', function() { console.log('tsc compiled!'); done(); }); });
gulp.task('dist', function(done) { roll('amd', 'bundle.es6'); roll('cjs', 'bundle.es6'); roll('umd', 'bundle.es6'); roll('iife', 'bundle.es6'); roll('es', 'bundle.es6'); roll('cjs', 'globals.es6', 'globals'); done(); });
gulp.task('build-client-html', (done) => { glob('./app/*.html', (err, files) => { if (err) done(err) let tasks = files.map((entry) => { return gulp.src(entry) .pipe(gulp.dest('./build')) }) es.merge(tasks).on('end', done) }) })
gulp.task('build:osx', (done) => { options.arch = 'x64'; options.platform = 'darwin'; options['app-bundle-id'] = 'com.amitmerchant.markdownify'; options['helper-bundle-id'] = 'com.amitmerchant.markdownify.helper'; packager(options, (err, paths) => { if (err) { console.error(err); } done(); }); });
gulp.task('build-server', (done) => { glob('./src/*.js', (err, files) => { if (err) done(err) let tasks = files.map((entry) => { return gulp.src(entry) .pipe(babel({ presets: ['es2015'] })) .pipe(gulp.dest('./build')) }) es.merge(tasks).on('end', done) }) })
/** * Git Push Task */ gulp.task('gitPush', done => { shell.exec(`git push origin $(git name-rev --name-only HEAD)`, err => { if (err) { done(err) } else { shell.exec(`git push origin v${packageTag}`, done) } }) })
gulp.task('lint-server', (done) => { glob('./src/**/*.js', (err, files) => { if (err) done(err) let tasks = files.map((entry) => { return gulp.src(entry) .pipe(eslint()) .pipe(eslint.format()) }) es.merge(tasks).on('end', done) }) })
gulp.task('theme:init', done => { if (CAN_DEPLOY) theme.init(shopifyConfig) done() })
gulp.task('git-check', function(done) { if (!sh.which('git')) { console.log( ' ' + gutil.colors.red('Git is not installed.'), '\n Git, the version control system, is required to download Ionic.', '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' ); process.exit(1); } done(); });