rescript-lang.org icon indicating copy to clipboard operation
rescript-lang.org copied to clipboard

Update installation guilde: Rename convenience npm script from res:start to res:dev

Open DZakh opened this issue 3 years ago • 2 comments

The logic behind the PR is that recently the start script often started being used in the context of running a built application. While scripts for development are usually called dev or watch.

  • https://docs.npmjs.com/cli/v8/using-npm/scripts#npm-start

DZakh avatar Oct 11 '22 16:10 DZakh

For the sake of semantics, I'd rather have res:watch than res:dev, since the latter would look similar to npm run dev which is very common in e.g. a NextJS project.

ryyppy avatar Oct 13 '22 13:10 ryyppy

For the sake of semantics, I'd rather have res:watch than res:dev, since the latter would look similar to npm run dev which is very common in e.g. a NextJS project.

That's actually the point. So when you start developing a nextjs application, you'd run commands with similar names/meanings:

  • npm run relay:dev + npm run res:dev + npm run next:dev
  • npm run res:dev + npm run next:dev
  • npm run res:dev + npm run dev
  • npm run dev where "dev": "npm-run-all res:build --parallel --print-label res:dev next:dev"

DZakh avatar Oct 13 '22 15:10 DZakh