gulp

Gulp error: The following tasks did not complete: Did you forget to signal async completion?

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following gulpfile.js, which I'm executing via the command line "gulp message": var gulp = require('gulp'); gulp.task('message', function() { console.log("HTTP Server Started"); }); I'm getting the following error message: [14:14:41] Using gulpfile ~\Documents\node\first\gulpfile.js [14:14:41] Starting 'message'... HTTP Server Started [14:14:41] The following tasks did not complete: message [14:14:41] Did you forget to signal async completion? I'm using gulp 4 on a Windows 10 system. Here is the output from gulp --version: [14:15

Template was precompiled with an older version of Handlebars than the current runtime

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this error, but the different between this question and my question is that I'm using gulp instead grunt. First, my handlebar runtime is handlebars v4.0.5 (js file). The output of handlebar -v is 4.0.5 This is my gulpfile.js : var gulp = require('gulp'); var uglify = require('gulp-uglify'); var handlebars = require('gulp-handlebars'); var wrap = require('gulp-wrap'); var declare = require('gulp-declare'); var concat = require('gulp-concat'); gulp.task('default', ['templates','scripts'], function () { }); gulp.task('templates',

gulp and karma, file karma.conf.js does not exist

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a basic AngularJS app and want to have all my terminal command run with gulp tasks eg $ gulp dev for the development server and $ gulp unitTest for testing etc. I have installed Gulp as per the Docs using $ npm install --save-dev gulp with my gulpfile.js in the root of the project file. I have also done the same for karma's install and config file. It is worth stating now that I want all the npm installs tagged with --save for easily move the project around the office and servers. When it comes to adding the task to Gulp I have to us

Can Gulp overwrite all src files?

自作多情 提交于 2019-12-03 03:05:55
问题 Let's say I want to replace the version number in a bunch of files, many of which live in subdirectories. I will pipe the files through gulp-replace to run the regex-replace function; but I will ultimately want to overwrite all the original files . The task might look something like this: gulp.src([ './bower.json', './package.json', './docs/content/data.yml', /* ...and so on... */ ]) .pipe(replace(/* ...replacement... */)) .pipe(gulp.dest(/* I DONT KNOW */); So how can I end it so that each

GulpUglifyError:Unable to minify JavaScript

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to minify my script files for which i am using gulp task runner And I am trying gulp-uglify plugin Code: gulp.task('concat', function() { return gulp.src('app/**/*.js') // .pipe(concat('script.js')) .pipe(uglify()) .pipe(gulp.dest('./dist/')) }); but i am getting error as when i try to run gulp task as gulp concat Any help would be appreciated 回答1: To see the error in console: var gutil = require('gulp-util'); gulp.task('concat', function() { return gulp.src('app/**/*.js') // .pipe(concat('script.js')) .pipe(uglify()) .on('error'

How can I make multiple projects share node_modules directory?

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I make projects, I have to download all dependencies of node modules. Without copying the node_modules, Is there anyway to share the central node_modules in multiple projects? like the followings, I have to run many commands every time.. npm install gulp-usemin npm install gulp-wrap npm install gulp-connect npm install gulp-watch npm install gulp-minify-css npm install gulp-uglify npm install gulp-concat npm install gulp-less npm install gulp-rename npm install gulp-minify-html 回答1: You absolutely can share a node_modules directory

How can I set up gulp to run identically in Visual Studio 2017 and msbuild without having to change my build scripts?

两盒软妹~` 提交于 2019-12-03 02:58:48
I'm struggling to get set up with gulp in Visual Studio 2017. I'm not sure where I'm going wrong but there are a few things I'm confused about and I can't really find any online resources that are of any use. The build system I'm using is CruiseControl.NET and I would like gulp to work with it. This is what I've done so far: Installed Visual Studio 2017 with .NET Core cross-platform development and Node.js development selected (amongst other options). Created a new project Added a gulpfile.js file to the project Right-click on the file and choose Task Runner Explorer In the Task Runner

What are the purposes of vinyl-buffer and gulp-streamify in gulp?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As the documentation says, they both deal with transforming non-stream plugins to stream. What I try to understand is, if I can use the .pipe() method on something, doesn't it mean it's a stream? If so, what do I convert to what here? vinyl-source-stream example: (from: https://www.npmjs.com/package/vinyl-buffer ) var browserify = require('browserify') var source = require('vinyl-source-stream') var buffer = require('vinyl-buffer') var uglify = require('gulp-uglify') var size = require('gulp-size') var gulp = require('gulp') gulp.task('build

Local gulp not found (Try running: npm install gulp)

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created a module ( webapp-module-storage ) which has the following definitions: package.json { "dependencies": { ... }, "devDependencies": { "gulp": "^3.9.1", ... }, "name": "webapp-module-storage", "scripts": { "postinstall": "gulp build", "test": "gulp test" } } I thought I can use my module inside another module when installing it with: npm install github:myorg/webapp-module-storage#master However, when I install my module, I am getting this error: Local gulp not found Try running: npm install gulp Screenshot My understanding is, that

gulp-uglify events.js unhandled 'error' event

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting this error. Running gulp yesterday worked perfectly fine, but this morning (changed NO code) and I'm getting this error. $ gulp [08:54:10] Using gulpfile C:\Source\Source2\bunny-meadows\gulpfile.js [08:54:10] Starting 'scripts'... [08:54:10] 'scripts' errored after 11 ms [08:54:10] TypeError: listener must be a function at TypeError (<anonymous>) at DestroyableTransform.addListener (events.js:130:11) at DestroyableTransform.Readable.on (C:\Source\Source2\bunny-meadows\node_mo dules\gulp-uglify\node_modules\through2\node_modules