Explicitly use absolute path for gulp task "style:gen"

- change to __dirname since "./" means relative to current working directory (Closes #1213)
master
Neil Kim Gardose 2015-07-28 19:27:50 +08:00 committed by Addy Osmani
parent 8e7ee50b92
commit 14ac582a52
1 changed files with 2 additions and 1 deletions

View File

@ -707,10 +707,11 @@ gulp.task('templates', ['templates:static', 'templates:images', 'templates:mdl',
gulp.task('styles:gen', ['styles'], function() {
var MaterialCustomizer = require('./docs/_assets/customizer.js');
var templatePath = path.join(__dirname, 'dist', 'material.min.css.template');
// TODO: This task needs refactoring once we turn MaterialCustomizer
// into a proper Node module.
var mc = new MaterialCustomizer();
mc.template = fs.readFileSync('./dist/material.min.css.template').toString();
mc.template = fs.readFileSync(templatePath).toString();
var stream = gulp.src('');
mc.paletteIndices.forEach(function(primary) {