Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zakangelle/webpack-jest-infra
Set up webpack/jest infrastructure
- Loading branch information
Showing
19 changed files
with
270 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["es2015", "stage-0"], | ||
"plugins": ["babel-plugin-add-module-exports"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"rules": { | ||
"comma-dangle": [2, "never"], | ||
"no-shadow": 0, | ||
"no-new": 0, | ||
"new-cap": 0, | ||
"max-len": 0, | ||
"brace-style": [2, "stroustrup"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules | ||
dist | ||
.nyc_output | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
machine: | ||
node: | ||
version: 5.9.0 | ||
version: 6.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>ical-date-parser</title> | ||
|
||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="description" content="" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
|
||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import iCalDateParser from '../src/index'; | ||
|
||
console.log(iCalDateParser('20140422T233000Z')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: path.join(__dirname, 'index.js'), | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'example.[hash].js' | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: path.join(__dirname, 'index.html'), | ||
filename: 'index.html' | ||
}), | ||
new ExtractTextPlugin({ | ||
filename: 'index.[hash].css', | ||
allChunks: true | ||
}), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: JSON.stringify('production') | ||
} | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
screw_ie8: true, | ||
warnings: false | ||
} | ||
}) | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /(\.jsx|\.js)$/, | ||
use: 'babel-loader', | ||
include: [ | ||
path.resolve(__dirname), | ||
path.resolve(__dirname, '../src') | ||
], | ||
exclude: /node_modules/ | ||
} | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = { | ||
devtool: 'cheap-module-source-map', | ||
entry: { | ||
app: path.join(__dirname, './index.js') | ||
}, | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'example.[hash].js' | ||
}, | ||
devServer: { | ||
hot: true, | ||
stats: { | ||
colors: true, | ||
}, | ||
historyApiFallback: true | ||
}, | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NamedModulesPlugin(), | ||
new HtmlWebpackPlugin({ | ||
template: path.join(__dirname, 'index.html'), | ||
filename: 'index.html' | ||
}), | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /(\.jsx|\.js)$/, | ||
use: 'babel-loader', | ||
include: [ | ||
path.resolve(__dirname), | ||
path.resolve(__dirname, '../src') | ||
], | ||
exclude: /node_modules/ | ||
} | ||
] | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.