-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Dependencies check-up #1041
Comments
Read #1024 too |
My 2¢:
|
Throwing copper from me:
|
Also, seeing that eslint requires node 4 (active since october 2015) should we require node 4 as the minimum engine? |
@joshbruce the bit about expliciting dependencies was not a proposal, it just needs to be done for npm to install everything correctly. |
If we get rid of gulp and use uglify-js instead, we would have these deps:
|
The test runner already has some ES6 code that won't work in node <4. but that is just for running tests not using marked. I think we should require node 4 for the node dependents (like my travis update pr lists) but it would be nice to keep es5 for anyone using It would be really nice to be able to know if anyone is actually using It would be nice to use new language features so we should probably use uglify-es instead of uglify-js |
@Feder1co5oave: I like the "hive-mind" thing we have going on as well - it's a good team dynamic. And we also have constructive, healthy debates about the work - not each other. Really appreciating this project for those reasons. My input on updating Node minimum version: I think we had discussed updating the Node dependency elsewhere - I'm not tied to any specific version. (Wish we had a way to ask people who use Marked what version they are on to ensure better backward compatibility.) If we update the minimum version, I will just make it part of the release notes. Would it be worth discussing a transpiling option? We can write using es6 - transpile and minify to es5 and es6: marked-es5.min.js, marked-es6.min.js, marked.js kinda thing?? How do we solve this "survey/poll" situation?? Would really like to be able to get feedback from users; otherwise, we're working on best guess assumptions. (My best guess is that most people would use the |
@UziTech woah slow down a bit. I haven't noticed the test runner uses es6. Can you point me to some lines of code that do? I honestly don't like the transpile es6-to-es5 option. I like keeping it simple, and it would bring up many more dependencies. What I love about marked is that is a small, dependency-free, monolithic and simple library. @joshbruce from what I can see from the jsdelivr (cdn) page is that marked had 167k "hits" last month, marked.min.js is the main file, and version 0.3.5 is widely the most used. I'd like to find out about this, since that is really outdated. |
uglify-js can only take es5 code as input. while uglify-es allows inputting es6+ code and outputs es5+ code. we should be able to just have one marked.min.js output as es5 since all browsers are backwards compatible. |
@Feder1co5oave the test runner uses an octal literal |
I've updated the task list. |
@UziTech is it safe to publish es6 code to npm? Should we require a certain node version in that case? edit: ok so no babel is needed, uglify-es takes care of everything. Neat. I'd like to reiterate that I'm against upgrading to es6 😊 |
node 4 supports some es6. Maybe you are right if we are going to try to support nodev4, marked.js will need to be es5. |
Really though we already have to create the ES6 classes would help clean up and organize a lot of the code 😄 |
@Feder1co5oave: Upgrading the core to es6 is a much wider conversation, was just a thought as we continue moving into the future. :) It's possible that by the time we get there, es6 will "be the new black" and the conversation(s) will have been had for us. ;) Having said that, maybe there's something in using |
Ok, I'd go with getting rid of gulp and using uglify-js3 for now. It is a pretty simple workflow and if/when we want to switch to es6 it's very comforting to know that we can do that by (almost only) swapping uglify-js with uglify-es!
Could someone help in setting up the prepublish hook in npm to automate the minifying thing? Is it worth it? |
I don't think uglify-es can transpile es6 to es5. Looking at the docs (look for the 'ecma' option):
|
We could use babel with babel-plugin-uglify? |
Follow-up from #1020 (comment)
I just removed the node_modules directory and run
npm update
on a fresh working copy.This is what I get:
I think this needs some checking.
First of all, I think peerdependencies need to be explicitly installed alongside their dependants, so I'm gonna
add.eslint-plugin-import
andeslint-plugin-promise
to #1020`This was taken care of by @UziTech in Feder1co5oave#1. Thanks!
Here's the updated section in
package.json
:Other concerns I might need some help with:
eslint-config-standard
is a beta version, should we need to worry about this?gulp-util
is a deprecated package.gulp
is its dependant. It seems that gulp does not depend on gulp-util since version 4.which is still alpha. What to do?gulp-uglify
depends on it too. Update this too? I already updatedGulpfile.js
to work with v4, so that would be taken care of.graceful-fs
needs to be updated. This can be done updatinggulp
to 4.0.0minimatch
needs to be updated. Same as above, gulp 4.0.0 does this.gulp
is used only as a build system to minify the source intomarked.min.js
, via the plugingulp-uglify
. Can't we useuglify-js
directly?gulp
comes with a lot of dependenciesmarkdown.js
,markdown-it
andshowdown
are listed as devDependencies because we use them to perform comparative benchmarking. Should we bind at least the major version to make sure API don't change over time and break our benching script? In bench against commonmark instead of showdown #1019 I specified version0.x
, for example. Fixed in bench against commonmark instead of showdown #1019Gulp was brought in in #553 with the hope that it would become more useful over time. In my opinion we should just depend on uglify-js and use it as a CLI in the
build
npm script.The text was updated successfully, but these errors were encountered: