Skip to content
Permalink
Browse files

A few additions for migration to webpack

* Fix issues on paths in build and dev files
* Skip yarn to reduce tooling requirements
* Minify CSS assets in production
* Reduce imports on fonts, hardcode font pieces more. There are problems
  with the font family names. Roboto mixin brings in everything as
  `Roboto-Slab-Bold`, which won't match local font name of 'Roboto Slab'
* Fix the development instance more:
  * Add file watching on reST files
  * Execute build docs command after webpack build

Things I'm still not sure about:

- [ ] The actual JS output, I haven't vetted this yet
- [ ] If woff2 and woff are enough for fonts. The NPM packages are missing other formats
  • Loading branch information...
agjohnson committed Jul 18, 2019
1 parent 0ab7645 commit 006921a145cf88d72a8645d7a1990ecf9fb7845a
Showing with 91 additions and 4,838 deletions.
  1. +6 −4 package.json
  2. +2 −4,811 sphinx_rtd_theme/static/css/theme.css
  3. +45 −5 src/sass/_theme_font_local.sass
  4. +8 −6 webpack.common.js
  5. +23 −10 webpack.dev.js
  6. +7 −2 webpack.prod.js
@@ -4,13 +4,12 @@
"version": "0.4.3",
"private": true,
"scripts": {
"start": "yarn webpack-dev-server --open --config webpack.dev.js",
"build": "yarn webpack --config webpack.prod.js"
"start": "webpack-dev-server --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js"
},
"dependencies": {
"bourbon": "~4.3",
"bourbon-neat": "~1.7",
"browserify": "^13.0.0",
"css-loader": "^2.1.1",
"file-loader": "^3.0.1",
"font-awesome": "^4.7.0",
@@ -20,6 +19,7 @@
"matchdep": "~1.0.1",
"mini-css-extract-plugin": "^0.6.0",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"roboto-fontface": "^0.10.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
@@ -29,6 +29,8 @@
"wyrm": "^1.0.9"
},
"devDependencies": {
"webpack-dev-server": "^3.3.1"
"webpack-dev-server": "^3.3.1",
"webpack-shell-plugin": "^0.5.0",
"webpack-watch-files-plugin": "^1.0.3"
}
}

0 comments on commit 006921a

Please sign in to comment.
You can’t perform that action at this time.