NPM Scripts
Elevate web includes a set of initial npm scripts to be used by developers:
pnpm run dev
Start the local development server. Check Next.js docs for reference.
pnpm run build
Build the website, generates static paths as well as the server files. Check Next.js docs for reference.
pnpm start
Serve the website previously compiled by npm run build. Check Next.js docs for reference.
pnpm run lint:js
Lint the project JS/TS code using ESLint.
Check Next.js docs for reference.
Check the .eslintrc.json
file to check the current setup
pnpm run lint:css
Lint the project CSS/Styles using Styleling.
Check the .stylelintrc.json
file to check the current setup
pnpm run lint:tsc
execute tsc on the Application files.
Check the tsconfig.json
file to check the current setup
pnpm run lint:all
Execute all the other lint scripts, used on the validation task
pnpm run validation
Execute all the validation related tasks (lint:all
+ test:coverage
)
pnpm test
Run all the project tests using jest
pnpm test:coverage
Run all the project tests using jest and create a coverage report
pnpm test:api:fetcher
Starts a express server to test routes requests using fetcher utility. Express server will run on port 4546.
pnpm run e2e
Run the project E2E tests using Playwright It requires the application to be running as configured in the test specs
pnpm run e2e:ui
Open the Playwright UI with the projects specs ready to be executed
pnpm run docs
Run docusaurus inside the docs
directory on port 3333
.
pnpm run storybook
Run the components documentation using Storybook
pnpm run storybook:build
Build the components documentation using Storybook
pnpm run lighthouse
Execute performance report analysis using Lighthouse
pnpm run lighthouse:view
Execute performance report analysis using Lighthouse and open report
pnpm run token:fetch
Runs the token extraction from Figma process and creates the proper json files into tokens/output
directory
pnpm run token:transform
Uses Style Dictionary to transform the token from the token:fetch
export json files into a single css files filled with all the variables