gulp

Pass Gulp sources to gulp-coffee, gulp-concat, and webpack-stream

筅森魡賤 提交于 2019-12-13 16:20:49
问题 I have the code: var gulp = require('gulp'); var webpack = require('webpack-stream'); var coffee = require('gulp-coffee'); var concat = require('gulp-concat'); gulp.task('webpack', function() { gulp.src('*/lib/*.coffee', { base: '.' }) .pipe(coffee({ bare: true })) .pipe(concat('app.js')) .pipe(webpack()) .pipe(gulp.dest('.')); }); However, it doesn't work, when it reaches webpack() . How can I make it so that the content passed from concat() to webpack() works successfully? I also assume

Use gulp for typescript compilation

ⅰ亾dé卋堺 提交于 2019-12-13 15:49:08
问题 Following angular 2 quick start guide, guys there use typescript compiler and tsconfig.json file, to work with it. I was looking up ways to use gulp for this and indeed there seem to be ways to achieve this, however I'm a bit confused to correct implementation with angular 2. essentially gulp-typescript and gulp-tslint seem to be two plugins to achieve this and somehow tsconfig.json file is also in play here, although I don't grasp why. Could anyone provide example for implementation that

Building Bootstrap with Less to change the @icon-font-path

試著忘記壹切 提交于 2019-12-13 14:03:55
问题 I use boostrap with bower and gulp . First time I copied the bootstrap.css from the bower_components to my site's dist folder and everything seemd to work. Hovever I observed that I have no glyphicons . This because of the fonts, that I keep in a relative folder other that defined in bootstrap.css I observed that there is less folder in bootstrap directory having the variables.less file: //** Load fonts from this directory. @icon-font-path: "../fonts/"; OK, perhaps if I change that relative

BrowserSync + Gulp with Vagrant not refreshing

我们两清 提交于 2019-12-13 12:50:42
问题 I'm using BrowserSync with Gulp to live reload a site in a local machine when specific kinds of files are changed. I've the following snippet in my gulpfile : gulp.task('browser-sync', function() { browsersync.init({ proxy: "mySite:8080", files: ["./*.html", "dev/*.css"] }); }); When changing (and saving) any of the above kinds of files, I get an output like this in my terminal: [BS] Serving files from: ./ [BS] Watching files... [BS] File changed: index.html [BS] File changed: dev\styles.css

Gulp Env and Preprocess

∥☆過路亽.° 提交于 2019-12-13 12:08:23
问题 In Grunt I used to use a plugin called env . That would allow me to define an environment in specific build. I had 3 builds. One was DEV which would use all the files split up individually. PROD would concat everything and RELEASE would concat and uglify. I'm looking to do the same in Gulp. I do see a preprocessor for Gulp but nothing to define environment. The question is. What can I do? Obviously I don't want to define all JS files all the time, and I don't want 3 different HTML pages with

Error: spawn ENOENT: missing the sass executable

三世轮回 提交于 2019-12-13 11:41:44
问题 I'm using bash in windows. Getting this error when trying to run a sass compiler command via gulp. I have Ruby & Sass installed. Sass works fine when running it manually. Error: spawn ENOENT: missing the sass executable. Please install sass and make available on your PATH I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables). Anyone got any ideas? 回答1: Your gulp-ruby-sass task is probably configured to execute SASS using Bundler (a gem

Issue with task not executing when using gulp with run-sequence

做~自己de王妃 提交于 2019-12-13 07:40:43
问题 I am new to gulp and so I put a simple script together to 1) learn how gulp works and 2) improve my development workflow. The issue I am having is that if I set the runSequence task list to be in the order of jscs and then lint, the lint task does not get executed. However, if I reverse them, and run lint first, then jscs, both tasks execute successfully. After doing more tests, I'm certain that there is something about the way I am using jscs that is causing the problem, or there is an issue

How to add 'del' dependency in gulp

若如初见. 提交于 2019-12-13 07:35:58
问题 New to gulp, need to add the dependency 'del'. I have seen this delete dependency but unable to found the npm installation for this 'del'. If directly tried to access var del = require('del'); It throws error unable to find the module. Can anyone help out... 回答1: Have you installed it? npm install --save-dev del https://www.npmjs.org/package/del 来源: https://stackoverflow.com/questions/24858702/how-to-add-del-dependency-in-gulp

Gulp missing the SASS executable

拟墨画扇 提交于 2019-12-13 07:35:31
问题 I'm working with gulp, I'm trying to install packages and the only way to install gulp on windows is to type npm install -g gulp@3.8.7 because new versions print me in the console some errors about the v8flags package. So I'm trying to compile sass through Gulp. I've a gulpfile.js: 'use strict'; var gulp = require('gulp'); var sass = require('gulp-ruby-sass'); gulp.task('sass', function() { return sass('css/main.scss') .on('error', function (err) { console.error('Error', err.message); })

Gulp and Browserify always giving “dest.write is not a function” error

我的未来我决定 提交于 2019-12-13 07:29:07
问题 I'm trying to utilize Browserify in my Gulp file, but it seems no matter how I set things up, it always throws an error that reads "dest.write is not a function". I originally started with this task using gulp-concat: gulp.task('scripts', function() { return gulp.src(['src/shared/js/one.js', 'src/shared/js/two.js', 'src/shared/js/*.js']) .pipe(browserify() .pipe(concat('main.js')) .pipe(gulp.dest('dist/js')) .pipe(browserSync.stream()); }); When I commented out the browserify() line,