Skip to content

Commit

Permalink
purgecss with some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffSpies committed Sep 7, 2021
1 parent 9180917 commit ad4a29c
Show file tree
Hide file tree
Showing 4 changed files with 365 additions and 11 deletions.
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"test": "echo \"No test specified\" && exit 0",
"build": "quasar build",
"build-ssr": "quasar build -m ssr",
"build-pwa": "quasar build -m pwa"
"build-pwa": "quasar build -m pwa",
"purge": "purgecss -c purgecss.config.js"
},
"dependencies": {
"@quasar/extras": "^1.10.12",
Expand Down
20 changes: 11 additions & 9 deletions client/purgecss.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module.exports = {
content: ['../build/spa/js/*.js'],
css: ['../build/spa/css/*.css'],
output: ['../build/spa/css/'],
fontFace: true,
keyframes: true,
variables: true,
content: [
'../build/spa/index.html',
'../build/spa/statics/**/*.js',
'../build/spa/js/*.js',
'./src/pages/**/*.vue',
'./src/layouts/**/*.vue',
'./src/components/**/*.vue'
],
rejected: true,
safelist: {
standard: [/fixed-.*/, /absolute-.*/, /q-btn.*/, /justify-.*/]
}
css: ['../build/spa/css/*.css'],
output: ['../build/spa/css'],
safelist: [/^q-/, /^bg/, /^main/]
}
7 changes: 6 additions & 1 deletion client/src/pages/PublicLanding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
</template>

<style scoped>
/* @import '../statics/edu.nd/reduced.css'; */
@import '../statics/edu.nd/conductor.nd.edu/stylesheets/themes/ndt/v3/ndt.css';
@import '../statics/edu.nd/ndwebgroup.github.io/webtheme/assets/stylesheets/syntax.css';
@import '../statics/edu.nd/ndwebgroup.github.io/webtheme/assets/stylesheets/v3/site.css';
Expand Down Expand Up @@ -261,7 +262,7 @@ export default {
meta () {
return {
// sets document title
title: 'Landing Page',
title: 'PACE - Publication Activity Collection Environment',
// optional; sets final title as "Index Page - My Website", useful for multiple level meta
// titleTemplate: title => `${this.siteName}`,
Expand Down Expand Up @@ -295,6 +296,10 @@ export default {
href: 'https://fonts.googleapis.com/css?family=Libre+Franklin:400,bold%7CSumana:400',
media: 'all'
}
// reducedCss: {
// rel: 'stylesheet',
// href: '/statics/edu.nd/reduced.css'
// }
// css2: {
// rel: 'stylesheet',
// href: 'https://ndwebgroup.github.io/webtheme/assets/stylesheets/syntax.css'
Expand Down
Loading

0 comments on commit ad4a29c

Please sign in to comment.