build: migrate widget doc generation script, ungit widget reference
This commit is contained in:
parent
6b68237f41
commit
4c98442fed
7 changed files with 1615 additions and 1479 deletions
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -1,6 +1,17 @@
|
|||
# npmg
|
||||
node_modules/
|
||||
dist/
|
||||
|
||||
# build
|
||||
/app/
|
||||
|
||||
# python/midi build
|
||||
*.pyc
|
||||
src/server/python/build
|
||||
src/server/python/__pycache__
|
||||
|
||||
# docs build
|
||||
src/docs/widgets-reference.js
|
||||
properties-reference.md
|
||||
|
||||
# packaging
|
||||
dist/
|
||||
|
|
|
|||
1994
package-lock.json
generated
1994
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -100,7 +100,7 @@
|
|||
"watch-server": "npm run build-server-js -- --watch",
|
||||
"build-launcher-js": "rollup -c scripts/launcher.rollup.config.js",
|
||||
"watch-launcher": "npm run build-launcherr-js -- --watch",
|
||||
"build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets/properties-reference.md && cd resources && python3 -m mkdocs build",
|
||||
"build-docs": "rollup -c scripts/docs.rollup.config.js && node src/docs/widgets-reference.js > resources/docs/docs/widgets/properties-reference.md && cd resources && python3 -m mkdocs build",
|
||||
"lint": "eslint src --ext mjs",
|
||||
"test": "npm run lint && npm run build && node tests/test.js"
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
25
scripts/docs.rollup.config.js
Normal file
25
scripts/docs.rollup.config.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var commonjs = require('@rollup/plugin-commonjs'),
|
||||
nodeResolve = require('@rollup/plugin-node-resolve'),
|
||||
json = require('@rollup/plugin-json')
|
||||
|
||||
module.exports = {
|
||||
input: 'src/docs/widgets-reference.mjs',
|
||||
output: [
|
||||
{
|
||||
file: 'src/docs/widgets-reference.js',
|
||||
inlineDynamicImports: true,
|
||||
format: 'commonjs',
|
||||
sourcemap: false,
|
||||
strict: false,
|
||||
indent: false,
|
||||
name: '_'
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
json(),
|
||||
nodeResolve({
|
||||
browser: true
|
||||
}),
|
||||
commonjs()
|
||||
]
|
||||
};
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
// Dirty browser window shim
|
||||
import * as DOM from '../client/dom'
|
||||
|
||||
document = {
|
||||
createElement: x=>({
|
||||
ownerDocument: document,
|
||||
addEventListener: ()=>{},
|
||||
style: {},
|
||||
contentWindow: {},
|
||||
nodeName: '',
|
||||
|
|
@ -20,6 +22,7 @@ document = {
|
|||
}
|
||||
}
|
||||
}),
|
||||
getElementById: ()=>document.createElement(),
|
||||
createTextNode: x=>({
|
||||
nodeValue: '',
|
||||
nodeName: '',
|
||||
|
|
@ -71,15 +74,14 @@ window = {
|
|||
getItem(){return null},
|
||||
setItem(){},
|
||||
},
|
||||
MutationObserver: class MutationObserver{}
|
||||
MutationObserver: class MutationObserver{},
|
||||
ELECTRON_NOGPU: false,
|
||||
CANVAS_FRAMERATE: 1,
|
||||
LANG: 'en',
|
||||
ENV: {id: ''},
|
||||
IP: '',
|
||||
DOM
|
||||
|
||||
}
|
||||
|
||||
Object.assign(global, window)
|
||||
|
||||
// Required globals
|
||||
|
||||
ELECTRON_NOGPU = false
|
||||
CANVAS_FRAMERATE = 1
|
||||
LANG = 'en'
|
||||
ENV = {id: ''}
|
||||
IP = ''
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// import './client-shim'
|
||||
import widgets from '../src/client/widgets/index.js'
|
||||
import baseClass from '../src/client/widgets/common/widget.js'
|
||||
import './client-shim.mjs'
|
||||
import baseClass from '../client/widgets/common/widget.mjs'
|
||||
import * as widgets from '../client/widgets/index.mjs'
|
||||
|
||||
// Here we go
|
||||
var base = baseClass.defaults(),
|
||||
Loading…
Add table
Add a link
Reference in a new issue