Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #122 from gavinr/116-sass-fixes
Browse files Browse the repository at this point in the history
116 sass fixes
  • Loading branch information
gavinr authored Sep 18, 2018
2 parents e159f73 + e0f3890 commit 9efde3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ sudo: false
language: node_js
node_js:
- 'node'
- 'lts/carbon'
- 'lts/boron'
- 'lts/carbon'
11 changes: 9 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const GruntfileEditor = require('gruntfile-editor');

function getDirectories(srcpath) {
return fs.readdirSync(srcpath).filter(function(file) {
return fs.statSync(path.join(srcpath, file)).isDirectory();
return fs.statSync(path.join(srcpath, file)).isDirectory() && file !== 'zips';
});
}

Expand Down Expand Up @@ -271,9 +271,14 @@ module.exports = class extends Generator {

// SASS CONFIG
if(this.useSass) {

// must require in the "sass" variable so it can be used on the "implementation" line below:
this.gruntfile.prependJavaScript('const sass = require(\'node-sass\');');

this.gruntfile.insertConfig('sass', `{
dist: {
options: {
implementation: sass,
sourceMap: true,
},
Expand All @@ -286,6 +291,7 @@ module.exports = class extends Generator {
}]
}
}`);
this.gruntfile.loadNpmTasks('node-sass');
this.gruntfile.loadNpmTasks('grunt-sass');
}

Expand Down Expand Up @@ -348,7 +354,8 @@ module.exports = class extends Generator {
'grunt',
'grunt-contrib-clean',
'grunt-contrib-copy',
'grunt-sass',
'node-sass',
'grunt-sass@3.0.1',
'grunt-sync',
'grunt-contrib-watch',
'esri-wab-build@^1.0.1'
Expand Down

0 comments on commit 9efde3a

Please sign in to comment.