gulp

gulp-changed with gulp-concat not working

不打扰是莪最后的温柔 提交于 2019-12-12 05:38:04
问题 I want to compile only the .less files that have changed in order to speed up my debug/coding workflow. Here is my gulp task: gulp.src('core/**/*.less') .pipe(changed('core')) .pipe(less().on('error', handleError)) .pipe(autoprefixer('last 2 version')) .pipe(remember()) .pipe(concat('main.min.css')) .pipe(gulp.dest('core')) .on('end', resolve) .on('error', reject); I used gulp-changed and because it didn't work at first, I tried to use gulp-remember as well, but with no effect. The watch

Dynamic filename in gulp-zip

风流意气都作罢 提交于 2019-12-12 05:37:30
问题 I try to generate multiple zip files with gulp-zip packages - package-1 - package-2 to build - package-1.zip - package-2.zip At the moment my task looks like this: gulp.task('zip', function () { return gulp.src("packages/*") .pipe(zip("archive.zip")) .pipe(gulp.dest("build")); }); This generates a single zip file names archive.zip which contains my two packages. How to get 2 separate zipfiles? How to pass the folder name to the zip function? 回答1: You can call the zip command twice in your zip

How to concat JS library files using gulp?

℡╲_俬逩灬. 提交于 2019-12-12 05:36:06
问题 Please check out my gist: https://gist.github.com/flyspaceage/9e88716294df93c8eaece51fe413f7a3 All of my files seem to concat properly except the JS libraries. Im using JS Socials, JS Scrollify, Headroom, JQuery 2.1.1, JS Slick. The files concat into one minified file, but the libraries no longer work in production. I am writing my first Gulpfile, any suggestions focused on Gulp appreciated. 回答1: Place your vendor libraries in a different location. The reason why its not working is you are

exit gulp when build is finished

一个人想着一个人 提交于 2019-12-12 05:28:33
问题 I'm using gulp to minify CSS and JS files. When I run the gulp command gulp build:website1:desktop from a terminal, it finishes successfully but it does not return to the shell prompt, I have to run Ctrl+C to return to the command prompt Here is a what I'm using gulp.task('build:website1:desktop', function () { runSequence( 'website1:desktop:scripts', 'website1:desktop:css'); }) Any ideas How to exit and return to the command prompt without typing Ctrl+C every time? Thank you in advance. 回答1:

How to investigate “Cannot find module X” coming from browserified bundles?

一世执手 提交于 2019-12-12 04:58:38
问题 Desperate mode: Tried many different configs and all failed. I have a browserified + babelified bundle called videomail-client.js here: https://github.com/binarykitchen/videomail-client/tree/develop/dist The package.json's main entry of that package is pointing to this file. Now, when I require() that package from another project within and browserify it, then I see this error from the gulp task using browserify: [16:26:32] Error: Cannot find module './keys' from '/home/michael-heuberger/code

How to run NG BUILD from Gulp using child-process.spawn or disable all output in child-process.exec

大憨熊 提交于 2019-12-12 04:56:25
问题 There is a similar question like this Call "ng build" from inside a gulp task I managed my Gulp to build Angular this way to not overflow the output buffer const child = require('child_process'); // Temporary solution, progress option makes angular more quiet, // but I need to shut it up completely gulp.task('build', ['compile'], (cb) => { child.exec('ng build --progress false', (e, stdout, stderr) => { cb(e); }); }); Unfortunately, this can be used only as a temporary solution because as far

gulp-typescript giving module not found error for angular2

做~自己de王妃 提交于 2019-12-12 04:43:24
问题 I use gulp-typescript to compile the angular2 app. I get the following error. C:/src/Terminal.Web/src/Terminal.Web/node_modules/angular2/src/facade/async.d.ts(3,53): error TS2307: Cannot find module '@reactivex/rxjs/dist/cjs/Rx'. C:/src/Terminal.Web/src/Terminal.Web/node_modules/angular2/src/facade/async.d.ts(4,25): error TS2307: Cannot find module '@reactivex/rxjs/dist/cjs/Rx'. [12:18:32] TypeScript: 4 semantic errors C:/src/Terminal.Web/src/Terminal.Web/node_modules/angular2/src/facade

Can not deploy gulp application on heroku. Heroku local web works though

半城伤御伤魂 提交于 2019-12-12 04:38:50
问题 I am trying to push google web starter kit on Heroku. I perform following steps ➜ dist git:(deploy_heroku) heroku local web [WARN] No ENV file found [WARN] ENOENT: no such file or directory, open 'Procfile' [OKAY] package.json file found - trying 'npm start' 5:53:43 PM web.1 | > @ start /Users/Harit.Himanshu/Downloads/web-starter-kit/dist 5:53:43 PM web.1 | > node server.js 5:53:43 PM web.1 | Server running... ^C[WARN] Interrupted by User [DONE] Killing all processes with signal SIGINT 5:53

Gulp-Connect-Php + browserSync + Gulp-Connect address in use issue

醉酒当歌 提交于 2019-12-12 04:35:17
问题 I need an ability to use browserSync with php support and some specific url rewrites. I came up with browserSync with Gulp-Connect-Php packages plus Gulp-Connect + modrewrite. Here is my config: var browserSync = require('browser-sync'), phpconnect = require('gulp-connect-php'), connect = require('gulp-connect'), modrewrite = require('connect-modrewrite'), phpconnect.server({base:'dist/',port: 8010}, function (){ connect.server({ port: 8001, middleware: function() { return [ modrewrite([ '^

Angular depandency problems at minify compiling

£可爱£侵袭症+ 提交于 2019-12-12 04:32:58
问题 I have an app which uses a lot of different js files. When I compile the app normaly with gulp everything works well, but when I compile everything in one file to minify it, I get an error ( Uncaught Error: [$injector:modulerr] ). app-55bb2aca73.js:4 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=app&p1=Error%3A%20%…http%3A%2F%2Flocalhost%3A8080%2Fbuild%2Fjs%2Fapp-55bb2aca73.js%3A4%3A30075) at app-55bb2aca73.js:4 ... Here is my gulpfile.js (use