Open ofirrifo opened 7 years ago
const sass = require('node-sass');
const inlineNg2Template = require('gulp-inline-ng2-template');
const styleProcessor = (stylePath, ext, styleFile, callback) => {
if (ext[0] === '.scss') {
let sassObj = sass.renderSync({ file: stylePath });
if (sassObj && sassObj['css']){
styleFile = sassObj.css.toString('utf8');
}
}
return callback(null, styleFile);
};
const OPTIONS = {
base: 'src',
useRelativePaths: true,
styleProcessor: styleProcessor
};
const ng2InlineTemplate = () => {
return inlineNg2Template(OPTIONS);
};
exports.ng2InlineTemplate = ng2InlineTemplate;
Hi,
Thanks for great gulp package.
How can I use this gulp package with scss files
Thanks