sveltejs / svelte-cli

Command line interface for Svelte
MIT License
104 stars 18 forks source link

Add engines field to package.json to document supported nodes #6

Closed doug-wade closed 7 years ago

doug-wade commented 7 years ago

Addresses #4. Now, when users on older, unsupported nodes will get a warning that looks something like:

npm WARN engine svelte-cli@1.0.2: wanted: {"node":">=6.0.0"} (current: {
"node":"4.2.1","npm":"2.14.7"})
doug-wade commented 7 years ago

This is a not-super-user-friendly resolution to this issue, since node 4 will be supported for some time. If we'd like, I can set up babelification to support older nodes without re-writing the existing code. I figured in the mean time, we can at least warn users of older nodes

Rich-Harris commented 7 years ago

Thanks! you're right, we need to ship a version that runs in Node 4 (and older browsers, for the REPL). Will open an issue on the main repo