Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Commit

Permalink
refactor(baumeister.json): Rename properties related to vendor files
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
The properties `bundleCSS` and `includeStaticFiles` in baumeister.json are moved to `vendor.bundleCSS` and `vendor.includeStaticFiles`. You have to adapt these changes in case you have added dependencies via these properties.
  • Loading branch information
mischah committed Feb 15, 2018
1 parent 0d4cd1b commit 7ac3de1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,16 @@ In the root directory is a file named `baumeister.json` which you can use to cha
{
"useHandlebars": true,
"generateBanners": true,
"bundleCSS": [],
"bundleExternalJS": [
"jquery",
"bootstrap-sass"
],
"includeStaticFiles": [
"bootstrap-sass/assets/fonts/**/*"
],
"vendor": {
"bundleCSS": [],
"includeStaticFiles": [
"bootstrap-sass/assets/fonts/**/*"
]
},
"webpack": {
"DefinePlugin": {
"dev": {},
Expand All @@ -155,7 +157,7 @@ In the root directory is a file named `baumeister.json` which you can use to cha
}
```

`bundleCSS`, `bundleExternalJS` and `includeStaticFiles` makes it possible to include additional dependencies without touching any Gulp task. These settings are explained in depth in the section [Using external libraries](#using-external-libraries) within this document.
`vendor.bundleCSS`, `bundleExternalJS` and `vendor.includeStaticFiles` makes it possible to include additional dependencies without touching any Gulp task. These settings are explained in depth in the section [Using external libraries](#using-external-libraries) within this document.

The ramifications of changing the `useHandlebars` setting are explained in the section [Writing markup (static sites vs. single page apps)](#writing-markup-static-sites-vs-single-page-apps).

Expand Down Expand Up @@ -584,7 +586,7 @@ myProject

### Bundling CSS from dependencies

If a used library ships its own CSS you have to include the path to the files you like to bundle in the `bundleCSS` section of your `baumeister.json`. Please note that glob pattern matching is supported over here.
If a used library ships its own CSS you have to include the path to the files you like to bundle in the `vendor.bundleCSS` section of your `baumeister.json`. Please note that glob pattern matching is supported over here.

```
"bundleCSS": [
Expand All @@ -608,7 +610,7 @@ myProject
### Including static files from dependencies

Sometimes you need to copy static files from an npm package to your project. This may be fonts or JavaScript files you need to include via a separate `<script>` tag.
To handle that you just have to include the files in the `includeStaticFiles` section of your `baumeister.json`. Please note that glob pattern matching is supported over here.
To handle that you just have to include the files in the `vendor.includeStaticFiles` section of your `baumeister.json`. Please note that glob pattern matching is supported over here.

```
"includeStaticFiles": [
Expand Down
6 changes: 4 additions & 2 deletions baumeister.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"useHandlebars": true,
"generateBanners": false,
"bundleCSS": [],
"bundleExternalJS": [
"jquery",
"bootstrap"
],
"includeStaticFiles": [],
"vendor": {
"bundleCSS": [],
"includeStaticFiles": []
},
"webpack": {
"DefinePlugin": {
"dev": {},
Expand Down
4 changes: 2 additions & 2 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export const settings = {
images: ['./src/assets/img/**/*.{png,jpg,gif,svg}'],
assets: ['./src/assets/**/*', '!./src/assets/{fonts,fonts/**,img,img/**,scss,scss/**}'],
fonts: ['./src/assets/fonts/**/*'],
externalCss: configFile.bundleCSS,
externalCss: configFile.vendor.bundleCSS,
externalJs: configFile.bundleExternalJS,
staticFiles: configFile.includeStaticFiles
staticFiles: configFile.vendor.includeStaticFiles
},
destinations: {
handlebars: './.metalsmith-build',
Expand Down

0 comments on commit 7ac3de1

Please sign in to comment.