Skip to content

Config and scripts for managing my personal JavaScript/Typescript projects

License

Notifications You must be signed in to change notification settings

rafaelrozon/rzn-scripts

Repository files navigation

rzn-scripts

CLI utilities for common tasks and configurations for my projects


Instalation

yarn add -D rzn-scripts

Configuration

Create ~/.rzn-scripts/.env and add:

USER_NAME="..."
USER_EMAIL="..."

Usage

Available commands:

Usage: rzn-scripts [options] [command]

Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  setup
  help [command]  display help for command

Setup command

Usage: rzn-scripts setup [options] [command]

Options:
  -h, --help       display help for command

Commands:
  editorconfig     Add editorconfig file
  git              Setup git user name and email
  devDependencies  Install basic packages for development
  eslint           Setup ESLint for Typescript with sensible defaults
  jest             Add default config and run script
  formatPackage    Add format-package to postinstall hook
  husky            Add Husky config
  prettier         Add Prettier config file and run scripts
  commitizen       Add Commitizen config
  nvm              Add NVM config
  help [command]   display help for command

Supported configuration for:

  • ESLint
    • eslint-config-airbnb
    • Typescript support
    • Prettier
    • errors are off. I don't need formatting errors to distract me while coding. Before commiting the code, everything is formatted automatically.
  • EditorConfig
  • Jest with support for Typescript
  • Commitizen
  • NVM setup for 12.18.3 Node version
  • Prettier
  • Git hooks
    • run lint before commit
    • run tests before push
    • run Commitizen on commit
  • format-package

Inspiration

This was inspired by kcd-scripts

TODO

  • evaluate if configs should be converted to presets
  • publish to npm
  • lock yarn version ?
  • update README with documentation output by commander
  • check existence of .env file before running any commands
  • check spotify/web-scripts