gulp

Autorun Gulp task 'watch' on Webstorm launch

ε祈祈猫儿з 提交于 2019-12-08 04:03:53
问题 Is there a way to run a Gulp task on Webstorm launch? Tried looking through webstorm settings but don't see anything, also Gulp integration is brand new to Webstorm 9. gulp.task('watch', function () { gulp.watch(paths.watch.css, function(){ compileLESS(paths.src.css, paths.dest.css, {name: 'Style'}) }); gulp.watch(paths.watch.cssBootstrap, function(){ compileLESS(paths.src.cssBootstrap ,paths.dest.cssBootstrap, {suffix: '.min', name: 'Bootstrap'}) }); gulp.watch(paths.watch.scripts, ['scripts

npm i and npm update breaking gulp, browserify builds

老子叫甜甜 提交于 2019-12-08 03:58:09
问题 What were you expecting to happen? Gulp to transpile vue.js components into usable and functional JS. What actually happened? When I run gulp contacts (shown under the Code and Configuration section below), the transpiling runs fine. No errors are outputted in the terminal, and everything appears to complete successfully. The problem is, when the page is reloaded I have an error in the console stating Uncaught SyntaxError: Unexpected end of input . When looking at the source, devtools shows

Keep folder structure with concat() in gulp

痞子三分冷 提交于 2019-12-08 03:30:34
问题 Folder structure: project | +-coffee | | | +-main.coffee | | | +-testDir | | | | | +-models.coffee | | | | | +-views.coffee | | | +-anotherDir | | | | | +-routes.coffee | | | | | +-views.coffee | | | | | +-modules.coffee | | | +- etc... | +-www The idea is to keep the folder structure from the coffee/ directory when writing files to the www/ directory. There can be an arbitrary number of subfolders in coffee/ . All .coffee files from each folder should be concatened into a modules.js file:

Angular ng annotate does not work with babel

北城余情 提交于 2019-12-08 03:30:30
问题 I am using browserify and babel to compile my js files and i want the ng annotate plugin too but it is not working, any ideas why? The gulp task: browserify(config.js.src, { debug: true }) .transform(babel.configure({ ignore: /vendor\// })) .bundle() .pipe(source(config.js.mainFileName)) .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(ngAnnotate()) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(config.js.dist)); class HomeController { // @ngInject constructor($http) { this

Problems generating source map files with current Gulp setup

可紊 提交于 2019-12-08 03:28:06
问题 I have set up a gulpfile.js in my project. It's working pretty nicely mostly, except when it comes to generating source maps, especially for the LESS files it compiles to CSS . I have put together a gist which contains all the files in my gulp setup. Please note that other than the gulp file.js itself, all the other files are inside a directory called tasks . The problems I am having are that I had to disable the autoprefixer in development because the source maps that were being generated

Laravel Elixir not watching SASS import files for gulp

六眼飞鱼酱① 提交于 2019-12-08 02:59:57
问题 I have elixir set up to watch changes in .scss files, but changes in _partials.scss are not being watched. elixir(function(mix){ mix.browserSync([ 'resources/assets/bower/bootstrap-sass/assets/**/*' ], { proxy: 'site.app', reloadDelay: 200 }); }); When I edit the bootstrap/_variables.scss, gulp does compile those sass changes. If I exit gulp watch, and gulp watch again, then those changes appear. So I know its compiling correctly, its just somehow not watching those partial files. Any ideas?

Syntax Error when using Gulp to compile React in ES6

若如初见. 提交于 2019-12-08 02:56:19
问题 When I try to compile the following code using React I get the error below. I don't see the issue in such a simple program and the example code compiles correctly when I clone the git repo. main.js: import React from 'react'; import HelloWorld from './components/helloworld'; //import HelloWorld from './hello-world-es5'; React.render( <HelloWorld phrase="ES6"/>, document.body ); HelloWorld: import React from 'react'; class HelloWorld extends React.Component { render() { return <h1>Hello from

npm hangs while trying to install gulp

僤鯓⒐⒋嵵緔 提交于 2019-12-08 02:38:10
问题 UPDATED: When I try to install any package with 'npm install', or any variant: npm install gulp -g -verbose npm install gulp -verbose npm install gulp npm install npm install connect I get the following output but it just hangs on the last line, never finishing the install: npm info it worked if it ends with ok npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe', npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', npm verb cli 'install', npm verb cli 'gulp', npm

Have interface extend string functionality

放肆的年华 提交于 2019-12-08 02:31:49
问题 I'm using these tools together: TypeScript Gulp Gulp-Inject I'm trying to do the following: module My { interface IGulpInjectable extends string { // << Problem here! [gulp_inject: string] : string; } export class Cache { private items: { [key: string] : IGulpInjectable }; constructor() { this.items = { "item1": { gulp_inject: "file1.html" }, "item2": { gulp_inject: "file2.html" } } } getItem(key: string){ return this.items[key].trim(); } } } What gulp-inject does is replace { gulp_inject: "x

Vinyl-ftp strange error

让人想犯罪 __ 提交于 2019-12-07 22:45:30
I am using Vinyl-ftp to do deployment, when i try to connect with FileZilla or Total Commander everything works ok, but when i try wirh Gulp task i got strange error, i dont see the difference, here is my Gulp task and error message gulp.task('ftp-test-connection', function () { var conn = ftp.create({ host: 'hostname', user: 'user', password: 'password', parallel: 10, log: gutil.log }); var globs = [ './styles/**/*{css,png,jpg,gif,ttf,woff,eof,svg,woff2}', './images/**', './views/**', './scripts/vendor.scripts.min.js', './dist/index.html', './dist_test/main.scripts.min.js', './dist_test/web