mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
Refactor build process
This commit is contained in:
parent
31337f00cc
commit
873c50411f
@ -4,6 +4,7 @@ exclude:
|
||||
- CHANGELOG.md
|
||||
- ISSUE_TEMPLATE.md
|
||||
- LICENSE
|
||||
- node_modules
|
||||
- bin
|
||||
- sandbox
|
||||
- stash
|
||||
|
15
bin/build-manifest.sh
Executable file
15
bin/build-manifest.sh
Executable file
@ -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 ]
|
@ -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/
|
||||
zip -r feather-${version}.zip ./icons/
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
./bin/make-manifest.sh > manifest.json
|
||||
./bin/make-zip.sh
|
||||
jekyll build
|
@ -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 "]"
|
11
package.json
11
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": {
|
||||
|
Loading…
Reference in New Issue
Block a user