Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/fbjs-scripts/gulp/check-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

'use strict';

var gutil = require('gulp-util');
var path = require('path');
var semver = require('semver');
var spawn = require('cross-spawn');
var through = require('through2');

var colors = gutil.colors;
var PluginError = require('plugin-error');
var colors = require('ansi-colors');
var fancyLog = require('fancy-log');

var PLUGIN_NAME = 'check-dependencies';

Expand All @@ -39,7 +39,7 @@ module.exports = function(opts) {
try {
var outdatedData = JSON.parse(data);
} catch (e) {
cb(new gutil.PluginError(PLUGIN_NAME, 'npm broke'));
cb(new PluginError(PLUGIN_NAME, 'npm broke'));
}

var failures = [];
Expand All @@ -49,7 +49,7 @@ module.exports = function(opts) {
var requested = pkgData[type][name];

if (!requested) {
gutil.log('Found extraneous outdated dependency. Consider running `npm prune`');
fancyLog('Found extraneous outdated dependency. Consider running `npm prune`');
return;
}

Expand All @@ -61,7 +61,7 @@ module.exports = function(opts) {

if (failures.length) {
failures.forEach((failure) => {
gutil.log(
fancyLog(
`${colors.bold(failure.name)} is outdated ` +
`(${colors.red(failure.current)} does not satisfy ` +
`${colors.yellow(failure.requested)})`
Expand All @@ -70,7 +70,7 @@ module.exports = function(opts) {
var msg =
'Some of your dependencies are outdated. Please run ' +
`${colors.bold('npm update')} to ensure you are up to date.`;
cb(new gutil.PluginError(PLUGIN_NAME, msg));
cb(new PluginError(PLUGIN_NAME, msg));
return;
}

Expand Down
8 changes: 4 additions & 4 deletions packages/fbjs-scripts/gulp/module-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

var gutil = require('gulp-util');
var PluginError = require('plugin-error');
var through = require('through2');
var fs = require('fs');
var path = require('path');
Expand All @@ -19,7 +19,7 @@ var PLUGIN_NAME = 'module-map';
module.exports = function(opts) {
// Assume file is a string for now
if (!opts || !('moduleMapFile' in opts && 'prefix' in opts)) {
throw new gutil.PluginError(
throw new PluginError(
PLUGIN_NAME,
'Missing options. Ensure you pass an object with `moduleMapFile` and `prefix`'
);
Expand All @@ -35,7 +35,7 @@ module.exports = function(opts) {
}

if (file.isStream()) {
cb(new gutil.PluginError('module-map', 'Streaming not supported'));
cb(new PluginError('module-map', 'Streaming not supported'));
return;
}

Expand All @@ -46,7 +46,7 @@ module.exports = function(opts) {
if (moduleMap.hasOwnProperty(name)) {
this.emit(
'error',
new gutil.PluginError(
new PluginError(
PLUGIN_NAME,
'Duplicate module found: ' + name + ' at ' + file.path + ' and ' +
moduleMap[name]
Expand Down
4 changes: 2 additions & 2 deletions packages/fbjs-scripts/gulp/strip-provides-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

var gutil = require('gulp-util');
var PluginError = require('plugin-error');
var through = require('through2');
var PM_REGEXP = require('./shared/provides-module').regexp;

Expand All @@ -19,7 +19,7 @@ module.exports = function(opts) {
}

if (file.isStream()) {
cb(new gutil.PluginError('module-map', 'Streaming not supported'));
cb(new PluginError('module-map', 'Streaming not supported'));
return;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/fbjs-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"repository": "facebook/fbjs",
"license": "MIT",
"dependencies": {
"ansi-colors": "^1.0.1",
"babel-core": "^6.7.2",
"babel-preset-fbjs": "^2.1.2",
"core-js": "^2.4.1",
"cross-spawn": "^5.1.0",
"gulp-util": "^3.0.4",
"fancy-log": "^1.3.2",
"object-assign": "^4.0.1",
"plugin-error": "^0.1.2",
"semver": "^5.1.0",
"through2": "^2.0.0"
}
Expand Down