[Build] Begin integrating compass

Convert SCSS to CSS as a build step.
This commit is contained in:
Victor Woeltjen 2016-01-28 10:36:01 -08:00
parent 918c667496
commit fc7bd36dba
2 changed files with 16 additions and 2 deletions

View File

@ -24,20 +24,27 @@
var gulp = require('gulp'),
requirejsOptimize = require('gulp-requirejs-optimize'),
sourcemaps = require('gulp-sourcemaps'),
compass = require('gulp-compass'),
karma = require('karma'),
path = require('path'),
paths = {
main: 'main.js',
dist: 'dist'
dist: 'dist',
assets: 'dist/assets',
scss: 'platform/**/*.scss'
},
options = {
requirejsOptimize: {
name: 'main',
name: paths.main.replace(/\.js$/, ''),
mainConfigFile: paths.main
},
karma: {
configFile: path.resolve(__dirname, 'karma.conf.js'),
singleRun: true
},
compass: {
sass: __dirname,
css: paths.assets
}
};
@ -52,3 +59,9 @@ gulp.task('scripts', function () {
gulp.task('test', function (done) {
new karma.Server(options.karma, done).start();
});
gulp.task('stylesheets', function () {
return gulp.src(paths.scss)
.pipe(compass(options.compass))
.pipe(gulp.dest(paths.assets));
});

View File

@ -9,6 +9,7 @@
"devDependencies": {
"glob": ">= 3.0.0",
"gulp": "^3.9.0",
"gulp-compass": "^2.1.0",
"gulp-requirejs-optimize": "^0.3.1",
"gulp-sourcemaps": "^1.6.0",
"jasmine-core": "^2.3.0",