Moved examples to a separate folder

This commit is contained in:
Aria Minaei 2021-08-06 12:00:19 +02:00
parent d93b1a18d2
commit f4c2fb2a08
12 changed files with 24 additions and 19 deletions

View file

@ -27,6 +27,7 @@ module.exports = {
'./theatre/tsconfig.json', './theatre/tsconfig.json',
'./packages/*/tsconfig.json', './packages/*/tsconfig.json',
'./packages/*/devEnv/tsconfig.json', './packages/*/devEnv/tsconfig.json',
'./examples/*/tsconfig.json',
], ],
}, },
rules: { rules: {

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
**/xeno **/xeno
/packages/*/dist /packages/*/dist
/theatre/*/dist /theatre/*/dist
/examples/*/dist
*.log *.log
*.temp *.temp
/.vscode /.vscode

View file

@ -3,7 +3,7 @@ module.exports = function (api) {
const config = { const config = {
presets: [['@babel/preset-react'], ['@babel/preset-typescript']], presets: [['@babel/preset-react'], ['@babel/preset-typescript']],
babelrcRoots: ['.', './packages/*', './theatre/*'], babelrcRoots: ['.', './packages/*', './theatre/*', './examples/*'],
} }
if (env === 'test') { if (env === 'test') {
config.presets.unshift(['@babel/preset-env', {targets: {node: 'current'}}]) config.presets.unshift(['@babel/preset-env', {targets: {node: 'current'}}])

View file

@ -1,5 +1,6 @@
{ {
"name": "theatre-example-dom", "name": "@examples/basic-dom",
"private": "true",
"scripts": { "scripts": {
"start": "parcel serve ./index.html" "start": "parcel serve ./index.html"
}, },

View file

@ -37,8 +37,9 @@ export default function useDrag(
const optsRef = useRef<typeof opts>(opts) const optsRef = useRef<typeof opts>(opts)
optsRef.current = opts optsRef.current = opts
const modeRef = const modeRef = useRef<'dragStartCalled' | 'dragging' | 'notDragging'>(
useRef<'dragStartCalled' | 'dragging' | 'notDragging'>('notDragging') 'notDragging',
)
const stateRef = useRef<{ const stateRef = useRef<{
dragHappened: boolean dragHappened: boolean

View file

@ -4,6 +4,7 @@
"version": "0.4.0-dev.8", "version": "0.4.0-dev.8",
"workspaces": [ "workspaces": [
"packages/*", "packages/*",
"examples/*",
"theatre" "theatre"
], ],
"scripts": { "scripts": {

View file

@ -2123,6 +2123,21 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@examples/basic-dom@workspace:examples/basic-dom":
version: 0.0.0-use.local
resolution: "@examples/basic-dom@workspace:examples/basic-dom"
dependencies:
"@theatre/core": "workspace:*"
"@theatre/studio": "workspace:*"
"@types/react": ^17.0.9
"@types/react-dom": ^17.0.6
parcel-bundler: ^1.12.5
react: ^17.0.2
react-dom: ^17.0.2
typescript: ^4.3.2
languageName: unknown
linkType: soft
"@iarna/toml@npm:^2.2.0": "@iarna/toml@npm:^2.2.0":
version: 2.2.5 version: 2.2.5
resolution: "@iarna/toml@npm:2.2.5" resolution: "@iarna/toml@npm:2.2.5"
@ -16362,21 +16377,6 @@ fsevents@^1.2.7:
languageName: node languageName: node
linkType: hard linkType: hard
"theatre-example-dom@workspace:packages/example-dom":
version: 0.0.0-use.local
resolution: "theatre-example-dom@workspace:packages/example-dom"
dependencies:
"@theatre/core": "workspace:*"
"@theatre/studio": "workspace:*"
"@types/react": ^17.0.9
"@types/react-dom": ^17.0.6
parcel-bundler: ^1.12.5
react: ^17.0.2
react-dom: ^17.0.2
typescript: ^4.3.2
languageName: unknown
linkType: soft
"theatre-monorepo@workspace:.": "theatre-monorepo@workspace:.":
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "theatre-monorepo@workspace:." resolution: "theatre-monorepo@workspace:."