-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
--preprocess patterns improvements #90
Comments
When considering globs, how about the ones used in gitignore? |
@baremetalfreak I don't mind, although I'm not sure if the |
how about adding an ignore flag instead of noop?
|
@matthiaskern this makes sense. Although still has a couple of problems. Consider the following example (say the project is fpack --preprocess='node_modules/my-other-package/*.js' \
--preprocess-ignore='node_modules/*.js' \
--preprocess='*.js' When preprocess-ignore should be applied? If the answer is before everything, then we're going to lose I like the fpack --preprocess='node_modules/my-other-package/*.js' \
--preprocess='node_modules/*.js:ignore' \
--preprocess='*.js' |
@zindel seems like a good compromise. |
While working with fastpack I've noticed a few shortcomings with
--preprocess
configuration. Here is a couple thoughts how we could make it a little easier:Make
--preprocess
entries be mutually exclusive, where the first entry in the list gets the priority. This, by the way, is already true inmaster
. Here is an example of usage:In other words, "use css modules for all the css files except of global.css".
Add
noop
preprocessor which would do nothing, just return the source unmodified. It is special in a way, that it can only be used exclusively and cannot be a part of the chain. For example:The command above says: use
builtin
preprocessor for all the JabaScript files except of those in thenode_modules
directory. So, effectively, this mimics the"exclude"
capability in webpack.Finally, what if we use
glob
patterns instead of (or alongside with) regular expressions. For example, the above example would be specified as:There are couple limitations/specialities about this change though:
*
should match all the characters (including/
), otherwise it'd be impossible to specify arbitrary paths*.js
would partially match thelib.js/some.css
, which is unlikely what is supposed by the user.So, open questions:
The text was updated successfully, but these errors were encountered: