gulp

How to order the compiling of javascript files in Gulp

五迷三道 提交于 2019-12-12 03:22:22
问题 Hi I'm trying to fix the order of the js files that get compiled in my Gulp task. The order I need: '/_sources/js/libs/*.js' '/_sources/js/plugins/*.js' '/_sources/js/custom/*.js' '/_components/*.js' Issue is that the custom folder contains a custom particlesJS script and the main particlesJS script is inside the plugins folder. So if the custom script ends up above the main particlesJS in the compiled js file everything breaks. I tried to re-order things with gulp-order and event-stream but

How can i add a Build Task on my gulpfile?

…衆ロ難τιáo~ 提交于 2019-12-12 03:15:12
问题 I am trying to install a project named "BOSS". This is what i got when i tried to run bin/buildout -c frontend.cfg . You can check the whole installation step on HERE. <USER>@ubuntu:/opt/boss$ sudo bin/buildout -c frontend.cfg Installing frontend-admin. npm WARN package.json boss-admin@1.0.0 No description npm WARN package.json boss-admin@1.0.0 No README data npm WARN package.json angular-perfect-scrollbar@0.0.5 No repository field. npm WARN package.json eslint-plugin-class-property@0.0.3 No

Add, Commit and Push at Once using GULP-GIT

江枫思渺然 提交于 2019-12-12 02:59:32
问题 I'm trying to create a task that does add . , commit , and push in a single command line like : gulp gitsend -m "My changes" var gulp = require('gulp'); var argv = require('yargs').argv; var git = require('gulp-git'); gulp.task('gitsend', function() { if (argv.m) { console.log('adding, commiting and pushing to git...'); return gulp.src('.') .pipe(git.add()) .pipe(git.commit(argv.m) .pipe(git.push('origin', 'master', function (err) { if (err) throw err; }))); } }); But this is not working: it

Gulp: Different Pipe collections within same task (CoffeeScript and JavaScript)

旧巷老猫 提交于 2019-12-12 02:56:09
问题 What I've been attempting to do is create one scripts task that takes all .coffee and .js files and does what's needed for each: Coffee files should be run through coffee(), coffeelint() and coffeelint.reporter() JS files should be run through jshint() All files should then be run through concat(), uglify() and ultimately setting a destination as a final build file. The reason I have some .coffee and some .js is because I'm using Bower components that have JS files, even though I'd like to

Getting 'npm WARN deprecated' warnings while running npm install commands

陌路散爱 提交于 2019-12-12 02:44:31
问题 I'm getting following warnings while running npm commands, how to update these dependencies ? npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm My package.json - {

Webpackstream issues with babel-loader

扶醉桌前 提交于 2019-12-12 02:42:56
问题 I have a setup running for fine for Mac, but the same setup seems to fail on Windows. The babel-loader doesn't seem to do anything. Here is my current setup: Error code description package.json "devDependencies": { "babel-core": "^5.8.23", "babel-loader": "^5.3.2", "babel-preset-es2015": "^6.16.0", "del": "^2.0.2", "gulp": "github:gulpjs/gulp#4.0", "gulp-bytediff": "^1.0.0", "gulp-cached": "^1.1.0", "gulp-changed": "^1.1.1", "gulp-cli": "github:gulpjs/gulp-cli", "gulp-connect": "^2.2.0",

Task Dependency in Gulp

感情迁移 提交于 2019-12-12 02:41:43
问题 I have a task in gulp that need to execute other two tasks consecutively and in order. So when I run build , build run first task-a , when task-a is completed task-b is performed. At the moment I am using this script, I would like to have confirmation the is correct. gulp.task('build', [ 'task-a', 'task-b' ]); 回答1: As stated at the official documentation with that format the tasks will run in parallel (all at once), so don't assume that the tasks will start/finish in order. You have to

How to mark gulp task as completed when more than one gulp streams are being executed?

梦想与她 提交于 2019-12-12 02:23:24
问题 I need my gulp tasks to be synchronous (process JS and CSS async, but only after those are completed process HTML since it contains inline JS and CSS), and while plugins like gulp-run-sequence have been immensely useful, I still need to structure my tasks correctly in a way that they can be marked as completed. Take for example; gulp.task('process-css', function() { return gulp.src(['src/app.scss']) .pipe(gp.plumber()) .pipe(gp.sass().on('error', gp.sass.logError)) .pipe(gp.autoprefixer())

Custom icon font not loaded

落爺英雄遲暮 提交于 2019-12-12 01:58:37
问题 Using gulp-iconfont-css, I'm trying to compile Material Design svg into a font. This is the part of my Gulpfile.js: gulp.task('iconfont', function(){ gulp.src(paths.svg) .pipe(iconfontCss({ fontName: 'material-design', // required path: './www/sass/templates/_icons.scss', targetPath: '../sass/_icons.scss', fontPath: '/fonts/' })).pipe(iconfont({ fontName: 'material-design', // required })) .pipe(gulp.dest('./www/fonts/')); }); And now my template: @font-face { font-family: "<%= fontName %>";

Gulp does not work when returning stream

蓝咒 提交于 2019-12-12 01:53:27
问题 The following Gulp setup does not work: var templateCache = require("gulp-angular-templatecache"); var less = require("gulp-less"); gulp.task("angular-templates", function(){ return gulp.src(TEMPLATES_SOURCES) .pipe(templateCache(TEMPLATES_JS, {module: "moonwalk", root: TEMPLATES_ROOT})) .pipe(gulp.dest("Temp/")); }); gulp.task("less-compile",function(){ return gulp.src("**/*.less") .pipe(less()) .pipe(gulp.dest("./")); }); gulp.task("release-assets", ["angular-templates", "less-compile"],