Skip to content

Commit e26f7fd

Browse files
author
Cédric Delpoux
committed
Add webpack build
1 parent 0dd6b8c commit e26f7fd

File tree

4 files changed

+60
-14
lines changed

4 files changed

+60
-14
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.4 - 2015-07-08
4+
5+
* Added: webpack build
6+
37
## 1.0.3 - 2015-07-03
48

59
* Added: fixed tooltip example

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ npm install --save react-simple-tooltip
1414

1515
See [changelog](./CHANGELOG.md)
1616

17+
## Demo
18+
19+
http://cedricdelpoux.github.io/react-simple-tooltip/
20+
1721
## Usage
1822

1923
### Examples
@@ -104,12 +108,6 @@ npm run clean
104108
npm run build
105109
```
106110

107-
### Watch `src` folder
108-
109-
```js
110-
npm run watch
111-
```
112-
113111
### Lint `src` folder
114112

115113
```js

package.json

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-simple-tooltip",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "A lightweight and simple tooltip component for React",
55
"repository": {
66
"type": "git",
@@ -22,19 +22,26 @@
2222
"lib"
2323
],
2424
"dependencies": {
25+
"babel-runtime": "~5.6.4",
2526
"classnames": "~2.1.2",
26-
"react": "^0.13.1"
27+
"react": "^0.13.3"
2728
},
2829
"devDependencies": {
29-
"babel": "^5.4.5",
30-
"babel-eslint": "^3.1.5",
31-
"eslint": "^0.21.1",
32-
"eslint-plugin-react": "^2.1.0"
30+
"babel": "~5.6.14",
31+
"babel-core": "~5.6.15",
32+
"babel-eslint": "~3.1.20",
33+
"babel-loader": "~5.1.4",
34+
"css-loader": "~0.15.1",
35+
"eslint": "~0.21.2",
36+
"eslint-loader": "~0.14.0",
37+
"eslint-plugin-react": "~2.6.4",
38+
"node-libs-browser": "~0.5.2",
39+
"style-loader": "~0.12.2",
40+
"webpack": "~1.10.1"
3341
},
3442
"scripts": {
3543
"clean": "rm -rf lib",
36-
"build": "babel src --out-dir lib --copy-files",
37-
"watch": "npm run build -- --watch",
44+
"build": "webpack --progress --colors --display-modules",
3845
"lint": "eslint src/",
3946
"prepublish": "npm run clean && npm run build"
4047
}

webpack.config.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
var webpack = require('webpack')
2+
var path = require('path')
3+
4+
var sources = [
5+
path.resolve(__dirname, 'src'),
6+
]
7+
8+
module.exports = {
9+
entry: './src/index.js',
10+
output: {
11+
path: __dirname,
12+
filename: './lib/index.js',
13+
},
14+
resolve: {
15+
extensions: ['', '.js', '.css']
16+
},
17+
module: {
18+
preLoaders: [
19+
{ test: /\.js?$/, include: sources, loader: 'eslint' },
20+
],
21+
loaders: [
22+
{ test: /\.js$/, include: sources, loader: 'babel' },
23+
{ test: /\.css$/, include: sources, loader: 'style!css' },
24+
],
25+
},
26+
plugins: [
27+
new webpack.NoErrorsPlugin(),
28+
new webpack.optimize.OccurenceOrderPlugin(),
29+
new webpack.optimize.DedupePlugin(),
30+
new webpack.optimize.AggressiveMergingPlugin(),
31+
new webpack.optimize.UglifyJsPlugin({
32+
compress: {
33+
warnings: false,
34+
},
35+
}),
36+
]
37+
}

0 commit comments

Comments
 (0)