Try reinstalling `node-sass` on node 0.12?
If your node version is 4 and you are using gulp-sass, then try npm uninstall –save-dev gulp-sass npm install –save-dev gulp-sass@2
If your node version is 4 and you are using gulp-sass, then try npm uninstall –save-dev gulp-sass npm install –save-dev gulp-sass@2
VS seems to install (and then use) an old version of node, which is why the task runner is breaking the build. Go to Tools > Options > Projects and Solutions > External Web Tools and add the correct path to your node version (find the path with which node). Credits to: https://github.com/sindresorhus/gulp-imagemin/issues/178#issuecomment-218131138
For routing, according to this guide at Using “Natural” Routes (specifically here), you have to add a controller that does the following: @Controller public class RouteController { @RequestMapping(value = “/{path:[^\\.]*}”) public String redirect() { return “forward:/”; } } Then using Spring Boot, the index.html loads at /, and resources can be loaded; routes are handled … Read more
Another option is to use functional array looping functions combined with Object.keys, like so: var defaultTasks = Object.keys(jsFiles); defaultTasks.forEach(function(taskName) { gulp.task(taskName, function() { return gulp.src(jsFiles[taskName]) .pipe(jshint()) .pipe(uglify()) .pipe(concat(key + ‘.js’)) .pipe(gulp.dest(‘public/js’)); }); }); I feel like this is a little cleaner, because you have the loop and the function in the same place, so it’s … Read more
It looks like you are behind a proxy. To by pass it, you have to configure it like : npm config set proxy http://myproxyblabla:myport npm config set https-proxy http://myproxyblabla:myport Problems with https are solved with : npm config set registry http://registry.npmjs.org/
Thanks to jonrsharpe. Worked for me: install / downgrade node.js to a stable version (LTS) like 14.15.0 install the compatible node-sass version via npm install [email protected]; you can find the list here, or even install gulp-sasswith npm i gulp-sass –save-dev. direct link to list
// Update From the comments ~ @imolit v2.0.0 (2018-09-14) – BREAKING CHANGES (link) Switch back to uglify-js (uglify-es is abandoned, if you need uglify ES6 code please use terser-webpack-plugin). Original answer before the update… I hope you can get inspired by this solution which works with webpack. (link below) Simply teach UglifyJS ES6 There are two … Read more
It turns out that I needed to use gulp-rename and also output the concatenated file first before ‘uglification’. Here’s the code: var gulp = require(‘gulp’), gp_concat = require(‘gulp-concat’), gp_rename = require(‘gulp-rename’), gp_uglify = require(‘gulp-uglify’); gulp.task(‘js-fef’, function(){ return gulp.src([‘file1.js’, ‘file2.js’, ‘file3.js’]) .pipe(gp_concat(‘concat.js’)) .pipe(gulp.dest(‘dist’)) .pipe(gp_rename(‘uglify.js’)) .pipe(gp_uglify()) .pipe(gulp.dest(‘dist’)); }); gulp.task(‘default’, [‘js-fef’], function(){}); Coming from grunt it was a … Read more
When you pass in an array of full paths, each file is processed independently. The globbing doesn’t know where the root of the path is (in fact, it guesses based on the first glob). Therefore, each file is rooted in the folder it contains, and the relative path is empty. However, there is an easy … Read more
You could use gulp-rename to accomplish this: var rename = require(‘gulp-rename’); gulp.src(‘app/client/**/*.html’) .pipe(rename({dirname: ”})) .pipe(gulp.dest(‘dist’));