mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
build: Build js files with webpack
This commit is contained in:
parent
71f502fc95
commit
ef3e69b327
15
Makefile
15
Makefile
@ -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
|
||||
|
@ -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"
|
||||
|
25
webpack.config.babel.js
Normal file
25
webpack.config.babel.js
Normal file
@ -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/,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user