Commit ef3e69b3 authored by Cole Bemis's avatar Cole Bemis Committed by Cole Bemis

build: Build js files with webpack

parent 71f502fc
src_files := src/*.js
src_dir := src
.PHONY: all build
all: build
build: dist/feather.js dist/feather.min.js
node_modules:
npm install
......@@ -6,3 +15,9 @@ dist:
dist/icons.json: node_modules dist icons icons/*.svg
./node_modules/.bin/babel-node bin/build-json.js
dist/feather.js: dist/icons.json $(src_dir) $(src_files)
./node_modules/.bin/webpack --output-filename feather.js
dist/feather.min.js: dist/icons.json $(src_dir) $(src_files)
./node_modules/.bin/webpack --output-filename feather.min.js -p
......@@ -7,6 +7,7 @@
"dist"
],
"scripts": {
"build": "make build",
"commitmsg": "validate-commit-msg",
"cm": "git-cz",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
......
import path from 'path';
export default {
entry: [
'core-js/fn/array/from',
'core-js/fn/object/assign',
'core-js/fn/set',
path.resolve(__dirname, 'src/index.js'),
],
output: {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
library: 'feather',
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
};
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