Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
v2: Bootstrap 4, Icons 1.9.1, and Node 16 (#95)
Browse files Browse the repository at this point in the history
* Update dependencies, fix package-lock.json issue

* rebuild css

* Bump versions, copyright

* only test node 16

* Fix Stylelint, rerun CSS

* Update readme

* Fixes #68: Mention Node version in readme

* Add live reload functionality

Fixes #82, fixes #74.
  • Loading branch information
mdo authored Sep 2, 2022
1 parent b6b1dd5 commit 732f96d
Show file tree
Hide file tree
Showing 9 changed files with 10,279 additions and 3,900 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [12, 14]
node: [16]

steps:
- name: Clone repository
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": [
"stylelint-config-twbs-bootstrap/scss"
"stylelint-config-twbs-bootstrap"
]
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020-2021 Mark Otto
Copyright (c) 2020-2022 Mark Otto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## About

`bootstrap-npm-starter` is a GitHub template repository for creating new Bootstrap-powered npm projects, maintained by Bootstrap co-author @mdo. You can also use it as your own Bootstrap prototyping sandbox. It's built with Bootstrap v4 with plans to update for v5.
`bootstrap-npm-starter` is a GitHub template repository for creating new Bootstrap 4 based npm projects, maintained by Bootstrap co-author @mdo. You can also use it as your own Bootstrap prototyping sandbox. For Bootstrap 5 examples, see [our new `twbs/examples` repo](https://github.com/twbs/examples).

[![Build Status](https://github.com/twbs/bootstrap-npm-starter/workflows/CI/badge.svg)](https://github.com/twbs/bootstrap-npm-starter/actions)

Expand All @@ -19,15 +19,15 @@ Setup as a starter template, you can easily generate a new GitHub repository. Fr
## What's included

- Single HTML page (`index.html`) to demonstrate how to include Bootstrap.
- Includes [Bootstrap](https://getbootstrap.com) (currently using v4.6.0) source files via npm.
- Includes [Bootstrap Icons](https://icons.getbootstrap.com) (v1.4.0), which includes over 1,200 icons available as SVGs and web fonts.
- npm scripts (see `package.json`) for compiling and autoprefixing Sass, watching for changes, and starting a basic local server.
- Includes [Bootstrap](https://getbootstrap.com) (currently using v4.6.2) source files via npm.
- Includes [Bootstrap Icons](https://icons.getbootstrap.com) (v1.9.1), which includes over 1,800 icons available as SVGs and web fonts.
- npm scripts (see `package.json`) for compiling and autoprefixing Sass, watching for changes, and starting a local server with live reload.
- Example stylesheet (`scss/starter.scss`) highlighting two ways to include and customize Bootstrap.
- Example JavaScript file (`assets/js/starter.js`) showing how to import all of Bootstrap, or just the parts you need.

## Usage

Be sure to have [Node.js](https://nodejs.org/) installed before proceeding.
Be sure to have [Node.js](https://nodejs.org/) installed before proceeding. **We recommend using Node's LTS releases, which is currently at v16.x. We only test our compiled CSS against v16.**

```shell
# Clone the repo
Expand All @@ -40,17 +40,20 @@ npm i
# Compile Sass
npm run css-compile

# Start server and watch Sass
npm start

# Watch Sass for changes (uses nodemon)
npm run watch

# Start local server (uses sirv-cli)
# Start local server
npm run server

# Watches Sass for changes and starts a local server
npm start
```

For the most straightforward development, open two Terminal tabs to execute `npm run server` and `npm run watch` at the same time.
For the most straightforward development, open Terminal and run `npm start`.

Open <http://localhost:3000> to see the page in action.

Expand All @@ -60,7 +63,7 @@ The following npm scripts are available to you in this starter repo. With the ex

| Script | Description |
| --- | --- |
| `server` | Starts a local server (<http://localhost:3000>) for development |
| `server` | Starts a local server (<http://localhost:3000>) for development with live reloads |
| `watch` | Automatically recompiles CSS as it watches the `scss` directory for changes |
| `css` | Runs `css-compile` and `css-prefix` |
| `css-compile` | Compiles source Sass into CSS |
Expand Down Expand Up @@ -121,4 +124,4 @@ At the root of the repo, `.stylelintignore` is used to list files that we ignore

## Copyright

&copy; @mdo 2020-2021 and licensed MIT.
&copy; @mdo 2020-2022 and licensed MIT.
2 changes: 1 addition & 1 deletion assets/css/starter.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/starter.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit 732f96d

Please sign in to comment.