Commit 873c5041 authored by Cole Bemis's avatar Cole Bemis

Refactor build process

parent 31337f00
...@@ -4,6 +4,7 @@ exclude: ...@@ -4,6 +4,7 @@ exclude:
- CHANGELOG.md - CHANGELOG.md
- ISSUE_TEMPLATE.md - ISSUE_TEMPLATE.md
- LICENSE - LICENSE
- node_modules
- bin - bin
- sandbox - sandbox
- stash - stash
#!/usr/bin/env bash
cd ./icons
numFiles=$(ls -1 *.svg | wc -l)
count=0
echo [
for icon in $(ls *.svg)
do
count=$((count + 1))
echo -n " "\"${icon%.svg}\"
(($count == $numFiles)) && echo "" || echo ,
done
echo ]
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
version=$(grep '"version"' package.json | cut -d '"' -f4) version=$(grep '"version"' package.json | cut -d '"' -f4)
# compress 'icons' directory into feather-[version].zip # compress 'icons' directory into feather-[version].zip
zip -r feather-${version}.zip ./icons/ zip -r feather-${version}.zip ./icons/
\ No newline at end of file
#!/usr/bin/env bash
./bin/make-manifest.sh > manifest.json
./bin/make-zip.sh
jekyll build
#!/usr/bin/env bash
cd ./icons
n=$(ls -1 | wc -l)
m=0
echo "["
for i in $(ls -1 *.svg | cut -d '.' -f 1 )
do
m=$((m + 1))
echo -n " "\"$i\"
[ "$m" == $n ] && echo "" || echo ","
done
echo "]"
...@@ -7,12 +7,11 @@ ...@@ -7,12 +7,11 @@
"url": "https://github.com/colebemis/feather.git" "url": "https://github.com/colebemis/feather.git"
}, },
"scripts": { "scripts": {
"start": "parallelshell 'jekyll serve' 'npm run watch'", "start": "npm run build:manifest && parallelshell 'jekyll serve' 'npm run watch'",
"watch": "onchange 'icons/**/*' 'package.json' -v -i -- npm run make", "watch": "onchange 'icons/**/*' -v -- npm run build:manifest",
"build": "npm run make && jekyll build", "build": "npm run build:manifest && npm run build:zip && jekyll build",
"make": "npm run make:manifest && npm run make:zip", "build:manifest": "./bin/build-manifest.sh > manifest.json",
"make:manifest": "./bin/make-manifest.sh > manifest.json", "build:zip": "./bin/build-zip.sh"
"make:zip": "./bin/make-zip.sh"
}, },
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment