gulp

Angular 2 Ahead-of-Time Compiler with gulp-typescript

与世无争的帅哥 提交于 2019-12-20 10:23:40
问题 Angular 2 rc 6 written in Typescript 2.0.2 I'm trying to learn Ahead-of-Time compilation as outlined here. It seems simple enough: Run ngc instead of the Typescript compiler to generate .ngfactory.ts files Replace platformBrowserDynamic().bootstrapModule() with platformBrowser().bootstrapModuleFactory() I'm not sure how to apply the first step to my setup. I use gulp-typescript 2.13.6 to compile my typescript to JavaScript. gulpfile.js var ts = require('gulp-typescript'); var tsProject = ts

Gulp: How to create a task that compiles multiple SASS files?

瘦欲@ 提交于 2019-12-20 09:59:29
问题 I have the following sass task which compiles app.scss to app.css and reloads the page: gulp.task('sass', function() { return gulp.src('./app/app.scss') .pipe(sass()) .pipe(gulp.dest('./app')) .pipe(livereload()); }); Now, I want to compile another file, namely ui-toolkit.scss to ui-toolkit.css . Is this the best way to update the task? gulp.task('sass', function() { gulp.src('./ui-toolkit/ui-toolkit.scss') .pipe(sass()) .pipe(gulp.dest('./ui-toolkit')); return gulp.src('./app/app.scss')

gulp-notify: [Error in notifier] Error in plugin 'gulp-notify' not found: notify-send

假如想象 提交于 2019-12-20 09:55:14
问题 I'm trying to setup Gulp in my install of Laravel 5.1. I've ran then command npm install as specified in the Laravel documentation and that's worked fine. However, when I now run the command gulp I get the following message: ubuntu@NAME:/var/www/html/FOLDER# gulp [14:04:56] Using gulpfile /var/www/html/FOLDER/gulpfile.js [14:04:56] Starting 'default'... [14:04:56] Starting 'sass'... [14:04:56] Running Sass: resources/assets/sass/app.scss [14:04:56] Finished 'default' after 532 ms [14:04:56]

How to perform multiple gulp commands in one task

自古美人都是妖i 提交于 2019-12-20 09:48:37
问题 I'm having a hard time to understand on how to process multiple gulp sources in a single task. In a task like this: gulp.task('task1', function (cb) { gulp.src('src/js/**/*').pipe(gulp.dest('dist')); gulp.src('src/css/**/*').pipe(gulp.dest('dist')); ... }); I would like to process all the different source files and then mark the task as finished, so the others tasks can depend on it's completion. I'm aware of the possibility, to using individual tasks for each individual source but this would

Gulp.js event stream merge order

不羁的心 提交于 2019-12-20 08:35:16
问题 I am trying to merge css and scss files into a main.css file that goes in my build directory. Its working, but not in the right order. The style attributes from the scss files need to be in the bottom of the main.css file so they overrule the rest. my Gulp task looks like this: //CSS gulp.task('css', function () { var cssTomincss = gulp.src(['dev/css/reset.css', 'dev/css/style.css','dev/css/typography.css', 'dev/css/sizes.css']); var cssFromscss = gulp.src(['dev/css/*.scss']) .pipe(sass());

How to uglify output with Browserify in Gulp?

妖精的绣舞 提交于 2019-12-20 08:18:32
问题 I tried to uglify output of Browserify in Gulp, but it doesn't work. gulpfile.js var browserify = require('browserify'); var gulp = require('gulp'); var uglify = require('gulp-uglify'); var source = require('vinyl-source-stream'); gulp.task('browserify', function() { return browserify('./source/scripts/app.js') .bundle() .pipe(source('bundle.js')) .pipe(uglify()) // ??? .pipe(gulp.dest('./build/scripts')); }); As I understand I cannot make it in steps as below. Do I need to make in one pipe

How to uglify output with Browserify in Gulp?

感情迁移 提交于 2019-12-20 08:18:10
问题 I tried to uglify output of Browserify in Gulp, but it doesn't work. gulpfile.js var browserify = require('browserify'); var gulp = require('gulp'); var uglify = require('gulp-uglify'); var source = require('vinyl-source-stream'); gulp.task('browserify', function() { return browserify('./source/scripts/app.js') .bundle() .pipe(source('bundle.js')) .pipe(uglify()) // ??? .pipe(gulp.dest('./build/scripts')); }); As I understand I cannot make it in steps as below. Do I need to make in one pipe

I installed gulp globally and also under the project file, but failed to use the gulp command and returned the following results

喜夏-厌秋 提交于 2019-12-20 07:41:35
问题 $ gulp assert.js:374 throw err; ^ AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\Users\Administrator\Desktop\h5musicplayer\node_modules_undertaker@1.2.1@undertaker\lib\set-task.js:10:3) at Gulp.task (C:\Users\Administrator\Desktop\h5musicplayer\node_modules_undertaker@1.2.1@undertaker\lib\task.js:13:8) at Object. (C:\Users\Administrator\Desktop\h5musicplayer\gulpfile.js:8:6) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object

Can't execute the task in VS Code to run gulpfile.js

北城以北 提交于 2019-12-20 07:26:54
问题 Trying to follow roughly this guide (as many like this one). In tasks.json I've added the following, right next to build task. { "taskName": "gulpify", "args": [], "showOutput": "always", "isBuildCommand": true } In gulpfile.js I've added the following. var gulp = require("gulp"); //gulp.task("default", "gulpify"); gulp.task("gulpify", function () { alert("bzz"); console.log("bzz"); }); When I execute the task from the embedded workbench command line (not PowerShell but the internal that

Gulp and TS compilation

元气小坏坏 提交于 2019-12-20 06:39:05
问题 I have defined task in my gulp file: gulp.task('dev:build:scripts', function () { var tsResult = tsProject.src() .pipe(sourcemaps.init()) .pipe(ts(tsProject)); }); Which takes all of the scripts, and creates source maps to the static/dist . My tsProject: var tsProject = ts.createProject('tsconfig.json', { outDir: paths.dist +'/app' }); And my tsconfig.json { "compilerOptions": { "target": "es5", "module": "system", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true,