Npm commands (Scripts)
Npm scripts simplify development and production workflows such as building, running the dev server, linting code, or generating icon fonts. These scripts ensure consistency across tasks and reduce manual setup effort.
List of available Npm commands (Scripts)
Command | Description |
---|---|
npm install | Installs all Node.js packages defined in package.json . This includes both runtime and development dependencies. |
npm run dev | Starts the Next.js development server on localhost with hot module replacement. This is the main script used during template customization and development. |
npm run build | Builds the application for production by compiling and optimizing all pages, JavaScript, and CSS using Next.js. The output is generated in the .next folder. |
npm start | Runs the Next.js app in production mode. Make sure to run npm run build before using this command. |
npm run lint | Lints the project files using the ESLint configuration provided in the project. Helps ensure code consistency and best practices. |
npm run build-icon-font | Generates a custom icon font and accompanying CSS file from SVG icons located in the src/icons/svg directory. The script is located in scripts/icon-font.mjs . |