This is a rewrite of Supreme in Rust.
brew install opendevtools/supreme/supreme
All commands with documentation can be found by running supreme --help.
Add a .gitignore with some common defaults.
supreme add git
Add GraphQL Code Generator and plugins for generation of TypeScript types.
Installed npm dependencies: graphql, @graphql-codegen/cli, @graphql-codegen/introspection, @graphql-codegen/typescript, @graphql-codegen/typescript-resolvers
supreme add graphql-codegen
Add a husky configuration containing a pre-commit hook that runs pretty-quick. This formats all staged files, that are supported, using Prettier.
Installed npm dependencies: husky, pretty-quick
supreme add husky
Add a .nvmrc with the current running Node version
supreme add nvm
Add a .prettierrc with some defaults.
Installed npm dependencies: prettier
supreme add prettier
Install dependencies and configuration for Jest testing. It also adds scripts in package.json for running tests locally and in CI environments.
- Installed npm dependencies (JavaScript):
jest,jest-watch-typeahead,is-ci-cli - Installed npm dependencies (ReScript):
@glennsl/bs-jest,jest-watch-typeahead,is-ci-cli
supreme add jest
Install dependencies and configuration for Tailwind CSS.
- Installed npm dependencies:
tailwindcss,postcss,autoprefixer
supreme add tailwind
Display the current configuration
supreme config list
Update a configuration setting
--node- Set if you want to usenpm,yarn, orpnpmfor installing Node dependencies [Possible values:npm,yarn,pnpm]
supreme config set --node yarn
Install any Node package. Automatically selects npm, yarn, or pnpm depending on
which lockfile exists (or falls back to what's set in the config). If no arguments are passed, it installs all packages in package.json.
// Install all dependencies
supreme install
// Install one package
supreme install jest
// Install multiple
supreme install jest prettier
// Install with bash expansion
supreme install jest prettier @types/{jest,react}
Tip: Add aliases for easy access. For instance, ni (alias ni=supreme install) and nisd (alias nisd=supreme install --dev).
Create workflows for GitHub actions. It automatically detects these languages and tweaks the config files:
- JavaScript / TypeScript
- ReScript
- Rust
pr_check.yml- Run tests and linting on pull requests targeting main branchrelease.yml- Run tests and publishes a new release on push to main branch
--no-npm,-n- Turn off@semantic-release/npmin.releasercand removeNPM_TOKENsecret fromrelease.yml--project,-p- Pass a supported project type [Possible values:javascript,rescript,rust]
Environment variables are set inside GitHub repository settings -> Secrets.
GITHUB_TOKEN- Added automatically by GitHub for each repoNPM_TOKEN(optional) - If you wish to publish the package/app to npm. If you don't want to build to npm then use the--no-npmflag.
supreme github-actions
Create a ReScript project with Tailwind.
supreme rescript my-project-name
You'll get some instructions after the project has been created
cd my-project-namenpm installnpm start(start the compiler)npm run server(in another terminal window, start development server)
Create a GraphQL project.
supreme graphql my-project-name
You'll get some instructions after the project has been created
cd my-project-namenpm installnpm run dev(start the development server)
List all available package.json scripts, select
one and supreme will run it.
supreme run
Uninstall any Node package. Automatically selects npm, yarn, or pnpm depending on
which lockfile exists (or falls back to what's set in the config).
// Uninstall one package
supreme uninstall jest
// Uninstall multiple
supreme uninstall jest prettier
// Uninstall with bash expansion
supreme uninstall jest prettier @types/{jest,react}
Tip: Add an alias for easy access. For instance, nu (alias nu=supreme uninstall).
Update Node packages. Automatically selects npm, yarn, or pnpm depending on
which lockfile exists (or falls back to what's set in the config).
supreme update-dependencies
Add or remove packages inside Yarn workspaces.
Note: Only works with a packages folder for now.
// Lists and allows the user to select which package to install to.
// Then prompts the user for a dependency to install.
supreme workspace add
// Lists and allows the user to select which package to install to.
// Installs the provided dependency. Works with bash expansion.
supreme workspace add @types/{jest,node}
// Remove dependency from selected package
supreme workspace remove
Tip: Add aliases for easy access. For instance, nw (alias nw=supreme workspace add) and nwsd (alias nwsd=supreme workspace add --dev)
