File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ all: lint build
88lint : dist/icons.json
99 ./node_modules/.bin/eslint .
1010
11- build : dist/feather.js dist/feather.min.js
11+ build : dist/feather.js dist/feather.min.js dist/icons
1212
1313node_modules :
1414 npm install
@@ -24,3 +24,8 @@ dist/feather.js: dist/icons.json $(src_dir) $(src_files)
2424
2525dist/feather.min.js : dist/icons.json $(src_dir ) $(src_files )
2626 ./node_modules/.bin/webpack --output-filename feather.min.js -p
27+
28+ dist/icons : dist/icons.json
29+ rm -rf dist/icons
30+ mkdir -p dist/icons
31+ ./node_modules/.bin/babel-node bin/build-svgs.js
Original file line number Diff line number Diff line change 1+ /**
2+ * @file Builds `dist/icons` directory.
3+ */
4+
5+ import fs from 'fs' ;
6+ import path from 'path' ;
7+ import { icons , toSvg } from '../src' ;
8+
9+ Object . keys ( icons ) . forEach ( icon => {
10+ const svg = toSvg ( icon ) ;
11+
12+ fs . writeFileSync ( path . resolve ( __dirname , `../dist/icons/${ icon } .svg` ) , svg ) ;
13+ } ) ;
You can’t perform that action at this time.
0 commit comments