Skip to content

therockstorm/nx-template

Repository files navigation

nx-template

standard-readme compliant

TypeScript NX template with SvelteKit and Tailwind available at nx-template.pages.dev.

Table of Contents

Usage

This project uses NX for monorepo management and commitlint to enforce commit messages.

Common commands

# Install dependencies
npm install

# Run commands defined in `project.json` or `package.json` for specific projects
# Example commands may include build, lint, and test
npx nx run [PROJECT]:[COMMAND]

# For example, start the dev server for the `site` project
npx nx dev site --open

# Prior to opening a PR, format, build, lint, and test affected projects
# Only `nx.json` `cacheableOperations` are valid for use with `affected`
npx nx format:write && \
npx nx affected:build && \
npx nx affected:lint && \
npx nx affected:test

# Generate new buildable library
npx nx generate @nrwl/node:library [PROJECT] --buildable

# Rename a project
npx nx generate move [NEW_NAME] --projectName [CURRENT_NAME]

# Show dependency graph
npx nx dep-graph

# To upgrade NX,
npx nx migrate @nrwl/workspace@latest && \
npm install && \
npx nx migrate --run-migrations

Contributing

If editing README, conform to standard-readme.