https://github.com/peterblazejewicz/nx-sass-bootstrap-bootswatch
Demonstration of the Bootstrap Bootswatch theme creation with `sass` compiler and NX workspace features.
https://github.com/peterblazejewicz/nx-sass-bootstrap-bootswatch
bootstrap dart-sass nx nx-workspace sass sass-compiler
Last synced: 2 months ago
JSON representation
Demonstration of the Bootstrap Bootswatch theme creation with `sass` compiler and NX workspace features.
- Host: GitHub
- URL: https://github.com/peterblazejewicz/nx-sass-bootstrap-bootswatch
- Owner: peterblazejewicz
- License: mit
- Created: 2022-02-14T22:20:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T23:15:08.000Z (over 3 years ago)
- Last Synced: 2025-06-20T11:11:18.514Z (about 1 year ago)
- Topics: bootstrap, dart-sass, nx, nx-workspace, sass, sass-compiler
- Language: HTML
- Homepage:
- Size: 438 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nx Bootstrap Bootswatch
Demonstration of the Bootstrap Bootswatch theme creation with `sass` compiler and NX workspace features.
This project was generated using [Nx](https://nx.dev). To learn more about Nx, please check out the [Nx documentation](https://nx.dev/docs/).
The content of this workspace uses [Thomas' Park Bootswatch](https://bootswatch.com/) configuration files to quickly demonstrate how to create 3 different Bootstrap's themes.
The `sass` command uses {dir}:{dir} approach (many to many), creating 3 different themes.
Output of sass compiler gets cached by `nx` and is being reused without a need to recompile it.
## Using NX commands to compile SASS shared styles
[Nx Documentation](https://nx.dev/angular)
- project consists of a single buildable library `shared-styles`, that uses `dart-sass` compiler to build build 3 different themes.
- themes are consumed by 3 different projects without a need to rebuild or recompile `.scss` files.
- `shared-styles` library is defined as implicit dependency for all projects, so it's being rebuilt when any of the projects is rebuilt.
To run SASS command separately, issue:
```bash
nx run shared-styles:build
```
This build step supports `production` and `development` settings (source maps and compression style).
This demonstrates different approach of sharing global style within monorepo from one supported by `stylePreprocessorOptions` option in `angular.json` configuration: https://angular.io/guide/workspace-config#style-preprocessor-options
s
## Author
@peterblazejewicz