Skip to content

Commit 11c3987

Browse files
committed
🔧 Dev tools config
1 parent 8f8b533 commit 11c3987

File tree

5 files changed

+20
-57
lines changed

5 files changed

+20
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
/lib
3+
demo
34

45
# Editor config
56
.vscode

docs/bundle.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/index.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"description": "A fully customizable, one-time password input component for the web built with React",
55
"main": "lib/index.js",
66
"scripts": {
7-
"dev": "concurrently \"npm run build:watch\" \"npm run docs\"",
7+
"dev": "concurrently \"npm run build:watch\" \"npm run demo\"",
88
"build": "babel src/lib -d lib",
99
"build:watch": "babel src/lib -w -d lib",
10-
"docs": "webpack-dev-server --mode development",
11-
"docs:prod": "webpack --mode production",
10+
"demo": "webpack-dev-server --mode development",
11+
"demo:prod": "webpack --mode production",
1212
"format": "prettier --write '**/*.{js,jsx}'",
1313
"lint": "eslint '**/*.{js,jsx}' --quiet",
1414
"prepublish": "npm run build"

webpack.config.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
const path = require("path");
2-
const HtmlWebpackPlugin = require("html-webpack-plugin");
1+
const path = require('path');
2+
const HtmlWebpackPlugin = require('html-webpack-plugin');
33

44
module.exports = {
5-
entry: path.join(__dirname, "src/docs"),
5+
entry: path.join(__dirname, 'src/docs'),
66
output: {
7-
path: path.join(__dirname, "docs"),
8-
filename: "bundle.js"
7+
path: path.join(__dirname, 'demo'),
8+
filename: 'bundle.js',
99
},
1010
module: {
1111
rules: [
1212
{
1313
test: /\.(js|jsx)$/,
14-
use: "babel-loader",
15-
exclude: /node_modules/
14+
use: 'babel-loader',
15+
exclude: /node_modules/,
1616
},
1717
{
1818
test: /\.css$/,
19-
use: ["style-loader", "css-loader"]
20-
}
21-
]
19+
use: ['style-loader', 'css-loader'],
20+
},
21+
],
2222
},
2323
plugins: [
2424
new HtmlWebpackPlugin({
25-
template: path.join(__dirname, "src/docs/index.html")
26-
})
25+
template: path.join(__dirname, 'src/docs/index.html'),
26+
}),
2727
],
2828
resolve: {
29-
extensions: [".js", ".jsx"]
29+
extensions: ['.js', '.jsx'],
3030
},
3131
devServer: {
32-
contentBase: path.join(__dirname, "docs"),
32+
contentBase: path.join(__dirname, 'docs'),
3333
port: 8000,
34-
stats: "minimal"
35-
}
34+
stats: 'minimal',
35+
},
3636
};

0 commit comments

Comments
 (0)