forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: tree shaking Bootstrap CSS (mmistakes#1736)
- Loading branch information
Showing
13 changed files
with
69 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import 'dist/bootstrap'; | ||
@import 'main'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
--- | ||
--- | ||
|
||
@import 'main'; | ||
@import 'main | ||
{%- if jekyll.environment == 'production' -%} | ||
.bundle | ||
{%- endif -%} | ||
'; | ||
|
||
/* append your custom style below */ |
Submodule lib
updated
6 files
+0 −2 | README.md | |
+0 −7 | bootstrap/bootstrap.bundle.min.js | |
+0 −1 | bootstrap/bootstrap.bundle.min.js.map | |
+0 −6 | bootstrap/bootstrap.min.css | |
+0 −1 | bootstrap/bootstrap.min.css.map | |
+0 −1 | package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const fs = require('fs'); | ||
const DIST_PATH = '_sass/dist'; | ||
|
||
fs.rm(DIST_PATH, { recursive: true, force: true }, (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
|
||
fs.mkdirSync(DIST_PATH); | ||
}); | ||
|
||
module.exports = { | ||
content: ['_includes/**/*.html', '_layouts/**/*.html', '_javascript/**/*.js'], | ||
css: ['node_modules/bootstrap/dist/css/bootstrap.min.css'], | ||
keyframes: true, | ||
variables: true, | ||
output: `${DIST_PATH}/bootstrap.css`, | ||
// The `safelist` should be changed appropriately for future development | ||
safelist: { | ||
standard: [/^collaps/, /^w-/, 'shadow', 'border', 'kbd'], | ||
greedy: [/^col-/, /tooltip/] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters