gulp

Gulp ngmin + uglify not working properly

三世轮回 提交于 2019-12-04 08:19:31
问题 I have the following gulp task: gulp.task('scripts', function() { return gulp.src(['app/js/app.js', 'app/config/config.js', 'app/js/controllers.js', 'app/js/directives.js' , 'app/js/filters.js', 'app/js/footer.js', 'app/js/guideTour.js', 'app/js/mobileBanner.js', 'app/js/services.js', 'app/js/youtube.js', 'app/js/dataSync.js', 'app/js/addthis.js']) //.pipe(jshint('.jshintrc')) .pipe(jshint.reporter('default')) .pipe(concat('main.js')) .pipe(ngmin()) .pipe(gulp.dest('app/dist/js')) .pipe

How do I replace the filenames listed in index.html with the output of gulp-rev?

杀马特。学长 韩版系。学妹 提交于 2019-12-04 08:19:26
问题 I'm using gulp-rev to build static files that I can set to never expire. I'd like to replace all references to the generated files in index.html to these renamed files, but I can't seem to find anything that does that like Grunt with usemin. As far as I can tell right now, I have some options. Use gulp-usemin2, which depends on gulp-rev. When I go to search Gulp plugins, it says that gulp-usemin2 does too much so I should use gulp-useref instead, but I can't configure gulp-ref to use gulp-rev

How to improve webpack performance?

允我心安 提交于 2019-12-04 08:03:43
问题 I recently switched from browserify to webpack and the build time jumped from 4s to 16s on (2014 MBP). I understand webpack does alot more than browserify but i shouldn't take that long. My build process is fairly simple. Are there any tips or options to improve my build time? var webpackOptions = { cache : true, output: { filename: '[name].js', }, module: { loaders: [ { test: /\.js$/, loader: 'jsx-loader' }, { test: /\.css$/, loader: "style!css" } ] }, }; gulp.task('buildJs', function(){

Gulp-autoprefixer throwing ReferenceError: Promise is not defined

随声附和 提交于 2019-12-04 07:32:54
问题 I try to make a gulp compile my sass then autoprefixit with gulp-autoprefixer but i'm getting an error. var gulp = require('gulp'), sass = require('gulp-sass'), autoprefixer = require('gulp-autoprefixer'); gulp.task('test', function(){ gulp.src('_sass/main.sass') .pipe(sass()) .pipe(autoprefixer()) .pipe(gulp.dest('./assets/css')); }); I'm trying to run this Gulpfile.js and i'm using : "gulp": "~3.9.0", "gulp-sass": "~2.0.4", "gulp-autoprefixer": "~3.0.1", and NPM version 1.3.10 When i run

Aurelia CLI app-bundle automatic update gets slow

折月煮酒 提交于 2019-12-04 07:03:47
Hi I have a web application runnig on the Aurelia CLI. From what I’ve read in the documentation , the Aurelia CLI runs always “bundled” and never targeting directly source files. By running the “au run –watch” command, Aurelia “listens” to file changes and recreates the app-bundle.js automatically. Sample output from console: Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'... Finished 'configureEnvironment' Starting 'buildJavaScript'... Finished 'processCSS' Finished 'processMarkup'

JavaScript heap out of memory in angular js gulp sourcemap ngannonate with babel

一世执手 提交于 2019-12-04 06:57:49
问题 I am using es6 syntax in my angular JS project but it throws error when run gulp build , search over github and So but some saying this is error due to gulp uglify while some say this is babel issue and other say ng-annonate issue. ubuntu 14.04 node -v : 8.4.0 npm -v : 5.3.0 babel --version : 6.26.0 (babel-core 6.26.0) package.json { "name": "Project", "version": "0.0.0", "dependencies": { "gulp-open": "^2.0.0" }, "scripts": { "test": "gulp test" }, "devDependencies": { "babel": "^6.23.0",

Why isn't my page loading up on Github?

青春壹個敷衍的年華 提交于 2019-12-04 06:52:02
问题 I am trying to point my repo to a custom domain and receiving this error: 404 File not found The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file. Here is my repo: https://github.com/rohithpalagiri/rohithpalagiri.github.io Here is the custom url: rohithpalagiri.com I looked at my namecheap setting and it was set up correctly.

Gulp, Reactify, and Babelify not transforming together

非 Y 不嫁゛ 提交于 2019-12-04 06:39:38
This is my gulpfile code: gulp.task('react', function () { browserify('app/src/main.jsx') .transform(reactify) .transform(babelify) .bundle() .pipe(source('app.js')) .pipe(streamify(uglify())) .pipe(gulp.dest('dist/js/')); }); Only the first transform statement runs, and therefor throws an error due to the lack of additional transform (I'm writing in ES6 and JSX w/ react). I'm at a complete loss and would really appreciate help. Reactify should no longer be used. You don't say what version you are on, but as of Babel 6 "preset's" are the standard way to achieve compilation. Run the following

Getting: SyntaxError: missing ) after argument list but can't find out whats wrong with hulpfile.js

六眼飞鱼酱① 提交于 2019-12-04 06:35:53
问题 Hi I'm getting an error starting 'gulp default' with the following gulp file. I cannot figure out whats wrong with the file. var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); var browserSync = require('browser-sync').create(); var input = './scss/**/*.scss'; var output = './css'; gulp.task('sass', function() { return gulp.src(input) .pipe(sourcemaps.init()) .pipe(sass(errLogToConsole: true

Template was precompiled with an older version of Handlebars than the current runtime

大憨熊 提交于 2019-12-04 06:27:37
I have this error, but the different between this question and my question is that I'm using gulp instead grunt. First, my handlebar runtime is handlebars v4.0.5 (js file). The output of handlebar -v is 4.0.5 This is my gulpfile.js : var gulp = require('gulp'); var uglify = require('gulp-uglify'); var handlebars = require('gulp-handlebars'); var wrap = require('gulp-wrap'); var declare = require('gulp-declare'); var concat = require('gulp-concat'); gulp.task('default', ['templates','scripts'], function () { }); gulp.task('templates', function () { gulp.src('templates/*.hbs') .pipe(handlebars()