-
Notifications
You must be signed in to change notification settings - Fork 12k
build: Angular2App is now a class, and accepts a set of options for SCSS #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This would allow people to use something different than |
file: fileName, | ||
outFile: outFileName, | ||
includePaths: [inputPath].concat(this.options.additionalPaths || []) | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could do here:
let sassOptions = {
file: fileName,
outFile: outFileName,
includePaths: [inputPath].concat(this.options.additionalPaths || [])
};
sassOptions = Object.assign(sassOptions, this.options);
since there are many other options that can be set (examples).
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, but removed additionalPaths and copySources.
if (less) { | ||
let lessSrcTree = new Funnel(sourceDir, { | ||
include: ['**/*.less'], | ||
allowEmpty: true | ||
}); | ||
|
||
return new LESSPlugin([lessSrcTree]); | ||
return new LESSPlugin([lessSrcTree], options); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also add additional options same as you did for sass
. And then call it;
less.render(content, this.options)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (stylus) { | ||
let stylusSrcTree = new Funnel(sourceDir, { | ||
include: ['**/*.styl'], | ||
allowEmpty: true | ||
}); | ||
|
||
return new StylusPlugin([stylusSrcTree]); | ||
return new StylusPlugin([stylusSrcTree], options); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as less
and then call stylus.render(content, this.options, function(err, css) { ..
Please be careful here, this.options
should have filename
defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
86115a3
to
8152724
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The majority of the Angular2App changes are moving the code up and changing the reference to
sourceDir
to an option.