Initializing ES6 module project with npm

191 views Asked by At

Is there a way to have npm init directly set up an ES6 module, setting "type":"module" in package.json (or another npm command to set it)?

I always just modify package.json manually and add it, but I'm wondering if there's a way to do it directly with npm on the command line so I don't have to keep doing that. Just a convenience thing. Plus if I can do it with npm it's easier to automate.

0

There are 0 answers