gulp

Setting up vue and laravel trouble

懵懂的女人 提交于 2019-12-25 12:07:28
问题 Here is my gulpfile.js file var elixir = require('laravel-elixir'); require('laravel-elixir-webpack'); elixir(function(mix) { mix.styles([ 'vendor.css', 'font-awesome.css', 'theme-default.css', 'custom.css' ],'public/assets/css/index.css'); mix.scripts([ 'vendor.js', 'demodata.js', 'app.js', 'demo.js' ],'public/assets/js/index.js'); mix.webpack('main.js'); mix.version('js/main.js','assets/css/index.css','assets/js/index.js'); }); And here is my master.blade.php <!DOCTYPE html> <html lang= "en

Pug (Jade) extra space added between formatted tags on gulp build

独自空忆成欢 提交于 2019-12-25 11:56:02
问题 I use Gulp, webpack and pug(jade). The issue is with the dist-code that has an extra space because of formatting on build. pseudo-code: label each item in items span if kkk == 2 =item[1] else abbr(title='ttttttt') =elem and the resulting (dist) .html is something like this: <label for="ааааа">set to <abbr title="Scalable Vector Graphics">SVG/</abbr> <abbr title="Joint Photographic Experts Group">JPEG</abbr> </label> and looks like: set to SVG/ JPEG How to remove the space after '/', or to

Gulp load plugins error dep is not defiend

不羁的心 提交于 2019-12-25 09:05:29
问题 I try to use gulp-load-plugins but I got error . for example I try the following var istanbul = require('gulp-istanbul'); var $ = require('gulp-load-plugins')({lazy: true}); gulp.task('run', function () { return gulp.src(config.files) .pipe($.istanbul( { instrumenter: isparta.Instrumenter } )) .pipe(istanbul.hookRequire()); }); when I remove the var istanbul = require('gulp-istanbul'); I got error ReferenceError: istanbul is not defined "devDependencies": { "chai": "3.5.0", "gulp": "^3.9.1",

How would one write a resolve.alias function for gulp?

戏子无情 提交于 2019-12-25 08:48:09
问题 I'm using Gulp and Tape to run my test suite instead of Webpack and Tape. The reason is for speed and simplicity. Gulp functional task approach instead of testing while bundling. Now, in order for it to work I need to resolve a file path for an import. In webpack I would use: resolve: { alias: { 'machingWord' : __dirname } } So something like this: https://www.npmjs.com/package/gulp-resolve, but not as manual. Want the task to be able to resolve import '...' as it tests it. Is there a way for

injecting many files with three specific at bottom

心不动则不痛 提交于 2019-12-25 08:30:04
问题 I need to inject all the files,and reinject the last three, all.css, foo.css and app.min.js so they are injected last. Injecting task : return gulp.src('src/index.html') .pipe(inject(gulp.src(['temp/**/*.css','!temp/**/all.css','!temp/**/foo.css','./temp/**/*.js','!temp/**/app.min.js'], {read: false}), {ignorePath: 'temp'} )) .pipe(inject(gulp.src(['temp/**/all.css','temp/**/foo.css,'temp/**/app.min.js'], {read: false}), {ignorePath: 'temp'} )) .pipe(gulp.dest('temp')) .pipe(connect.reload())

Failed to list gulp tasks in WebStorm 2016.1

落爺英雄遲暮 提交于 2019-12-25 07:43:23
问题 I am using Gulp 3.9.1, node 5.7.1, npm 3.10.3, and WebStorm 2016.1. When I try to setup gulp for my project, I get the following error: /usr/local/bin/node /Users/msbauer/Developer/workspaces/provider-data-management/node_modules/gulp/bin/gulp.js --color --gulpfile /Users/msbauer/Developer/workspaces/provider-data-management/gulpfile.js error: unknown option `--color' Process finished with exit code 1 And when I force to rescan tasks: Failed to list gulp tasks in provider-data-management

uglify js error. Unexpected token: eof (undefined)

半世苍凉 提交于 2019-12-25 07:35:09
问题 I keep getting a Unexpected token error and I can't seem to figure out why. I am using uglifyJS with the grunt-contrib-uglify task but am also getting the error using the command line. Using gulpfile c:\path\to\gulpfile.js [14:05:53] Starting 'build'... [14:05:53] Starting 'clean:build'... [14:05:53] Finished 'clean:build' after 30 ms [14:05:53] Starting 'sass:build'... [14:05:56] Finished 'sass:build' after 2.52 s [14:05:56] Starting 'images'... [14:06:03] gulp-imagemin: Minified 3 images

gulp-uglify cannot change the name

北战南征 提交于 2019-12-25 06:50:03
问题 I'm using gulp-uglify to minify my code, and there's a thing I would like to change . I have the next gulpfile.js . When I do gulp calendar-uglify I got the compile inside /compile/ directory and with the name calendar.min.js . If I change the name inside uglify and I run again the command, gulp generates the name before again. I mean, it seems that uglify cannot compile the file with the name I wrote. Gulp-uglify allways takes the filename of the concat file. What can I do to change that? TY

how to fix global gulp not working on mac

狂风中的少年 提交于 2019-12-25 06:28:19
问题 I am having problem with installing npm global package for example npm install --global gulp-cli but when i want to run "gulp" it won't run Local gulp not found in ~ Try running: npm install gulp running which gulp => /usr/local/bin/gulp 回答1: as you can find here in the guide, you have to install gulp also in your project dependencies npm install --save-dev gulp if you try gulp outside a project with gulp instlled as depedency you'll recevie that error hope this helps 来源: https:/

Keeping Sass Folder Structure with Gulp/Compass

给你一囗甜甜゛ 提交于 2019-12-25 05:24:14
问题 I'm reorganizing my app structuring to accommodate learning Angular and modularizing the features. i.e. keeping the angular js, html, and css for each feature together. Up until now I simply had a sass folder full of scss files that got compiled into a single css file in a css folder. The gulp file was simple: gulp.task('styles', function () { gulp.src('_components/sass/*.scss') .pipe(compass({ config_file: 'config.rb', css: 'app/css', sass: '_components/sass' })) .on('error', errorLog) .pipe