Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit ba56bc9

Browse files
authored
Merge pull request #99 from geotrev/develop
fixes to scripts/ for consistent release versioning and hash creation
2 parents 55a9a3e + e91ca0e commit ba56bc9

15 files changed

+80
-53
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ Clone the repo and re-clone the wiki contents.
126126
```sh
127127
$ git clone git@github.com:USER_NAME/undernet.git
128128
$ cd undernet/
129-
$ npm run setup
129+
$ npm install
130130
```
131131

132-
The site is both a demo and marketing tool. It is built with my own webpack setup called [Pulsar](https://github.com/geotrev/pulsar). It's basically just Webpack + React, so don't panic.
132+
The site is both a demo and marketing tool. It is built with my own webpack setup called [Pulsar](https://github.com/geotrev/pulsar). It's basically just Webpack + React, so don't panic. :)
133133

134134
### Run the dev server
135135

@@ -183,18 +183,19 @@ $ npm run js:watch
183183

184184
### New releases
185185

186-
New releases are simply zipped and compiled files.
186+
New releases are simply zipped and compiled files to be distributed on npm, then for use on a CDN, such as jsdelivr.
187187

188-
To increment the version of the release, run the following command, where `VERSION` is the semver value. E.g., `--tag=2.3.0`. The script will find specific files: `package.json`, `scss/undernet.scss`, and `docs/introduction.md`. It then increments the version, creates new sub-resource integrity hashes, and updates unpkg.com links for CDN access.
188+
To run a release build, run the following two commands, where `VERSION` is the semver value incremented from `package.json`:
189189

190190
```sh
191191
$ update-version --tag=VERSION
192+
$ npm run build:release
192193
```
193194

194-
Then to build assets:
195+
These will do three things:
195196

196-
```sh
197-
$ npm run build:release
198-
```
197+
1. Increment the project version across multiple files that require it.
198+
2. Build all assets with the new version.
199+
3. Generate new sha-256 hashes for CDN access (see `docs/introduction.md`, "Get Started" section).
199200

200-
All that's left is a `npm publish` and the new version is out in the wild!
201+
All that's left is a `npm publish` and the new version is out in the wild! Crazy cool!

dist/undernet.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.css.zip

0 Bytes
Binary file not shown.

dist/undernet.js.zip

0 Bytes
Binary file not shown.

dist/undernet.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.modules.js.zip

0 Bytes
Binary file not shown.

dist/undernet.scss.zip

0 Bytes
Binary file not shown.

docs/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Undernet is extremely light, carrying no external dependencies apart from needin
66

77
## Get Started
88

9-
The quickest way to use Undernet is to link the bundled js and minified css using a CDN, such as [unpkg](https://www.unpkg.com).
9+
The quickest way to use Undernet is to link the bundled js and minified css using a CDN, such as [jsdelivr](https://jsdelivr.com).
1010

1111
```html
12-
<link rel="stylesheet" href="https://unpkg.com/undernet@2.4.0/dist/undernet.min.css" integrity="sha256-aCt3hDWtL1yGzwbbOIz38YAgMVIrMJygL18UZSJ34Tk=" crossorigin="anonymous">
12+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/undernet@2.4.1/dist/undernet.min.css" integrity="sha256-bX29Vc8vjuAFBJS+PKK2r9iJOj1aMLn4A1Sj8iH63BM=" crossorigin="anonymous">
1313
```
1414

1515
```html
16-
<script type="text/javascript" src="https://unpkg.com/undernet@2.4.0/dist/undernet.bundle.min.js" integrity="sha256-rOovHww6Dn9bQcTvKoAwZv/Rys+zd9UJQqb21SqCKaE=" crossorigin="anonymous"></script>
16+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/undernet@2.4.1/dist/undernet.bundle.min.js" integrity="sha256-1QnHhJ6tkW1PuBOTUeAPdrzYxcRceAvqJTi4mHxGmZg=" crossorigin="anonymous"></script>
1717
<script type="text/javascript">
1818
document.addEventListener('DOMContentLoaded', Undernet.start())
1919
</script>

0 commit comments

Comments
 (0)