Creating Optimization of I Think About Various Things Necessary for the Development of Recently Frontend & Designs.
ใผ
- Web App.
- Static Website.
ใผ
- Clone or Download This Repository in Project Root Dir.
- When Creating Simple Web Application.
- Put React Simple Starter in
resourceDir. - ->
yarn setup:spa
- Put React Simple Starter in
- When Creating Static Website.
- Put TypeScript Templates / Components Base Sass Template / EJS Template in
resourceDir. - ->
yarn setup:static
- Put TypeScript Templates / Components Base Sass Template / EJS Template in
- Setup Each Files Below.
- ->
package.json/tsconfig.json/.eslintrc.yml/.github/workflows/delivery.yml && ci.yml
- ->
- Initialize package.json
- ->
yarn init
- ->
- Install All Modules.
- ->
yarnoryarn install
- ->
- When Creating Simple Web Application.
- Development ->
yarn dev - Build ->
yarn build
- Development ->
- When Creating Static Website.
- ->
gulp
- ->
- Use Repositories...
Settings->Branches->Branch protection rules- ->
Branch name pattern- Add
develop
- Add
- ->
Protect matching branches- Check
Require status checks to pass before merging - Check
Require branches to be up to date before merging - Check
Build Test - Check
Jest & ESLint
- Check
- ->
- Use GitHub Actions. ( Deployment for Github Pages or Netlify or FTP )
- When Pull Requests to the
developBranch are Closed & Merged,
It Will Auto Build indeliveryDirectory of the Corresponding Branch. - Contents of
deliveryDirectory are Deployed tomasterBranch. - Use GitHub Pages. -> Displayed on GitHub Pages.
- Use Netlify. -> Deploys via Netlify.
- Use FTP. -> Deploys via FTP.
- When Pull Requests to the
Choose Which Type of Build & Deployment, Setting in .github/workflows/delivery.yml
Even When Using SSG with Gatsby.
- When Commit & Push to the Pull Request, ( Only Pull Request to
developBranch )- When There is a File Containing Test Code in
resource/testsDirectory, Jest Will Launch. - Statically Analyze Code with ESLint. ( Before That, Husky & Lint Staged also Uses ESLint ๐ฃ )
- Test the Build at Every Commit.
- When There is a File Containing Test Code in
Choose Launch Jest & ESLint & Test Build & Which Type of Build, Setting in .github/workflows/ci.yml
- Check to Latest Version of Modules on package.json ( ncu )
- ->
yarn check-pkg
- ->
- Update to Latest Version of Modules on package.json ( ncu -u )
- ->
yarn update-pkg
- ->
- Re:Install All Modules. ( rm yarn.lock && rm -rf node_modules && yarn install )
- ->
yarn re-install
- ->
This Update Method's for Development by Personal Work ๐ค
To See Which Modules Can to Be Updated Which Version.
Don't Use yarn install --no-lockfile and yarn install --pure-lockfile
Because Want to Use Cache on GitHub Actions.
When Development with Multiple People, Use yarn upgrade
(Don't Remove yarn.lock, for Eliminate Difference in Version of Each Modules.)
- If HardSourceWebpackPlugin's Warning Displayed on Terminal.
๐[hardsource:***] Could not freeze...
Delete HardSourceWebpackPlugin's Cache Dir.- ->
yarn remove-fasters-cache
- ->
ใผ
- Styled Components V5's
createGlobalStyleDoes Not Work, When@import's (CSS Import, Google Web Fonts etc.) Written Inside. For That, Use V4's Latest. - @types/styled-components When Install Latest Version, @types/react-native's Installed Together.
Temporary -> Add.yarncleanIgnoring@types/react-native - Styled Components Autofix Stylelint Doesn't Work Yet.
Maybe Auto Fix of Stylelint Doesn't Work in Template Literals.
So, Display Only Warning on the Terminal. - When Use
gsapV3 withTypeScript, Don't Currently Install@types/gsap
That Will Cause Conflicts as Types are Already Included in Package.