Skip to content

Commit 50cffa8

Browse files
committed
demo setup
1 parent 3db9418 commit 50cffa8

File tree

7 files changed

+358
-263
lines changed

7 files changed

+358
-263
lines changed

build/index.js

Lines changed: 14 additions & 208 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/build/index.js

Lines changed: 303 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
99
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
1010
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
11-
<link rel="shortcut icon" href="img/moon.png">
12-
<script src="js/bundle.js"></script>
11+
<script src="build/index.js"></script>
1312
</head>
1413
<body>
1514
<nav class="navbar navbar-expand-lg navbar-light bg-faded">

docs/index.jsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import { RangeStepInput } from '../lib/index';
4+
5+
const App = () => (
6+
<div>
7+
<h2>Button</h2>
8+
<p>Here's an example RangeStepInput:</p>
9+
<RangeStepInput />
10+
</div>
11+
);
12+
13+
ReactDOM.render(<App />, document.getElementById('react-container'));

docs/js/bundle.js

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "webpack --mode development --watch",
88
"build": "webpack --mode=production",
9+
"build-demo": "webpack --config webpack.config.docs.js --mode production",
910
"eslint": "eslint lib/"
1011
},
1112
"repository": {

webpack.config.docs.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const path = require('path');
2+
const webpack = require('webpack');
3+
4+
module.exports = {
5+
entry: './docs/index.jsx',
6+
output: {
7+
path: path.resolve(__dirname, 'docs/build/'),
8+
filename: 'index.js'
9+
},
10+
resolve: {
11+
extensions: ['*', '.js', '.jsx']
12+
},
13+
module: {
14+
rules: [
15+
{
16+
test: /\.(js|jsx)$/,
17+
//include: path.resolve(__dirname, 'docs'),
18+
exclude: /node_modules/,
19+
loader: 'babel-loader',
20+
options: {
21+
presets: ['@babel/preset-env', '@babel/preset-react']
22+
}
23+
}
24+
]
25+
}
26+
};

0 commit comments

Comments
 (0)