Conversation
|
Once this, and #11 (comment) is done, let's aim for integration into PLE and then we can add tests. |
|
Hi, would you mind rebasing? And just to check, this should be merged before #17 right? Just checking and cc'ing @Shulammite-Aso. Thanks!!! |
|
I rebased and manually fixed the conflicts for /home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/tools/node.js:42
sys.error("WARN: " + txt);
^
TypeError: sys.error is not a function
at Function.UglifyJS.AST_Node.warn_function (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/tools/node.js:42:9)
at Function.AST_Node.warn (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/ast.js:110:18)
at Compressor.warn (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/compress.js:87:27)
at TreeTransformer.before (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/compress.js:1063:48)
at AST_Function.transform (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/transform.js:61:35)
at AST_Function.drop_unused (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/compress.js:1171:18)
at Compressor.before (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/compress.js:99:18)
at AST_Function.transform (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/transform.js:61:35)
at /home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/transform.js:80:25
at doit (/home/cypher/Documents/dev/outreachy/woofmark/node_modules/uglify-js/lib/utils.js:121:23)which has mainly to do with |
|
@Shreyaa-sharmaa will things still work fine if you remove the dist files? I mean, not stage them at all? |
|
The |
sagarpreet-chadha
left a comment
There was a problem hiding this comment.
Hi @Shreyaa-sharmaa ,
Ideally we should not have dist folder commited in github repo as it is hard to track.
While publishing to npm, dist folder should be generated by publisher. Otherwise there is no point to keep dist folder.
However, as we are keeping dist folder in this repo...so the trick is to remove the dist file content and run the grunt command again to generate them fresh.
|
Thanks for your patience on this. @sagarpreet-chadha is very correct. We've traditionally skipped this approach and i think it causes a lot of issues. But if we can clearly document the npmjs publication steps, either by writing in the README or in an NPM task, OR (ideally) both -- it'd help us be really consistent on this. Thank you so much! In the short term i'm sorry but if you could rebuild and rebase one more time, that would be great. 😭 |
|
A little progress on this one, Also, |
|
It sounds good to me! @sagarpreet-chadha, you've encountered issues like
this before I think. What do you think?
…On Wed, Jul 22, 2020 at 11:34 AM Shreya Sharma ***@***.***> wrote:
A little progress on this one, uglify-js doesn't support ES6, never has.
Now this leads to errors for using const and let. Adding /* jshint
esnext: true */ on top of the JS file (workaround found in a github
thread) bypassed those errors but received another one for unrecognised
token. I believe that we should look at other options with ES6 support as a
more permanent option. What do you all think? Terser is a possible
replacement. Quoting terser's readme:
terser is a fork of uglify-es that mostly retains API and CLI compatibility with uglify-es and ***@***.*** ```
Also, `npm run build` gives a few errors in the tests as Nitin mentioned in #11 (comment) please have a look.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J3LDR43TFLOPPOQJO3R44AUFANCNFSM4OZMAWWQ>
.
|
|
Oh okay, i think we should have es6 support in this library so that new JS developers can also contribute in this library, so yes we should remove uglifier js and use any new compressing package which supports es6 and is easy to use. Thanks! |
|
Closing this one. |
Committing after running
npm run build. Updates thedist/folder and minor fix to heading test.