diff --git a/_config.yml b/_config.yml index 640a8fd..6e3f6b7 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,7 @@ exclude: - CHANGELOG.md - ISSUE_TEMPLATE.md - LICENSE + - node_modules - bin - sandbox - stash diff --git a/bin/build-manifest.sh b/bin/build-manifest.sh new file mode 100755 index 0000000..ae0f427 --- /dev/null +++ b/bin/build-manifest.sh @@ -0,0 +1,15 @@ +#!/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 ] diff --git a/bin/make-zip.sh b/bin/build-zip.sh similarity index 81% rename from bin/make-zip.sh rename to bin/build-zip.sh index d8e3ddc..4ad3221 100755 --- a/bin/make-zip.sh +++ b/bin/build-zip.sh @@ -4,4 +4,4 @@ version=$(grep '"version"' package.json | cut -d '"' -f4) # compress 'icons' directory into feather-[version].zip -zip -r feather-${version}.zip ./icons/ \ No newline at end of file +zip -r feather-${version}.zip ./icons/ diff --git a/bin/build.sh b/bin/build.sh deleted file mode 100755 index 19d0c33..0000000 --- a/bin/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -./bin/make-manifest.sh > manifest.json -./bin/make-zip.sh -jekyll build diff --git a/bin/make-manifest.sh b/bin/make-manifest.sh deleted file mode 100755 index 8b41db8..0000000 --- a/bin/make-manifest.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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 "]" diff --git a/package.json b/package.json index 02f38da..b69bc60 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,11 @@ "url": "https://github.com/colebemis/feather.git" }, "scripts": { - "start": "parallelshell 'jekyll serve' 'npm run watch'", - "watch": "onchange 'icons/**/*' 'package.json' -v -i -- npm run make", - "build": "npm run make && jekyll build", - "make": "npm run make:manifest && npm run make:zip", - "make:manifest": "./bin/make-manifest.sh > manifest.json", - "make:zip": "./bin/make-zip.sh" + "start": "npm run build:manifest && parallelshell 'jekyll serve' 'npm run watch'", + "watch": "onchange 'icons/**/*' -v -- npm run build:manifest", + "build": "npm run build:manifest && npm run build:zip && jekyll build", + "build:manifest": "./bin/build-manifest.sh > manifest.json", + "build:zip": "./bin/build-zip.sh" }, "license": "MIT", "devDependencies": {