Skip to content

Commit

Permalink
Add PurgeCSS to the docs to strip out unused bootstrap.min.css styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jun 4, 2020
1 parent 0b33cf6 commit 724bb23
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/assets/scss/_ads.scss
Expand Up @@ -33,6 +33,7 @@

.carbon-text {
margin-bottom: .5rem;
text-decoration: none;

@media (min-width: 768px) {
font-size: .875rem;
Expand Down
2 changes: 1 addition & 1 deletion docs/static/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -20,6 +20,7 @@
"start": "npm run docs-serve",
"docs-serve": "hugo server --port 4000 --disableFastRender",
"docs-build": "hugo --cleanDestinationDir",
"docs-purge": "npm run docs-build && npx purgecss --css docs/static/assets/css/bootstrap.min.css --content _site/**/*.html,_site/index.html --output docs/static/assets/css/",
"pages": "node build/build-pages.js",
"icons": "node build/build-svgs.js",
"icons-zip": "cross-env-shell \"shx rm -rf bootstrap-icons-$npm_package_version && shx cp -r icons/ bootstrap-icons-$npm_package_version && zip -r9 bootstrap-icons-$npm_package_version.zip bootstrap-icons-$npm_package_version && shx rm -rf bootstrap-icons-$npm_package_version\"",
Expand All @@ -46,6 +47,7 @@
"linkinator": "^2.1.1",
"npm-run-all": "^4.1.5",
"postcss-cli": "^7.1.1",
"purgecss": "^2.2.1",
"shx": "^0.3.2",
"stylelint": "^13.5.0",
"stylelint-config-twbs-bootstrap": "^2.0.3",
Expand Down

0 comments on commit 724bb23

Please sign in to comment.