sezna / nps

NPM Package Scripts -- All the benefits of npm scripts without the cost of a bloated package.json and limits of json
MIT License
1.43k stars 93 forks source link

BUG: nps init does not camelCase start:* scripts #186

Closed samijaber closed 6 years ago

samijaber commented 6 years ago

package.json file:

{
  "scripts": {
    "start": "echo start",
    "start:stuff": "echo start:stuff",
    "start:foo-bar": "echo start:foo-bar"
  }
}

The command executed:

nps init

The output:

module.exports = {
  scripts: {
    default: {
      default: 'echo start',
      stuff: 'echo start:stuff',
      foo-bar: 'echo start:foo-bar'
    }
  }
};

Problem description: foo-bar should be fooBar, which means the package-scripts.js file generated by nps init is broken/invalid JS.

Suggested solution: Raised a PR at https://github.com/kentcdodds/nps/pull/185

kentcdodds commented 6 years ago

Thanks!