Skip to content

Commit 873c504

Browse files
committed
Refactor build process
1 parent 31337f0 commit 873c504

6 files changed

Lines changed: 22 additions & 27 deletions

File tree

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exclude:
44
- CHANGELOG.md
55
- ISSUE_TEMPLATE.md
66
- LICENSE
7+
- node_modules
78
- bin
89
- sandbox
910
- stash

bin/build-manifest.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
cd ./icons
4+
5+
numFiles=$(ls -1 *.svg | wc -l)
6+
count=0
7+
8+
echo [
9+
for icon in $(ls *.svg)
10+
do
11+
count=$((count + 1))
12+
echo -n " "\"${icon%.svg}\"
13+
(($count == $numFiles)) && echo "" || echo ,
14+
done
15+
echo ]

bin/make-zip.sh renamed to bin/build-zip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
version=$(grep '"version"' package.json | cut -d '"' -f4)
55

66
# compress 'icons' directory into feather-[version].zip
7-
zip -r feather-${version}.zip ./icons/
7+
zip -r feather-${version}.zip ./icons/

bin/build.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

bin/make-manifest.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
"url": "https://github.com/colebemis/feather.git"
88
},
99
"scripts": {
10-
"start": "parallelshell 'jekyll serve' 'npm run watch'",
11-
"watch": "onchange 'icons/**/*' 'package.json' -v -i -- npm run make",
12-
"build": "npm run make && jekyll build",
13-
"make": "npm run make:manifest && npm run make:zip",
14-
"make:manifest": "./bin/make-manifest.sh > manifest.json",
15-
"make:zip": "./bin/make-zip.sh"
10+
"start": "npm run build:manifest && parallelshell 'jekyll serve' 'npm run watch'",
11+
"watch": "onchange 'icons/**/*' -v -- npm run build:manifest",
12+
"build": "npm run build:manifest && npm run build:zip && jekyll build",
13+
"build:manifest": "./bin/build-manifest.sh > manifest.json",
14+
"build:zip": "./bin/build-zip.sh"
1615
},
1716
"license": "MIT",
1817
"devDependencies": {

0 commit comments

Comments
 (0)