Include webpack to bundle the playground
parent
46c8a4cd9d
commit
4edfb67f55
|
@ -9,6 +9,7 @@
|
||||||
/website/node_modules
|
/website/node_modules
|
||||||
/website/build
|
/website/build
|
||||||
/website/i18n
|
/website/i18n
|
||||||
|
/website/static/playground.js
|
||||||
/website/static/lib
|
/website/static/lib
|
||||||
.DS_Store
|
.DS_Store
|
||||||
coverage
|
coverage
|
||||||
|
|
|
@ -104,3 +104,7 @@ If you wish to manually publish your website with the `publish-gh-pages` script,
|
||||||
```
|
```
|
||||||
DEPLOY_USER=deltice GIT_USER=test-site-bot CIRCLE_PROJECT_USERNAME=deltice CIRCLE_PROJECT_REPONAME=test-site CIRCLE_BRANCH=master npm run publish-gh-pages
|
DEPLOY_USER=deltice GIT_USER=test-site-bot CIRCLE_PROJECT_USERNAME=deltice CIRCLE_PROJECT_REPONAME=test-site CIRCLE_BRANCH=master npm run publish-gh-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Playground
|
||||||
|
|
||||||
|
The playground is not integrated with the Docusaurus infrastructure. If you want to edit something in the playground, you need to run `yarn start` to start the Docusaurus server and `webpack --watch` in a separate shell to compile the playground changes.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "docusaurus-build",
|
"build": "webpack -p && docusaurus-build",
|
||||||
"publish-gh-pages": "docusaurus-publish",
|
"publish-gh-pages": "docusaurus-publish",
|
||||||
"start": "docusaurus-start",
|
"start": "docusaurus-start",
|
||||||
"svgo": "svgo --pretty --indent=2 --config=svgo.yml",
|
"svgo": "svgo --pretty --indent=2 --config=svgo.yml",
|
||||||
|
@ -9,9 +9,13 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sandhose/prettier-animated-logo": "1.0.3",
|
"@sandhose/prettier-animated-logo": "1.0.3",
|
||||||
|
"babel-loader": "7.1.4",
|
||||||
|
"babel-preset-env": "1.6.1",
|
||||||
"docusaurus": "1.0.5",
|
"docusaurus": "1.0.5",
|
||||||
"js-yaml": "3.10.0",
|
"js-yaml": "3.10.0",
|
||||||
"svgo": "1.0.4",
|
"svgo": "1.0.4",
|
||||||
"sw-toolbox": "3.6.0"
|
"sw-toolbox": "3.6.0",
|
||||||
|
"webpack": "4.5.0",
|
||||||
|
"webpack-cli": "2.0.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const webpack = require('webpack')
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: {
|
||||||
|
playground: './playground/index.js'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
filename: '[name].js',
|
||||||
|
path: __dirname + '/static/'
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
presets: ['env']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
3727
website/yarn.lock
3727
website/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue