Skip to content

Commit

Permalink
Switch to mini-css-extract-plugin, update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alex35mil committed May 9, 2018
1 parent e3d3437 commit e79e028
Show file tree
Hide file tree
Showing 48 changed files with 12,225 additions and 5,982 deletions.
6 changes: 3 additions & 3 deletions .bootstraprc-3-default
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ useCustomIconFontPath: false

# Webpack loaders, order matters
styleLoaders:
- style
- css
- sass
- style-loader
- css-loader
- sass-loader

# Extract styles to stand-alone css file
# Different settings for different environments can be used,
Expand Down
8 changes: 4 additions & 4 deletions .bootstraprc-4-default
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ bootstrapVersion: 4

# Webpack loaders, order matters
styleLoaders:
- style
- css
- postcss
- sass
- style-loader
- css-loader
- postcss-loader
- sass-loader

# Extract styles to stand-alone css file
# Different settings for different environments can be used,
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
lib/
examples/
public/
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
extends:
- eslint-config-shakacode/base
- eslint-config-shakacode
- prettier

plugins:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ lib/
node_modules/
*.log
.DS_Store

*/**/.bootstraprc
*/**/public
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com]
## [Unreleased]
*Please add entries here for your pull requests.*

## [3.0.0] - 2017-05-11
##### Updated
- Update to Webpack 4: `extract-text-webpack-plugin` is replaced with `mini-css-extract-plugin`.
— Update `basic` & `css-modules` examples.

## [2.2.0] - 2017-08-14
##### Updated
- Replaced support for Bootstrap 4.0.0-alpha.6 with 4.0.0-beta. [#299](https://github.com/shakacode/bootstrap-loader/pull/316) by [Ivan Kalinin](https://github.com/IvanKalinin).
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Successor to [bootstrap-sass-loader](https://github.com/shakacode/bootstrap-sass

1. Community support to help us with Bootstrap 4 issues and pull requests.
2. We'd be thrilled to have another maintainer join us to help with Bootstrap 4 issues.
3. We'd also be thrilled if any companies are open to sponsoring the development of features and issues regarding Bootstrap
3. We'd also be thrilled if any companies are open to sponsoring the development of features and issues regarding Bootstrap

That being said, Bootstrap 4 probably works just fine! You must use `4.0.0-beta` or greater.

Expand Down Expand Up @@ -106,14 +106,12 @@ Don't forget to install these dependencies (use `--save or --save-dev` option pe
npm install --save-dev bootstrap-sass

# or Bootstrap 4
npm install --save-dev bootstrap@4.0.0-beta

# Note, alpha.3 is broken, and alpha.2 is no longer supported
npm install --save-dev bootstrap

# Node SASS & other loaders needed to handle styles
npm install --save-dev css-loader node-sass resolve-url-loader sass-loader style-loader url-loader

# Additional loaders required for Bootstrap 4 & Webpack 2
# Additional loaders required for Bootstrap 3 & 4
npm install --save-dev imports-loader exports-loader
```

Expand Down Expand Up @@ -210,9 +208,8 @@ plugins: [
Check out example apps in [`examples/`](examples) folder:

* Basic usage: [examples/basic](examples/basic)
* See the `npm run bs4:customlocation` tasks for examples on how to pass your .bootstraprc config.
* With CSS Modules: [examples/css-modules](examples/css-modules) (This example shows off hot reloading with Babel 6 as well!)
* With multiple entries [examples/multiple-entries](examples/multiple-entries) with their own config.
* With multiple entries [examples/multiple-entries](examples/multiple-entries) with their own config _[currently out of date]_.

## Common configuration options
Here are common options for Bootstrap 3 & 4.
Expand Down
33 changes: 17 additions & 16 deletions examples/basic/.bootstraprc-3-example
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ bootstrapVersion: 3
# If Bootstrap version 3 is used - turn on/off custom icon font path
useCustomIconFontPath: false

# Webpack loaders, order matters
styleLoaders:
- style-loader
- css-loader
- sass-loader

# Extract styles to stand-alone css file
# Different settings for different environments can be used,
# It depends on value of NODE_ENV environment variable
# This param can also be set in webpack config:
# entry: 'bootstrap-loader/extractStyles'
extractStyles: false
# env:
# development:
# extractStyles: false
# production:
# extractStyles: true
env:
development:
# Extract styles to stand-alone css file
extractStyles: false
# Webpack loaders, order matters
styleLoaders:
- style-loader
- css-loader
- sass-loader
- postcss-loader
production:
extractStyles: true
styleLoaders:
- css-loader
- sass-loader
- postcss-loader

# Customize Bootstrap variables that get imported before the original Bootstrap variables.
# Thus original Bootstrap variables can depend on values from here. All the bootstrap
Expand Down Expand Up @@ -54,7 +55,7 @@ bootstrapCustomizations: ./app/styles/bootstrap/customizations.scss
# Import your custom styles here. You have access to all the bootstrap variables. If you require
# your sass files separately, you will not have access to the bootstrap variables, mixins, clases, etc.
# Usually this endpoint-file contains list of @imports of your application styles.
appStyles: ./app/styles/app.scss
appStyles: ./app/styles/app-bs3.scss

### Bootstrap styles
styles:
Expand Down
23 changes: 16 additions & 7 deletions examples/basic/.bootstraprc-4-example
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@
bootstrapVersion: 4

# Webpack loaders, order matters
styleLoaders:
- style-loader
- css-loader
- sass-loader
- postcss-loader
env:
development:
extractStyles: false
styleLoaders:
- style-loader
- css-loader
- sass-loader
- postcss-loader
production:
extractStyles: true
styleLoaders:
- css-loader
- sass-loader
- postcss-loader

# Extract styles to stand-alone css file
# Different settings for different environments can be used,
# It depends on value of NODE_ENV environment variable
# This param can also be set in webpack config:
# entry: 'bootstrap-loader/extractStyles'
extractStyles: false
# extractStyles: false
# env:
# development:
# extractStyles: false
Expand Down Expand Up @@ -52,7 +61,7 @@ bootstrapCustomizations: ./app/styles/bootstrap/customizations-bs4.scss
# Import your custom styles here. You have access to all the bootstrap variables. If you require
# your sass files separately, you will not have access to the bootstrap variables, mixins, clases, etc.
# Usually this endpoint-file contains list of @imports of your application styles.
appStyles: ./app/styles/app.scss
appStyles: ./app/styles/app-bs4.scss

### Bootstrap styles
styles:
Expand Down
2 changes: 0 additions & 2 deletions examples/basic/.eslintignore

This file was deleted.

2 changes: 0 additions & 2 deletions examples/basic/.eslintrc

This file was deleted.

Loading

0 comments on commit e79e028

Please sign in to comment.