Created by: peternewnham
Here's an early proof of concept of how splitting into multiple packages using Lerna could work (#23557 (closed))
Created 3 packages located in the packages
directory:
- bootstrap
- devDependency on the css and jquery packages below
- should be backwards compatible with current bootstrap package
- css (scss and css only)
- jquery (jquery plugins only)
Usage:
- Install Lerna (
npm i -g lerna
) - Run
lerna bootstrap
to initialise and link dependencies between packagesRun
lerna run build` to run the build script for each package
Demos of them in action (published to a temporary scope):
- Full Bootstrap package (css + jquery) - https://jsfiddle.net/hpm0ku0c/1/
- CSS only - https://jsfiddle.net/n81gadbt/1/
To Do:
- Decide on package names
- scoped (@twbs/css) vs flat (bootstrap-css)
- Consistent names between platforms Bootstrap is published on (npm, packagist, nuget... etc)
- Restructure rest of project and run scripts to work with the new format
- Consider the way the combined
bootstrap
package is generated (may be a better way than just copying files from it's dependencies?) - Probably lots of other things I've not thought about
CC: @XhmikosR