Skip to content

Commit 14b615c

Browse files
author
wfbn8821
committed
add webpack and babel
1 parent 7d3eac1 commit 14b615c

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "react", "stage-1"]
3+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
.idea
2+
.idea
3+
dist

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.idea

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "react-card-scroll",
3-
"version": "0.1.0",
3+
"version": "0.2.1",
44
"description": "A React component to navigate horizontally between cards of same width",
5-
"main": "src/index.js",
5+
"main": "dist/bundle.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"build": "webpack --progress --colors"
89
},
910
"keywords": [
1011
"react-component",
@@ -15,7 +16,16 @@
1516
],
1617
"author": "Florian Bernard",
1718
"license": "MIT",
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/webcom-components/react-card-scroll"
22+
},
1823
"devDependencies": {
24+
"babel-core": "^6.7.6",
25+
"babel-loader": "^6.2.4",
26+
"babel-preset-es2015": "^6.6.0",
27+
"babel-preset-react": "^6.5.0",
28+
"babel-preset-stage-1": "^6.5.0",
1929
"react": "^15.0.1",
2030
"webpack": "^1.13.0"
2131
},

webpack.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const path = require('path')
2+
3+
module.exports = {
4+
entry: "./src/index.js",
5+
output: {
6+
path: path.join(__dirname, './dist'),
7+
filename: "bundle.js"
8+
},
9+
module: {
10+
loaders: [
11+
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
12+
]
13+
}
14+
};

0 commit comments

Comments
 (0)