### Prepare Hook Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Executes when packages are installed without arguments (full package installation). It sets up Husky and checks the Node.js version using ls-engines. Managed in package.json. ```shell husky install && node_modules/.bin/ls-engines ``` -------------------------------- ### Start Development Mode Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Starts the Next.js application in development mode, enabling features like fast refresh. ```shell yarn run dev ``` -------------------------------- ### Post-install Hook Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Runs after packages are installed. It generates Chakra theme type definitions and is managed in package.json. ```shell yarn run theme ``` -------------------------------- ### Start Production Mode Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Starts the Next.js application in production mode using the built files. This optimizes source file size but disables fast-refresh and sets NODE_ENV to 'production'. ```shell yarn run start ``` -------------------------------- ### Clean Up Project Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Removes specific lines or files marked with comments like '@delete:line', '@delete:file', or '@delete:folder'. This is useful for cleaning up example or development-specific content. ```shell yarn run clean-up ``` -------------------------------- ### Pre-push Hook Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Executes before pushing to the remote repository. It runs a local build to catch potential issues early, as pushes are directly related to deployment. Managed in the .husky folder. ```shell npm run build ``` -------------------------------- ### Tokript: Generate Source Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Generates templates for pages, dynamic-pages, and APIs using the Tokript CLI tool. ```shell yarn run gen:source ``` -------------------------------- ### Build Project Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Executes the build process for the Next.js project, typically used for deployment. This helps in early detection of build errors. ```shell yarn run build ``` -------------------------------- ### Tokript: Convert Images to WebP Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Converts PNG and JPG image files in the asset folder to WebP format. Consider using next/image for optimization. It also converts other extensions to WebP automatically. ```shell yarn run convert:webp ``` -------------------------------- ### Tokript: Generate API Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Generates API functions, schema types, and React-Query query/mutation definitions by querying Swagger. ```shell yarn run gen:api ``` -------------------------------- ### Pre-commit Hook Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Runs before a commit is executed. lint-staged ensures staged files pass linting and formatting. Managed by .husky and .lintstagedrc. ```shell npx lint-staged ``` -------------------------------- ### Run Tests Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Executes all {filename}.test.ts files within the src folder. The watch mode continuously monitors for changes and runs only the affected tests. ```shell yarn run test ``` ```shell yarn run test:watch ``` -------------------------------- ### Commit with Convention Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Utilizes a script to assist in writing commit messages according to the project's commit convention. ```shell yarn run commit ``` -------------------------------- ### Format Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Modifies files based on the prettier configuration to ensure consistent code formatting. ```shell yarn run format ``` -------------------------------- ### Tokript: Generate Image Object Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Creates an object containing image file paths by scanning the asset folder. ```shell yarn run gen:img ``` -------------------------------- ### Lint Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Performs file checks based on lint and prettier configurations. 'lint:staged' specifically checks only staged files according to lint-stage settings. ```shell yarn run lint ``` ```shell yarn run lint:staged ``` -------------------------------- ### Tokript: Generate Route Object Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Creates an object containing route paths by scanning the pages folder. ```shell yarn run gen:route ``` -------------------------------- ### Generate Chakra Theme Types Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Generates type definitions by querying Chakra UI theme settings. This is recommended for autocompletion, especially when applying custom colors. ```shell yarn run theme ``` ```shell yarn run theme:open ``` -------------------------------- ### Tokript: Generate Icon Components Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Creates Chakra UI icon components from SVG files found in the asset folder. For color control via props, set the SVG's fill or stroke to 'currentColor'. ```shell yarn run gen:icon ``` -------------------------------- ### Tokript: Generate Font Files Source: https://github.com/toktokhan-dev/next-init-2.0/blob/main/README.md Generates Next.js local font files from font files found in the asset folder. ```shell yarn run gen:font ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.