-
Notifications
You must be signed in to change notification settings - Fork 3
05. Configuration
Vlado Bosnjak edited this page Jul 16, 2023
·
5 revisions
Environment variables are saved in .env.local during setup.
Entry points are save in src/entry.
Js/CSS filename is generated based on folder/filename.[ext]
structure
Duplicate folder src/entry/common
and rename folder to eg pages
This will generate:
/dist/css/pages-common.css
/dist/js/pages-common.js
You rename pages/common.js
to pages/cutom-page-template.js
This will generate:
/dist/css/pages-cutom-page-template.css
/dist/js/pages-cutom-page-template.js
This would allow you to dynamically enqueue file based on specific page template. You can generate as many as you like, based on your needs.
-
yarn dev
— Start your development process, this will compile and live reload your browser or inject css when possible while in development -
yarn build
— Compile and optimize the files -
yarn build:prod
— Compile and optimize for production
-
yarn clean
— Remove yourdist
folder -
yarn reinit
— Remove yourdist
andnode_modules
folder and reinstall node dependencies -
yarn lint
— Run ESLint/Stylelint against your source files and build scripts -
yarn lint:scripts
— Run ESLint against your source files and build scripts -
yarn lint:styles
— Run Stylelint against your source files