Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Sass for theming Bootstrap #25

Closed
10 tasks done
Tracked by #12
guylepage3 opened this issue Aug 25, 2018 · 7 comments
Closed
10 tasks done
Tracked by #12

Setup Sass for theming Bootstrap #25

guylepage3 opened this issue Aug 25, 2018 · 7 comments
Assignees

Comments

@guylepage3
Copy link
Contributor

guylepage3 commented Aug 25, 2018

Description
We need to setup Sass and a Sass compiler for theming Bootstrap.

Basic Sass Build Tasks

  • Choose Sass file structure
  • Setup Sass
  • Import new Sass and Bootstrap
  • Test

Advanced Sass Build Tasks

  • Group Sass and Sass maps. Then setup import.
  • Choose build process
  • Choose and install Sass compiler
  • Add minification capability to build process for clean CSS
  • Merge build compiler and scripts into one bash command npm start Setup Sass for theming Bootstrap #25 (comment)
  • Test
@guylepage3
Copy link
Contributor Author

Set up basic Sass system and imports by

  1. Global install of Sass
  2. Import Bootstrap's Sass into src/App.scss
  3. Replace Bootstrap's CSS in src/index.js with App.css
  4. Then run sass src/App.scss src/App.css

This produces a large App.css file..

guylepage3 added a commit that referenced this issue Aug 25, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 25, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 25, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
@guylepage3
Copy link
Contributor Author

guylepage3 commented Aug 26, 2018

guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
@guylepage3
Copy link
Contributor Author

guylepage3 commented Aug 26, 2018

Ran into issue with ejecting React app.

@guylepage3
Copy link
Contributor Author

guylepage3 commented Aug 26, 2018

guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
@guylepage3
Copy link
Contributor Author

Added minification of CSS by adding the --output-style compressed command to the package.json build scripts.

"build-css": "node-sass-chokidar src/ -o src/ --output-style compressed",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --output-style compressed --watch --recursive",

Reference:

@guylepage3
Copy link
Contributor Author

Merge build compiler and scripts into one bash command running npm install --save npm-run-all package.

Reference:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc

guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
guylepage3 added a commit that referenced this issue Aug 26, 2018
Signed-off-by: Guy Lepage <guylepage3@gmail.com>
@guylepage3
Copy link
Contributor Author

Complete

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant