Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Commit 5474bcf

Browse files
committed
Add a sandbox project for testing
1 parent 8eee882 commit 5474bcf

File tree

6 files changed

+79
-0
lines changed

6 files changed

+79
-0
lines changed

_sandbox/.eslintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"root": true,
3+
"parser": "babel-eslint",
4+
"env": {
5+
"browser": true,
6+
"commonjs": true,
7+
"es6": true,
8+
"jest": true,
9+
"node": true
10+
},
11+
"parserOptions": {
12+
"ecmaVersion": 6,
13+
"sourceType": "module"
14+
},
15+
"rules": {
16+
// http://eslint.org/docs/rules/
17+
"no-unused-expressions": "warn",
18+
"no-unused-labels": "warn",
19+
"no-unused-vars": ["warn", { "vars": "local", "args": "none" }]
20+
}
21+
}

_sandbox/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

_sandbox/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable */
2+
const unsed = 'I am unused';
3+
4+
export default class MyComponent extends React.Component {
5+
6+
render() {
7+
return <div>Hello</div>
8+
}
9+
}

_sandbox/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "_sandbox",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"repository": {},
6+
"license": "MIT",
7+
"scripts": {
8+
"start": "node watch.js"
9+
}
10+
}

_sandbox/watch.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const webpack = require("webpack");
2+
const config = require("./webpack.config");
3+
4+
const compiler = webpack(config);
5+
6+
compiler.watch({}, (stats) => {
7+
8+
});

_sandbox/webpack.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const FriendlyErrorsWebpackPlugin = require('../index');
2+
3+
module.exports = {
4+
entry: __dirname + "/index.js",
5+
output: {
6+
path: __dirname + "/dist",
7+
filename: "bundle.js"
8+
},
9+
plugins: [
10+
new FriendlyErrorsWebpackPlugin()
11+
],
12+
module: {
13+
loaders: [
14+
{
15+
test: /\.js$/,
16+
loader: 'eslint-loader',
17+
enforce: 'pre',
18+
include: __dirname
19+
},
20+
{
21+
test: /\.jsx?$/,
22+
loader: 'babel-loader',
23+
query: {
24+
presets: ['react'],
25+
},
26+
exclude: /node_modules/
27+
}
28+
]
29+
}
30+
};

0 commit comments

Comments
 (0)