Add sass and autoprefixer to gulp in visual studio 2015
May 21
2016
You are looking at revision 2 of this page, which may be out of date. View the latest version.
In Visual studio 2015 (Update 2) a new ASP.NET Core Web Application contains a gulpfile that adds css and js minification. Here is how to add scss and autoprefixing support to that gulpfile.
After adding a new project rename site.css
to site.scss
Next install the the required npm packages:
npm install gulp-autoprefixer
npm install gulp-sass
You need to ensure you run these commands from the project folder (not just anywhere) eg for me that means opening a command prompt at
D:\aaa_development\spikes\GulpSpike\src\GulpSpike
Next, attempt to reference these from gulpfile.js
by adding the following lines after the other existing require definitions
var autoprefixer = require('gulp-autoprefixer')
var sass = require('gulp-sass');
Posted by: Wallace Turner
Last revised: 21 May, 2016 05:17 AM History
Last revised: 21 May, 2016 05:17 AM History
You are looking at revision 2 of this page, which may
be out of date. View the latest version.
No new comments are allowed on this post.
Comments
No comments yet. Be the first!