Permalink
Browse files

build: Build js files with webpack

  • Loading branch information...
colebemis committed Jul 3, 2017
1 parent 71f502f commit ef3e69b3271ee4a4463378188423419542b85a18
Showing with 41 additions and 0 deletions.
  1. +15 −0 Makefile
  2. +1 −0 package.json
  3. +25 −0 webpack.config.babel.js
View
@@ -1,3 +1,12 @@
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
View
@@ -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"
View
@@ -0,0 +1,25 @@
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/,
},
],
},
};

0 comments on commit ef3e69b

Please sign in to comment.