gulp

How to update specific sub-package version by using npm

白昼怎懂夜的黑 提交于 2020-01-03 01:46:05
问题 I had checked global package minimatch for gulp $ npm list -g minimatch +-- gulp@3.9.1 | `-- vinyl-fs@0.3.14 | +-- glob-stream@3.1.18 | | +-- glob@4.5.3 | | | `-- minimatch@2.0.10 deduped | | `-- minimatch@2.0.10 | `-- glob-watcher@0.0.6 | `-- gaze@0.5.2 | `-- globule@0.1.0 | +-- glob@3.1.21 | | `-- minimatch@0.2.14 deduped | `-- minimatch@0.2.14 Now, i wanted to update all minimatch versions from specific gulp package (all minimatch@0.2.14 and minimatch@3.04) to latest version. Is their any

Can I pass arguments to a gulp task?

混江龙づ霸主 提交于 2020-01-02 23:28:32
问题 I'm using gulp in Visual Studio, as a client-side build tool only . I have lots of tasks which are common across various projects, so I moved them to separate files, and reference them in a project's gulpfile.js as follows: require("../path/to/task/files/fooCommon.js"); // has a task called "fooCommon" And then in the gulpfile.js I wrap it in a task: gulp.task("foo", ["fooCommon"], function () { }); This works nicely, and I can reuse common tasks across projects. BUT, some tasks require

Prepend custom strings to JS files while concatenating

匆匆过客 提交于 2020-01-02 10:05:58
问题 I am trying to migrate our build process to gulp from existing custom bash build script. We concatenate several unminified opensource JS files like bootstrap, lazyload, ... and our own JS files. We uglify each JS file (removing their licenses as well) in an order, prepend custom license text to some of them as required and concatenate to create the output JS file. The custom license text are currently kept as strings in the bash script. How to achieve this in gulp without creating

Prepend custom strings to JS files while concatenating

点点圈 提交于 2020-01-02 10:05:47
问题 I am trying to migrate our build process to gulp from existing custom bash build script. We concatenate several unminified opensource JS files like bootstrap, lazyload, ... and our own JS files. We uglify each JS file (removing their licenses as well) in an order, prepend custom license text to some of them as required and concatenate to create the output JS file. The custom license text are currently kept as strings in the bash script. How to achieve this in gulp without creating

Gulp: how to get gulp result as variable

匆匆过客 提交于 2020-01-02 09:39:07
问题 Needed something like this: gulp.src(path.join(conf.paths.src, '/**/*.less')) .pipe($.less()) // already have some result, but HUGE changes are needed .pipe(HERE_I_GET_IT_AS_A_TEXT(function(str){ // a lot of different changes return changed_str; })) .pipe(rename('styles.css')) // go on doing smth with changed_str .pipe(gulp.dest('./app/theme/')); Is there something in gulp to get some transitional result as text, process text with js and pass it to the next pipes? Everywhere I find only

How do I properly separate my app.js and vendor.js bundles using Browserify?

冷暖自知 提交于 2020-01-02 08:09:43
问题 My goals are to include the following in my HTML file and have them all work properly: index.html: <script type="text/javascript" src="./vendor.js"></script> <script type="text/javascript" src="./app.js"></script> $(document).ready(function() { // jQuery should be available as `window.$` $(".myclass").doSomethingWithJquery(); } <div class="row"> <h1 class="col-md-3 col-md-offset-3"> I should be able to use bootstrap, including bootstrap's javascript libraries, in my templates </h1> </div> <!-

Why “gulp-jest” is failing with: “Please run node with the --harmony flag!”?

亡梦爱人 提交于 2020-01-02 06:31:15
问题 I get the following error when running gulp test : Error: Please run node with the --harmony flag! Here is my gulp task: var jest = require('gulp-jest'); gulp.task('test', function() { return gulp.src('src/**/__tests__').pipe(jest({ rootDir: 'src', scriptPreprocessor: '../node_modules/6to5-jest', unmockedModulePathPatterns: [ 'react' ] })); }); To reproduce: https://github.com/SEEK-Jobs/react-playground Note that npm test works properly (test is failing as expected), but gulp test fails with

I want to automatically fix my CSS source files, but I get an endless loop

[亡魂溺海] 提交于 2020-01-02 04:50:38
问题 I use gulp-stylefmt and it run every time I save any CSS file: function stylelint () { return gulp.src('src/**/*.css') .pipe($.stylefmt()) .pipe(gulp.dest('src/')); } Same time gulp.watch watches the path src/**/*.css and run stylelint task again. Console output: [16:32:24] Starting 'stylelint'... [16:32:25] Finished 'stylelint' after 554 ms [16:32:25] Starting 'stylelint'... [16:32:25] Finished 'stylelint' after 60 ms [16:32:25] Starting 'stylelint'... [16:32:25] Finished 'stylelint' after

Angular2 with ASP.NET 5 [closed]

十年热恋 提交于 2020-01-02 01:11:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am playing around with Angular2 in combination with ASP.NET5, gulp and typescript. Everything works fine when I solve the tutorials for Angular, but I am not sure how to setup the process in combination with ASP.NET 5. I made a project with working typescript compilation and bundling and I now the issues are

Livereload isn't working in gulp

穿精又带淫゛_ 提交于 2020-01-02 00:58:07
问题 I used gulp-webapp (generator from yeoman) and add some other tasks (like gulp-sass & gulp-coffee). But now Livereload isn't starting. I need to see something like this [gulp] Live reload server listening on: 35729 But output looks like ➜ app git:(master) ✗ gulp watch [gulp] Using gulpfile ~/Dev/lsd/app/gulpfile.js [gulp] Starting 'clean'... [gulp] Starting 'styles'... [gulp] Starting 'scripts'... [gulp] Starting 'connect'... [gulp] Finished 'connect' after 68 ms Started connect web server on