Commit 5d6c7d21 authored by Cole Bemis's avatar Cole Bemis Committed by Cole Bemis

build: Add script to build `dist/icons` directory

parent 998b2e9a
......@@ -8,7 +8,7 @@ all: lint build
lint: dist/icons.json
./node_modules/.bin/eslint .
build: dist/feather.js dist/feather.min.js
build: dist/feather.js dist/feather.min.js dist/icons
node_modules:
npm install
......@@ -24,3 +24,8 @@ dist/feather.js: dist/icons.json $(src_dir) $(src_files)
dist/feather.min.js: dist/icons.json $(src_dir) $(src_files)
./node_modules/.bin/webpack --output-filename feather.min.js -p
dist/icons: dist/icons.json
rm -rf dist/icons
mkdir -p dist/icons
./node_modules/.bin/babel-node bin/build-svgs.js
/**
* @file Builds `dist/icons` directory.
*/
import fs from 'fs';
import path from 'path';
import { icons, toSvg } from '../src';
Object.keys(icons).forEach(icon => {
const svg = toSvg(icon);
fs.writeFileSync(path.resolve(__dirname, `../dist/icons/${icon}.svg`), svg);
});
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