Files
yarn/gulpfile.js
Sebastian McKenzie 86c98a62a7 Add missing commands (#439)
* add init command - closes #360

* list available commands and examples in cli help - fixes #345

* add outdated command - fixes #379

* rename uninstall command to remove

* add global command - fixes #227

* remove command aliases

* fix licenses not being shown due to integrity check shortcircuiting - fixes #424

* turn aliases back into js

* clean up single instance arguments - fixes #308

* ignore arguments that are included after -- - fixes #251

* add unlink command

* add lint rule against non-language keys

* clean up Config initialisation

* add link command - closes #336

* support array of string engines - fixes #447

* add missing request cache fixtures

* polish link command

* remove gulp file output

* add config command - fixes #378

* add yarn.lock and fix constants

* update aliases

* add missing i18n for CLI

* make `upgrade` command work how you'd expect

* update test metamethod

* require arguments for add command

* move dependency objects into constnats

* add init command - closes #360

* list available commands and examples in cli help - fixes #345

* add outdated command - fixes #379

* rename uninstall command to remove

* add global command - fixes #227

* remove command aliases

* fix licenses not being shown due to integrity check shortcircuiting - fixes #424

* turn aliases back into js

* clean up single instance arguments - fixes #308

* ignore arguments that are included after -- - fixes #251

* add unlink command

* add lint rule against non-language keys

* clean up Config initialisation

* add link command - closes #336

* support array of string engines - fixes #447

* polish link command

* remove gulp file output

* add config command - fixes #378

* add yarn.lock and fix constants

* fix lint, copy test fixtures to temp directory rather than mutating cwd

* fix lint

* add handler for extractor errors

* remove unused jest snapshot

* fix check-lockfile script

* fix lint

* fix check-lockfile

* try and fix test

* properly copy over lockfile scripts folder, ignore ds_store files in test directories

* remove problematic fixtures

* add back problematic fixtures

* disable test
2016-10-05 12:50:44 +01:00

45 lines
1.0 KiB
JavaScript

'use strict';
const plumber = require('gulp-plumber');
const stream = require('stream');
const chalk = require('chalk');
const newer = require('gulp-newer');
const babel = require('gulp-babel');
const watch = require('gulp-watch');
const gutil = require('gulp-util');
const gulp = require('gulp');
const path = require('path');
const fs = require('fs');
const babelRc = JSON.parse(fs.readFileSync(path.join(__dirname, '.babelrc'), 'utf8'));
function build(lib, opts) {
return gulp.src('src/**/*')
.pipe(plumber({
errorHandler(err) {
gutil.log(err.stack);
},
}))
.pipe(newer(lib))
.pipe(babel(opts))
.pipe(gulp.dest(lib));
}
gulp.task('default', ['build']);
gulp.task('build', ['build-modern', 'build-legacy']);
gulp.task('build-modern', () => {
return build('lib', babelRc.env.node5);
});
gulp.task('build-legacy', () => {
return build('lib-legacy', babelRc.env['pre-node5']);
});
gulp.task('watch', ['build'], () => {
watch('src/**/*', () => {
gulp.start('build');
});
});