gulp

Can't find Python executable when installing gulp-converter-tjs

限于喜欢 提交于 2019-12-11 07:24:17
问题 I am getting the following error when I attempt to install gulp-converter-tjs using npm install -g gulp-converter-tjs It looks like I am missing python but the path is correct for python.exe . I can even run python command from my cmd and also enviroment variables are set. Any suggestions? C:\Users\themhz\AppData\Roaming\npm\node_modules\gulp-converter-tjs\node_modules\iconv>if not defined npm_config_node_gy p (node "C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....

Running package.json dependencies when dependencies are not global

此生再无相见时 提交于 2019-12-11 07:12:42
问题 Let's say I have a package.json with "rimraf" as a dependency in it. "rimraf" is not installed globally. What command, from the command prompt, can I enter to run "rimraf"? Something like "npm run-command rimraf?" 回答1: You'd run ./node_modules/.bin/rimraf or if it is some common task, I'd add it to your package.json : "scripts": { "clean": "rimraf ..." } and then call npm run clean . Commands in scripts automatically resolve with ./node_modules/.bin . 来源: https://stackoverflow.com/questions

gulp run sequence after promise resolve

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:33:33
问题 Main task is provided to user availability to put login and password before each run task. So i try to use promises, but in such case my sequence doesn`t start because task finished when promise resolved. export default function() { var loginPromise = new Promise((resolve, reject) => { inquirer.prompt(config.loginQuestions).then(answer => { if (!(answer.login.length && answer.password.length)) { reject('loginError') } else { resolve(answer) } }); }); return loginPromise; }; And task import

RangeError: Maximum call stack size exceeded caused by array.splice.apply?

放肆的年华 提交于 2019-12-11 06:18:27
问题 I'm running a cheerio task and it throws an exception that prints this (Note that I added the log statements that print the size of spliceArgs and array : [14:17:08] Starting 'test:css'... SPLICE ARGS LENGTH: 4 ARRAY LENGTH: 5 SPLICE ARGS LENGTH: 132519 ARRAY LENGTH: 0 /home/ole/@superflycss/utilities-fonts/node_modules/cheerio/lib/api/manipulation.js:109 return array.splice.apply(array, spliceArgs); ^ RangeError: Maximum call stack size exceeded at uniqueSplice (/home/ole/@superflycss

Integrate Sass in Angular2 - webpack

随声附和 提交于 2019-12-11 06:16:16
问题 I created a new angular2 project using the angular CLI(@1.0-webpack.2). I would like to integrate Sass with my project. I know that: I can use gulp for this it's possible to include SCSS in ng2 components What I'd preffer is to have a specific directory for .scss files which should be 'watched' and compiled once they change, like .ts files after ng serve (terminal). Thank you 回答1: At this moment (Aug 25th) this is not possible, but it will be possible with the next release of the angular-cli.

Build this node project using only gulp or webpack

北城以北 提交于 2019-12-11 06:05:58
问题 My project has this folder structure: node | .gitignore | gulpfile.js | package.json | tsconfig.json | webpack.config.js | +---build | | debug.js | | main.js | | | +---client | | +---scripts | | | bundle.js | | | | | \---views | | index.html | | | | | \---server | | constants.js | | server.js | | | \---router | | constants.js | | router.js | | | \---routes | base.js | index.js | +---gulp | | constants.js | | | \---tasks | default.js | html.js | typescript.js | \---src | main.ts | +---client |

Conditional gulp task inside gulp.paralell() or gulp.series()

假装没事ソ 提交于 2019-12-11 06:05:43
问题 Too much information about conditions tasks inside pipes (e. g. "gulp-if" plugin). However, actually it is not "conditional tasks": it is the "conditional plugin usage", and one task can use multiple plugins. Here is how to conditionally run task NOT inside pipe (for example, inside gulp.paralell() ) Suppose that task name can contain spaces for providing easy-to-understand task meaning. gulp.task('Build', gulp.paralell( 'Preprocess HTML', 'Prepeocess styles', done => { if(checkSomeCondition(

gulp error on Heroku remote: SyntaxError: missing ) after argument list

蓝咒 提交于 2019-12-11 05:42:25
问题 I am getting following error on Heroku for a node.js app having Angular JS as client . remote: /tmp/build_4fcbc04371bd817841584e1f5427bd57/myRESTApp/ngClient/no de_modules/.bin/gulp:2 remote: basedir=$(dirname "$(echo '$0' | sed -e 's,\,/,g')") remote: ^^^^^^^ remote: SyntaxError: missing ) after argument list My package.json postinstall value is as follows : "postinstall": " node ./myRESTApp/ngClient/node_modules/bower/bin/bower install && node ./myRESTApp/ngClient/node_modules/.bin/gulp",

Incorporating gulp to compile js in apostrophe?

独自空忆成欢 提交于 2019-12-11 05:41:54
问题 Has anyone rolled gulp into apostrophe for compiling assets? I'd like to use ES6, as I'm using a frontend framework that has all of the js nicely split up into separate assets, and have the compilation of that into one minified file part of the normal apostrophe build process (I'm using apostrophe-assets to reference a single root js file which imports everything else). 回答1: Great question. You're going to want to build your JavaScript with Gulp into one file before pushing that file to the

change absolute path to relative using gulp

倾然丶 夕夏残阳落幕 提交于 2019-12-11 05:20:35
问题 In my gulp workflow I have a task that uses npm browser-sync module to serve static files. One of the options of this module is able to set a base directory to let me call js/css/img files etc, and include it using an absolute path like this: <img src="/imgs/label.png"> this feature let me call this file from any subdirectory I want /public ---/imgs ------label.png ---/catalog ------list.html <--- here ---index.html <--- and here, this image called using the same path /imgs/label.png this