gulp

Gulp is not including bower_components's SCSS files in my theme

女生的网名这么多〃 提交于 2019-12-24 20:14:43
问题 I am new to bower and gulp . I am trying to understand how gulp is merging all saas files. This is the code I got from one of the projects. However, running gulp doesn't include any saas files inside bower_components . bower install does generate all files and folder of bower_components . It does generate main.css file. Here is my code: wordpress/wp-content/theme/my-theme/gulpfile.js // ## Globals var argv = require('minimist')(process.argv.slice(2)); var autoprefixer = require('gulp

$ Is not defined scripts Gulp task

我的梦境 提交于 2019-12-24 17:24:31
问题 Hi I am trying to run my scripts task in gulp. My scripts path is defined as follows: scripts: { coffee: [ 'app/assets/scripts/**/*.coffee' ], js: [ 'src/js/*', 'src/js/**/*' ], map: ['src/js/**/*.map'] }, My original file paths are located in root/src/js/ and I want my scripts to be placed in their minified version inside root/app/assets/scripts/. My gulp task is as follows: gulp.task('scripts', function() { return gulp.src('app/scripts/**/*.js') .pipe($.if('*.js', $.uglify({preserveComments

Install package.json dependencies globally

房东的猫 提交于 2019-12-24 13:08:16
问题 There is the following 'package.json' file with dependencies: { "name": "xxx_web_app", "version": "1.0.0", "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "some.git" }, "author": "", "license": "ISC", "dependencies": { "bower": "^1.4.1", "connect-history-api-fallback": "^1.1.0", "gulp": "^3.8.11", "gulp-clean": "^0.3.1", "gulp-coffee": "^2.3.1", "gulp-connect": "^2.2.0", "gulp-jshint": "^1.10

gulp-sass not showing any errors

ε祈祈猫儿з 提交于 2019-12-24 13:08:05
问题 Sass with .sass files, Here is my gulpfile, var gulp = require('gulp'), sass = require('gulp-sass'), connect = require('gulp-connect'); connect.server({port: 8000, livereload: true}); function exceptionLog (error) { console.log(error.toString()); this.emit('end'); } gulp.task('sass', function () { gulp.src('sass/*.sass') .pipe(sass({ outputStyle: 'expanded', })) .on('error', exceptionLog) .pipe(gulp.dest('css')) .on('error', exceptionLog) .pipe(sass.sync().on('error', sass.logError)); });

gulp Cannot find module 'readable-stream/transform'

感情迁移 提交于 2019-12-24 12:01:03
问题 when I run gulp in my windows 7 I got this <pre> c:\wamp\www\laravel>gulp module.js:339 throw err; ^ Error: Cannot find module 'readable-stream/transform' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at Object.<anonymous> (c:\wamp\www\laravel\node_modules\laravel-elixir\node_modules\gulp-util\node_modules\through2\through2.js:1:79) at Module._compile (module.js:435:26) at

Error “Invalid UTF-8” when compiling sass with @import

丶灬走出姿态 提交于 2019-12-24 11:35:14
问题 There's my project with the folowing structire: project assets scripts styles app.scss bower_components node_modules public css app.css js bower.json gulpfile.js package.json I use gulp-sass to compile app.scss to app.css and i want to include foundation in app.scss gulp.task('styles', function() { return gulp.src(path.src.styles) .pipe(sass({ includePaths: ['./bower_components/foundation/scss'] })) .pipe(concat('app.css')) .pipe(gulp.dest(path.public.styles)); }) Then I white in app.scss

Critical css, above the fold content and rendered views

烂漫一生 提交于 2019-12-24 11:33:52
问题 I'm currently working on my gulp building/deploying pipeline. All the content available on the web about the critical-css-inlining is nice and pretty but it doesn't fit well with real world scenarios where your pages (views) are dinamically assembled. I have: header.html view.html (home.html, about.html, single.html, category.html) footer.html Any web page is a concatenated header + view + footer. Content is not predictable: you cannot know how many articles there will be in a rendered

gulp nodemon + node = Error: listen EADDRINUSE

。_饼干妹妹 提交于 2019-12-24 11:05:01
问题 I know EADDRINUSE happens when node tries to bind itself to a port that's already in use. The problem is that this all worked in combination with gulp nodemon to restart when changes occur in my code. I have a feeling I'm getting this error, ever since I moved my code from bin/www into my app.js file. bin/www looks like this: #!/usr/bin/env node var app = require('../app'); gulp.js restarts my server with this code: // nodemon task gulp.task('nodemon', function(){ nodemon({ script: 'bin/www',

Watchify + tsify + Visual Studio == stale code

为君一笑 提交于 2019-12-24 10:57:48
问题 We are running a Gulp task inside of Visual Studio (2015) to execute watchify. Works great some of the time, but sometimes watchify builds old code. Repro: Modify a .ts file in Visual Studio Save In the Task Runner Explorer, watch for watchify output, indicating that it ran (it does) Refresh Chrome/clear cache (I use the "disable caching while debug window is open" option in Chrome) View source in the Chrome Debugger (a little less than half the time, it will be the old code) Any idea what I

UnhandledPromiseRejectionWarning with svg2png from svg-sprite

戏子无情 提交于 2019-12-24 10:38:13
问题 Ive got a problem with svg2png, i want to convert my svg file to png and it says in gulp task that it's UnhandledPromiseRejectionWarning var gulp = require('gulp'), svgSprite = require('gulp-svg-sprite'), rename = require('gulp-rename'), del = require('del'), svg2png = require('gulp-svg2png'); // var config consist of mode we used, and it used the css mode var config = { mode: { css: { sprite: 'sprite.svg', render: { css: { template: './gulp/template/sprite.css' } } } } } gulp.task(