Standardize NPM Scripts #40952
Labels
focus: monorepo infrastructure
Issues and PRs related to monorepo tooling.
team: Kirigami & Origami
type: task
The issue is an internally driven task (e.g. from another A8c team).
In order to introduce more consistency into our monorepo we are going to move our package scripts towards a consistent naming scheme. As part of this effort we are going to remove superfluous scripts in favor of using some tools directly. This will make it easier for developers to know what commands to use in each package.
Scripts
Building
build:project
: Builds the project itself without any of the dependencies.build
: Builds the project and all of its dependencies according to the dependency graph.watch:build
: Builds the project and then watches it for changes to automatically rebuild.Linting
lint:js
: Lints any of the JavaScript/TypeScript files in the project (if there are any). This useslint-staged
to only run against files that have changed.lint:php
: Lints any of the PHP files in the project (if there are any). This useslint-staged
to only run against files that have changed.lint
: Lints all of the languages present in the package. Use the regex/^lint:(?!fix)[a-z0-9\-]+$/
to run against language linting but not:fix
scripts.lint:js:fix
: Fixes any JS linting errors.lint:php:fix
: Fixes any PHP linting errors.lint:fix
: Fixes any linting errors. Use the regex^lint:[a-z0-9\-]+:fix$
to run only against fix linting scripts.Development Environment
env
: Callswp-env
directly. There's not much value in commands likeenv:start
since the command is justenv start
like this.Testing
test:js
: Runs any JavaScript tests.test:php
: Runs any PHP tests.test:e2e
: Runs any E2E tests.test:api
: Runs any API tests.test:performance
: Runs any performance tests.Acceptance Criteria
The text was updated successfully, but these errors were encountered: