gulp

exec 'node app' hangs inside gulp task

偶尔善良 提交于 2019-12-24 04:41:30
问题 This gulp task hangs on exec('node config/app') line. first exec works fine but the second just hangs. gulp.task('test', function(cb) { var exec = require('child_process').exec; exec('echo 3', function(err, stdout) { console.log(stdout); }); exec('node config/app', function(err, stdout, stderr) { console.log(stdout); var testemOptions = { file: 'testem.json' }; var t = new testem(); return t.startCI(testemOptions, function() { cb(); }); }); }); I can see the output 3 but no output is shown

exec 'node app' hangs inside gulp task

女生的网名这么多〃 提交于 2019-12-24 04:41:08
问题 This gulp task hangs on exec('node config/app') line. first exec works fine but the second just hangs. gulp.task('test', function(cb) { var exec = require('child_process').exec; exec('echo 3', function(err, stdout) { console.log(stdout); }); exec('node config/app', function(err, stdout, stderr) { console.log(stdout); var testemOptions = { file: 'testem.json' }; var t = new testem(); return t.startCI(testemOptions, function() { cb(); }); }); }); I can see the output 3 but no output is shown

Installing gulp-imagemin on Windows creates well over 10,000 files

和自甴很熟 提交于 2019-12-24 04:13:07
问题 I have installed gulp-imagemin on my Windows 7 laptop using npm install --save-dev gulp-imagemin and after a lengthy process ended up with a folder with well over 10,000 files and some very deep folder structures. Has anyone else seen this? Is it likely to be correct or would I be right in suspecting an issue? 回答1: Yes it is correct. I've installed it too on my Windows machine and I saw the same thing as you describe here. The reason it has over 10,000 files and an even more lengthier

Yeoman - Gulp spawn cmd enoent

落爺英雄遲暮 提交于 2019-12-24 03:26:12
问题 With the help gulp yeoman-webapp 'im wolf. But it also serves on the command line, I get the following error gulp. Can you help me? Thank you in advance. I work in Windows 10 and 64 bit computing. events.js:85 throw er; // Unhandled 'error' event ^ Error: spawn cmd ENOENT at exports._errnoException (util.js:746:11) at Process.ChildProcess._handle.onexit (child_process.js:1053:32) at child_process.js:1144:20 at process._tickCallback (node.js:355:11) 回答1: Try to put in your system variables in

Browserify resolves the same file multiple times

纵然是瞬间 提交于 2019-12-24 03:07:46
问题 I am facing a strange problem running latest browserify (10.2.4) and gulp. It seems that the same file is being resolved multiple times, and so I don't get the same instance when creating a singleton. I've put a 'debugger' before module.exports and verified it is called twice. note #1: I have a guess that says that browserify caches the files based on the string, and so when calling relative paths from different places will not have the same string, even though they point to the same place.

Global error message using Gulp Notify & Plumber

时光总嘲笑我的痴心妄想 提交于 2019-12-24 02:25:24
问题 Is it possible to create a global OnError function that I can pass a title and the error message to? I'm looking to do something like this for all tasks ran with plumber: onError = function(error) { $.notify.onError({ title: 'Error', subtitle: '<%= file.relative %> did not compile!', message: '<%= error.message %>' })(error); }; 回答1: You can simply save the onError function as a variable: var onError = notify.onError({ title: 'Error', subtitle: '<%= file.relative %> did not compile!', message

Relative paths in package.json?

做~自己de王妃 提交于 2019-12-24 01:24:09
问题 I've got a project where src/main/webapp/com/mycompany/frontend/page/index.js depends on target/webjars/log4javascript/1.4.10/log4javascript.js . I've added package.json alongside index.js with the following contents: { "browser": { "log4javascript": "../../../../../../../target/webjars/log4javascript/1.4.10/log4javascript.js" } } I've got many other dependencies in the target directory. Is there a way for me to avoid repeating ../../../../../../../target/ for every dependency? 回答1: One

how can I install package to the wwwroot in mvc core 2

别等时光非礼了梦想. 提交于 2019-12-24 01:18:57
问题 Recently I Installed the VS 2017 Which Contains Asp.net mvc core 2 but there is a very confusion problems there! that is how can i Install a new package into the wwwroot so: _ Im using bower but supporting is end of and can not find out bower.json in the project>> new item after config it using npm . I installed it using npm but still can not find( .bowerrc file under bower.json.) to set the directory: So-called valid document _with gulp and grunt : end of supporting gulp too and can not find

Gulp Concat JS results in require is not defined

两盒软妹~` 提交于 2019-12-24 00:46:04
问题 I have project using gulp. I am trying to get jquery, jquery ui and bootstrap into one file called vendor.js. This works fine however when I run "gulp serve" to run the project fromthe dist folder of the project i get the error ReferenceError: require is not defined http://localhost:3000/assets/toolkit/scripts/vendor.js Line 6 var jQuery = require('jquery'); gulp.task('vendor-js', function() { return gulp.src(['src/assets/toolkit/scripts/vendor/jquery.min.js', 'src/assets/toolkit/scripts

How to rewrite a file before publish based on build configuration?

时光毁灭记忆、已成空白 提交于 2019-12-24 00:43:44
问题 I have a new asp.net V5 application that is really just a static angular site and I'm trying to do the equivalent of web.config transforms. My app.js file has a constant defined that is the serviceUrl which points to the url of our api (not in the same site) I've used gulp-replace and created tasks for each of our build targets that successfully replace the single string that needs to be replaced. The problem I'm having is that I need to be able to change that service url based on the build