Skip to content

Implement an init command #11

@fastfrwrd

Description

@fastfrwrd

We think it would be valuable to have a web-scripts init script which takes care of a few things.

  • installs @spotify/web-scripts and husky as devDepdendencies if they are not currently a dependency or devDependency.
    • the package would need to install itself in case it was invoked via npx or was a global dep.
  • adds npm scripts for build, test, lint, commit, and release if you don't already have them defined.
  • adds the hooks for precommit and commitmsg in package.json (again, if neither is defined already)
  • set main, module, and types in package.json to conform with web-scripts build's output.
  • create tsconfig.json, .eslintrc.js, prettier.config.js, jest.config.js if they do not exist for your editor integrations, as described in the README.

We need to add an integration test for the init command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions