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',
'./packages/*/tsconfig.json',
'./packages/*/devEnv/tsconfig.json',
'./examples/*/tsconfig.json',
],
},
rules: {

1
.gitignore vendored
View file

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

View file

@ -3,7 +3,7 @@ module.exports = function (api) {
const config = {
presets: [['@babel/preset-react'], ['@babel/preset-typescript']],
babelrcRoots: ['.', './packages/*', './theatre/*'],
babelrcRoots: ['.', './packages/*', './theatre/*', './examples/*'],
}
if (env === 'test') {
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": {
"start": "parcel serve ./index.html"
},

View file

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

View file

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

View file

@ -2123,6 +2123,21 @@ __metadata:
languageName: node
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":
version: 2.2.5
resolution: "@iarna/toml@npm:2.2.5"
@ -16362,21 +16377,6 @@ fsevents@^1.2.7:
languageName: node
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:.":
version: 0.0.0-use.local
resolution: "theatre-monorepo@workspace:."