gulp

NodeJS [DEP0097] DeprecationWarning:

吃可爱长大的小学妹 提交于 2020-08-22 11:55:53
问题 Can you help me with this error? (node:6692) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context v ariant of MakeCallback or the AsyncResource class instead. Unhandled rejection Error in plugin "webpack-stream" the codeis import gulp from 'gulp'; import yargs from 'yargs'; import sass from 'gulp-sass'; import cleanCSS from 'gulp-clean-css'; import gulpif from 'gulp-if'; import sourcemaps from 'gulp-sourcemaps'; import imagemin from 'gulp

gulp.dest not creating destination folder

只愿长相守 提交于 2020-08-22 10:39:26
问题 My gulp code looks like this, in part gulp.src(['../application-base/**/**.js', '!../application-base/assets/**/**.js'], { base: './' }) .pipe(gulpPlumber({ errorHandler: function (error) { console.log(`\nError ${error}`); this.emit('end'); } })) .pipe(gprint(filePath => "Transpiling: " + filePath.replace('..\\application-base\\', ''))) .pipe(babel({ compact: false })) .pipe(gulp.dest('../application-base-transpiled/')) .on('end', () => done()); If I change .pipe(gulp.dest('../application

gulp.dest not creating destination folder

送分小仙女□ 提交于 2020-08-22 10:38:26
问题 My gulp code looks like this, in part gulp.src(['../application-base/**/**.js', '!../application-base/assets/**/**.js'], { base: './' }) .pipe(gulpPlumber({ errorHandler: function (error) { console.log(`\nError ${error}`); this.emit('end'); } })) .pipe(gprint(filePath => "Transpiling: " + filePath.replace('..\\application-base\\', ''))) .pipe(babel({ compact: false })) .pipe(gulp.dest('../application-base-transpiled/')) .on('end', () => done()); If I change .pipe(gulp.dest('../application

ELIFECYCLE npm error

非 Y 不嫁゛ 提交于 2020-07-22 05:03:04
问题 This is the error in my console npm ERR! code ELIFECYCLE npm ERR! errno 3221225477 npm ERR! sedona@0.1.0 start: `npm run build && gulp serve` npm ERR! Exit status 3221225477 npm ERR! npm ERR! Failed at the sedona@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2017-07-21T19_40_30_516Z -debug.log This is the "debug

Gulpfile.js failed to load

一个人想着一个人 提交于 2020-07-20 08:37:26
问题 Visual Studio task runner cannot load the gulp file. I use VS2017 v15.9.4 now, however, the project developed some years ago. Failed to run "...\Gulpfile.js"... cmd.exe /c gulp --tasks-simple assert.js:350 throw err; ^ AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (...\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (...\node_modules\undertaker\lib\task.js:13:8) at Object.<anonymous> (...\gulpfile.js:34:6) at Module._compile (internal

How to add current source filename to gulp-header

假如想象 提交于 2020-07-09 06:15:45
问题 I minify and concatinate vendor files. It would be nice to separate the scripts in vendor.min.js with some info (like the original filename). I am using gulp-header to add a headers to my output file. // Minify vendor JS gulp.task('minify-vendor-js', function() { return gulp.src([ 'lib/**/*.js' ]) .pipe(uglify()) .on('error', function (err) { gutil.log(gutil.colors.red('[Error]'), err.toString()); }) .pipe(header("// Vendor Package (compressed) - all rights reserved to the respective owners\r

How to add current source filename to gulp-header

雨燕双飞 提交于 2020-07-09 06:15:43
问题 I minify and concatinate vendor files. It would be nice to separate the scripts in vendor.min.js with some info (like the original filename). I am using gulp-header to add a headers to my output file. // Minify vendor JS gulp.task('minify-vendor-js', function() { return gulp.src([ 'lib/**/*.js' ]) .pipe(uglify()) .on('error', function (err) { gutil.log(gutil.colors.red('[Error]'), err.toString()); }) .pipe(header("// Vendor Package (compressed) - all rights reserved to the respective owners\r

How can I run a shell command inside of a gulp task and detect when it's done?

假装没事ソ 提交于 2020-07-08 11:48:45
问题 I'm trying to run a shell command inside of a gulp task using child_process.spawn . I have to detect when the task is done running so I'm using stdout to check for a specific string that I emit at the end of the command, but for some reason it doesn't look like my string is being emitted: // gulp 3.9.1 var gulp = require('gulp'); var spawn = require('child_process').spawn; gulp.task('my-task', function(cb) { var command = ''; // construct my shell command here var end = 'end_of_command'; var

How can I run a shell command inside of a gulp task and detect when it's done?

 ̄綄美尐妖づ 提交于 2020-07-08 11:48:07
问题 I'm trying to run a shell command inside of a gulp task using child_process.spawn . I have to detect when the task is done running so I'm using stdout to check for a specific string that I emit at the end of the command, but for some reason it doesn't look like my string is being emitted: // gulp 3.9.1 var gulp = require('gulp'); var spawn = require('child_process').spawn; gulp.task('my-task', function(cb) { var command = ''; // construct my shell command here var end = 'end_of_command'; var

Using Gulp, is it possible to add environment variables as a comment into CSS? (for example the package.json version)

喜夏-厌秋 提交于 2020-06-28 04:45:23
问题 Is it possible to pipe through specific environment variables in an SCSS file using a gulp setup? Could you, for example, use something like: /*! %version% */ Where version would be the version number as used in package.json. 回答1: From gulp-header example: // using data from package.json var pkg = require('./package.json'); //var banner = ['/**', // ' * <%= pkg.name %> - <%= pkg.description %>', // ' * @version v<%= pkg.version %>', // ' * @link <%= pkg.homepage %>', // ' * @license <%= pkg