Use purgecss on output build
This commit is contained in:
parent
3c84f45038
commit
698bb39dd1
3 changed files with 11 additions and 4 deletions
7
.github/workflows/deployment.yml
vendored
7
.github/workflows/deployment.yml
vendored
|
@ -20,12 +20,15 @@ jobs:
|
||||||
- name: "Install NPM dependencies"
|
- name: "Install NPM dependencies"
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: "Install gridsome CLI"
|
- name: "Install CLI tools"
|
||||||
run: "npm install --global @gridsome/cli"
|
run: "npm install --global @gridsome/cli purgecss"
|
||||||
|
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: "PurgeCSS pass"
|
||||||
|
run: purgecss --config purgecss.config.js --output dist/assets/css/
|
||||||
|
|
||||||
- name: "Deploy"
|
- name: "Deploy"
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
"explore": "gridsome explore"
|
"explore": "gridsome explore"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gridsome/plugin-sitemap": "^0.2.3",
|
|
||||||
"gridsome": "^0.7.0",
|
"gridsome": "^0.7.0",
|
||||||
"gridsome-plugin-robots-txt": "^1.0.2",
|
|
||||||
"vuetify": "^1.0.0"
|
"vuetify": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@gridsome/plugin-sitemap": "^0.2.3",
|
||||||
|
"gridsome-plugin-robots-txt": "^1.0.2",
|
||||||
"webpack-node-externals": "^1.7.2"
|
"webpack-node-externals": "^1.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
purgecss.config.js
Normal file
4
purgecss.config.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
content: ['dist/**/*.html', 'dist/assets/js/*.js'],
|
||||||
|
css: ['dist/assets/css/*.css']
|
||||||
|
}
|
Loading…
Reference in a new issue