Merge pull request #9329 from timvandermeij/gulp-util
Stop using the deprecated `gulp-util` module
This commit is contained in:
commit
3f88bfcda6
25
gulpfile.js
25
gulpfile.js
@ -18,9 +18,9 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var fancylog = require('fancy-log');
|
||||
var fs = require('fs');
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var rename = require('gulp-rename');
|
||||
var replace = require('gulp-replace');
|
||||
var transform = require('gulp-transform');
|
||||
@ -36,7 +36,8 @@ var merge = require('merge-stream');
|
||||
var zip = require('gulp-zip');
|
||||
var webpack2 = require('webpack');
|
||||
var webpackStream = require('webpack-stream');
|
||||
var vinyl = require('vinyl-fs');
|
||||
var Vinyl = require('vinyl');
|
||||
var vfs = require('vinyl-fs');
|
||||
|
||||
var BUILD_DIR = 'build/';
|
||||
var L10N_DIR = 'l10n/';
|
||||
@ -108,9 +109,7 @@ function safeSpawnSync(command, parameters, options) {
|
||||
function createStringSource(filename, content) {
|
||||
var source = stream.Readable({ objectMode: true, });
|
||||
source._read = function () {
|
||||
this.push(new gutil.File({
|
||||
cwd: '',
|
||||
base: '',
|
||||
this.push(new Vinyl({
|
||||
path: filename,
|
||||
contents: new Buffer(content),
|
||||
}));
|
||||
@ -1217,10 +1216,10 @@ gulp.task('gh-pages-prepare', ['web-pre'], function () {
|
||||
|
||||
rimraf.sync(GH_PAGES_DIR);
|
||||
|
||||
// 'vinyl' because web/viewer.html needs its BOM.
|
||||
// 'vfs' because web/viewer.html needs its BOM.
|
||||
return merge([
|
||||
vinyl.src(GENERIC_DIR + '**/*', { base: GENERIC_DIR, stripBOM: false, })
|
||||
.pipe(gulp.dest(GH_PAGES_DIR)),
|
||||
vfs.src(GENERIC_DIR + '**/*', { base: GENERIC_DIR, stripBOM: false, })
|
||||
.pipe(gulp.dest(GH_PAGES_DIR)),
|
||||
gulp.src([FIREFOX_BUILD_DIR + '*.xpi',
|
||||
FIREFOX_BUILD_DIR + '*.rdf'])
|
||||
.pipe(gulp.dest(GH_PAGES_DIR + EXTENSION_SRC_DIR + 'firefox/')),
|
||||
@ -1340,9 +1339,9 @@ gulp.task('dist-pre',
|
||||
.pipe(gulp.dest('build/dist/')),
|
||||
packageJsonSrc.pipe(gulp.dest(DIST_DIR)),
|
||||
bowerJsonSrc.pipe(gulp.dest(DIST_DIR)),
|
||||
vinyl.src('external/dist/**/*',
|
||||
{ base: 'external/dist', stripBOM: false, })
|
||||
.pipe(gulp.dest(DIST_DIR)),
|
||||
vfs.src('external/dist/**/*',
|
||||
{ base: 'external/dist', stripBOM: false, })
|
||||
.pipe(gulp.dest(DIST_DIR)),
|
||||
gulp.src(GENERIC_DIR + 'LICENSE')
|
||||
.pipe(gulp.dest(DIST_DIR)),
|
||||
gulp.src(GENERIC_DIR + 'web/cmaps/**/*',
|
||||
@ -1461,10 +1460,10 @@ gulp.task('mozcentraldiff', ['mozcentral', 'mozcentralbaseline'],
|
||||
});
|
||||
|
||||
gulp.task('externaltest', function () {
|
||||
gutil.log('Running test-fixtures.js');
|
||||
fancylog('Running test-fixtures.js');
|
||||
safeSpawnSync('node', ['external/builder/test-fixtures.js'],
|
||||
{ stdio: 'inherit', });
|
||||
gutil.log('Running test-fixtures_esprima.js');
|
||||
fancylog('Running test-fixtures_esprima.js');
|
||||
safeSpawnSync('node', ['external/builder/test-fixtures_esprima.js'],
|
||||
{ stdio: 'inherit', });
|
||||
});
|
||||
|
@ -12,12 +12,12 @@
|
||||
"eslint": "^4.10.0",
|
||||
"eslint-plugin-mozilla": "^0.4.9",
|
||||
"eslint-plugin-no-unsanitized": "^2.0.1",
|
||||
"fancy-log": "^1.3.2",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^0.6.1",
|
||||
"gulp-transform": "^3.0.5",
|
||||
"gulp-util": "^3.0.8",
|
||||
"gulp-zip": "^4.0.0",
|
||||
"gulp-zip": "^4.1.0",
|
||||
"jasmine": "^2.8.0",
|
||||
"jasmine-core": "^2.8.0",
|
||||
"jsdoc": "^3.5.5",
|
||||
@ -31,6 +31,7 @@
|
||||
"ttest": "^1.1.0",
|
||||
"typogr": "^0.6.7",
|
||||
"uglify-es": "^3.1.2",
|
||||
"vinyl": "^2.1.0",
|
||||
"vinyl-fs": "^2.4.4",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-stream": "^4.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user