Created
December 16, 2015 01:26
-
-
Save stowball/47c72aca31b835398dd4 to your computer and use it in GitHub Desktop.
grunt-sass simplified node_modules imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var path = require('path'); | |
| function importPaths(url, file, done) { | |
| try { | |
| var newPath = path.relative(path.dirname(file), require.resolve(url + '.scss')); | |
| return done({ file: newPath }) | |
| } catch (e) { | |
| return done({ file: url}) | |
| } | |
| } | |
| module.exports = { | |
| tvGuide: { | |
| 'options': { | |
| 'outputStyle' : 'compressed', | |
| 'sourceMap' : true, | |
| 'importer' : importPaths | |
| }, | |
| 'files': [{ | |
| 'expand' : true, | |
| 'cwd' : 'src/scss', | |
| 'src' : '**/*.scss', | |
| 'dest' : 'dist/css', | |
| 'ext' : '.min.css' | |
| }] | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment