Conversation
|
Would a regex like that be maintainable for larger projects compared to something like an array which is used for other comparable project settings in polymer-cli? eg: "js": {
"minify": true,
"ignore": [
"*.min.js",
"firebase-database.js"
]
}Also, is this something that should be set and repeated in each build or set globally for all builds? |
I find regex to be more practical here - but open to change this to an Array if it gets more upvotes.
It is a per build config. |
|
I really like wildcards/regex, specially for things like |
|
+1 |
|
PR updated based on @jsilvermist suggestion |
|
In the mean time, my solution around it is to do an extra step to copy/overwrite from the source, to the build directory after the build process is completed. |
|
@usergenic - thanks for 1.5.5 release. Any chance this one gets reviews for the next one ? |
|
can this be merged? as it seems to be the only usable fix for #886 and #633 |
|
@jogibear9988 I was wondering if this should ever be fixed on the polymer-cli side? Wouldn't it be better to file corresponding upstream issues to Anyway, I must say I don't use CLI for app projects due to the lack of flexibility and extending its configuration options looks good to me. |
|
don‘t know in which part of the cli this happens. if it‘s a babili error, then it should be fixed there! maybe it‘s already fixed there? (don‘t know if polymer cli uses newest version) (newest name is babel minify) |
|
The original issue should be revised once #847 gets merged. /cc @TimvdLippe |
|
@usergenic - any chance to get this reviewed ? thanks |
|
I've tested after the merge of #847, JQuery for example is still broken when minimized via polymer-cli |
|
@usergenic @FredKSchott can this be reviewed? this is a really needed fix. without that many can not minify |
|
@usergenic @FredKSchott @justinfagnani Any chance to get this reviewed ?
|
|
The Team was triggered to look at that issue, see: Polymer/polymer#4931 |
|
@christophe-g can you rebase so it compiles again? |
fbf6da5 to
e88d8dd
Compare
|
@jogibear9988 - sure, done. |
|
@christophe-g i think most of the issues why this is needed will be fixed in next version of babel minify (see babel/minify@04e4679 and babel/minify#733), but I think this should be merged (so I have a quick solution if a file could not be minifyed) ... @TimvdLippe said here Polymer/polymer#4931 we should ping this PR if we get no response from the team .... don't know how to ping... |
|
@jogibear9988 - thanks! I am very much in doubt next version of babel minify will solve all issues I currently have building my app, without the need of excluding some of the sources. For instance, some modules are compiled versions of C/C++ libraries (http://kripken.github.io/emscripten-site) that make polymer-cli crash with a fatal error, similar to https://github.com/Polymer/polymer-cli/issues/623. |
…ched agains file path, or exact filename)
a76bb26 to
4eb24c6
Compare
|
@jogibear9988 ping |
|
I encountered the same issue as @christophe-g . Building polymer-cli from this PR and using the new JS ignore option was a solution to make building work with both already minified and non-already minified JS files. Getting this PR merged or having another officially supported way to fix the original issue would be nice. |
|
@usergenic Any update regarding this? It would be nice to have this merged or something similar implemented in the CLI. |
|
Hey everyone, sorry for the delay on this. Reviewing this today. Seems like a useful if not necessary feature. |
|
We should also check to switch to babel minify nightly, because it has many bugs fixed |
|
Okay, reviewing this, there are some test failures here and the proposed changes technically require an update to Thanks for your patience, everyone. |
|
Reimplemented as #952. Note exclude paths are not glob-enabled but rather act as prefixes so you can exclude folders etc. |
|
On second though, I have added back matcher for wildcards. Now *.min.js works. |
|
Also note that #952 does not have a command-line switch as part of the update. Use polymer.json build config for that or we can file subsequent PR for an override flag. |
|
Can you also look to switch to babel minify nightly, cause many of the issues because this is needed are fix in the nightly version. And it does not seem that they'll create a new release! |
|
closing as implemented by #952. @usergenic - thanks for lifting up the original idea! |
Adding a way to skip files in js minification process.
Should help addressing issues like #701.
Example (will skip all
*.min.jsfiles andfirebase-database.js):