thuliteio / thulite

Web framework designed for speed, security, and SEO — all powered by Hugo and npm.
https://thulite.io
MIT License
349 stars 36 forks source link

Split (production) dependencies and additional devDependencies #157

Closed sean-au closed 3 years ago

sean-au commented 3 years ago

Summary

Split dependencies based on whether they are needed for production build (local + netlify) or not. Configure netlify.toml to NOT install devDependencies for build.

I am happy to help, I am already doing this (on my modified HYAS theme)

Basic example

"devDependencies": { "@babel/cli": "^7.14", "@babel/core": "^7.14", "@babel/preset-env": "^7.14", "@fullhuman/postcss-purgecss": "^4.0", "auto-changelog": "^2.3.0", "autoprefixer": "^10.2", "bootstrap": "^5.0", "eslint": "^7.29", "exec-bin": "^1.0.0", "hugo-installer": "^3.0.1", "instant.page": "^5.1", "lazysizes": "^5.3", "markdownlint-cli": "^0.27", "postcss": "^8.3", "postcss-cli": "^8.3", "purgecss-whitelister": "^2.4", "shx": "^0.3.3", "stylelint": "^13.13", "stylelint-config-standard": "^22.0" },

Motivation

Speed up netlify build times,

h-enk commented 3 years ago

@sean-pwd, good one! If you could help, yes please.

sean-au commented 3 years ago

PR created https://github.com/h-enk/hyas/pull/159