๋ฒ๊ทธ ์ ๊ณ
๋ฒ๊ทธ ์ค๋ช
์์ ์์๋ ์ธ๋ถ ๋ชจ๋ธ๊ณผ ์ด ๋ชจ๋ธ์ ์ธ์คํด์ค ๋ฐฐ์ด์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๊ทธ๋ ๊ฒ ํ ๋ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋ฒ์ 0.12.5๋ฅผ ์ฌ์ฉํ์ฌ ์ฝ๋๊ฐ ์๋ํ์ต๋๋ค. ๊ทธ๋ฌ๋ 0.12.13์์๋ ๋ ์ด์ ์๋ํ์ง ์์ต๋๋ค.
์ฌํํ๊ธฐ ์ํด
---name: Listroute: /metamodel/organisms/listmenu: Meta Model Organisms---import { Playground, PropsTable } from 'docz'import { List, ListComponent } from "./list.component";import { Person } from "../../docs/content/person";import { persons } from "../../docs/content/persons";import '../../../node_modules/@mgx/tools-component-library/tools-component-library.min.css';# List Component## Properties<PropsTable of={List} />## ExamplesFor the examples we use the model described on the [property page](/property).### Basic implementation<Playground> <ListComponent objectClass={Person} objects={persons} properties={[ "firstname", "lastname", "age", "gender" ]} /></Playground>
import { Model } from '../../metamodel/model';import { property } from '../../metamodel/property';export class Person extends Model { @property({ inputType: 'text', labelKey: 'First name' }) private _firstname: string; @property({ inputType: 'text', labelKey: 'Last name' }) private _lastname: string; @property({ inputType: 'number', labelKey: 'Age' }) private _age: number; @property({ inputType: 'select', labelKey: 'Gender' }) private _gender: number; constructor(id: string, firstname?: string, lastname?: string, age?: number, gender?: number) { super(id, `${firstname} ${lastname}`); this._firstname = firstname; this._lastname = lastname; this._age = age; this._gender = gender; } public get firstname(): string { return this._firstname; } public set firstname(firstname: string) { this._firstname = firstname; } public get lastname(): string { return this._lastname; } public set lastname(lastname: string) { this._lastname = lastname; } public get age(): number { return this._age; } public set age(age: number) { this._age = age; } public get gender(): number { return this._gender; } public set gender(gender: number) { this._gender = gender; }}
Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous>Could not create Open in CodeSandbox Error: Trying to access a filepath outside our scope at resolvePath (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer\dist\utils\resolvePath.js:26:17) at files.content.internalImports.map.m (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:45) at Array.map (<anonymous>) at Object.assembleFiles (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\codesandboxer-fs\src\assembleFiles.js:102:27) at <anonymous> ERROR Failed to compile with 1 errors 14:22:25 error in ./src/metamodel/model.tsModule build failed (from ./node_modules/happypack/loader.js):TypeError: Cannot read property 'name' of undefined at C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\react-hot-loader\dist\babel.development.js:145:24 at Array.forEach (<anonymous>) at PluginPass.Class (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\react-hot-loader\dist\babel.development.js:136:31) at newFn (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\visitors.js:193:21) at NodePath._call (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\path\context.js:53:20) at NodePath.call (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\path\context.js:40:17) at NodePath.visit (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\path\context.js:88:12) at TraversalContext.visitQueue (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\context.js:118:16) at TraversalContext.visitSingle (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\context.js:90:19) at TraversalContext.visit (C:\Users\guust.nieuwenhuis\Projects\tools-echo\node_modules\@babel\traverse\lib\context.js:146:19) @ ./src/docs/content/person.ts 33:0-46 116:2-7 @ ./src/metamodel/view/view.component.mdx @ ./.docz/app/imports.js @ ./node_modules/docz/dist/index.m.js @ ./node_modules/docz-theme-default/dist/index.js @ ./.docz/app/root.jsx @ ./.docz/app/index.jsx @ multi ./node_modules/@babel/polyfill/lib/index.js ./.docz/app/index.jsx
ํ๊ฒฝ
- ์ด์ ์ฒด์ : ์๋์ฐ 10
- ๋ ธ๋/npm ๋ฒ์ : v8.11.3/v5.6.0
์ถ๊ฐ ์ปจํ ์คํธ/์คํฌ๋ฆฐ์ท
ํ์ผ ๊ตฌ์กฐ์ ํจ๊ป ์คํฌ๋ฆฐ์ท์ ์ฒจ๋ถํ์ต๋๋ค.
guustnieuwenhuis
๐2
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
Docz๋ ํ์ฌ Windows์์ ์ฝ๋์๋๋ฐ์์ ์ด ๋ฒ๊ทธ๋ก ์ธํด ์์๋์์ต๋๋ค: https://github.com/codesandbox/codesandboxer/issues/33.
์ด๋ค ์ด์ ๋ก ์ด์ ์ ์ค๋ฅ๋ก ์ธํด ์ฑ์ด ์๋ํ๋ ๊ฒ์ ๋ง์ ์ ์์์ง๋ง ์ด์ Docz๋ Windows์์ ์ ํ ๋น๋๋์ง ์์ต๋๋ค. ํ์ฌ ํด๊ฒฐ ๋ฐฉ๋ฒ์ doczrc.js
์์ ์ด ์ต์
์ผ๋ก ์ฝ๋์๋๋ฐ์ค๋ฅผ ๋นํ์ฑํํ๋ ๊ฒ์
๋๋ค. { codeSandbox: false }
smathson ์ 2018๋ 12์ 18์ผ
๐4๐2
๋ชจ๋ 7 ๋๊ธ
์ด ์์ ๋๋ฌธ์ ์ด๋ฐ ์ผ์ด ์ผ์ด๋๊ณ ์๋ค๊ณ ์๊ฐํฉ๋๋ค.
import '../../../node_modules/@mgx/tools-component-library/tools-component-library.min.css';
node_modules
์์ ์ ๋ ๊ฐ์ ธ์ค๊ธฐ ๋์ ์๋ ๊ฒฝ๋ก๋ก ๋ชจ๋์ ํธ์ถํ์ญ์์ค.
pedronauck ์ 2018๋ 12์ 04์ผ
์ฝ๋์ ๋ํ ๊ฐ์ ธ์ค๊ธฐ๋ฅผ ์ ๊ฑฐํ์ง๋ง ๋ฌธ์ ๊ฐ ๊ณ์ ๋ฐ์ํฉ๋๋ค. ๋ด๊ฐ ์์์ฐจ๋ฆฐ ๊ฒ์ ๋ค์ ์ค์ ์ ๊ฑฐํ๋ฉด ์ค๋ฅ๊ฐ ์ฌ๋ผ์ง๋ค๋ ๊ฒ์ ๋๋ค.
import { Person } from "../../docs/content/person";import { persons } from "../../docs/content/persons";
์ฐธ๊ณ : ๊ฐ์ธ ํ์ผ๋ ๊ฐ์ธ ํ์ผ์ ๊ฐ์ ธ์ต๋๋ค. ๋ฐ๋ผ์ ๋ฌธ์ ๋ ๊ฑฐ๊ธฐ์ ์์ด์ผ ํฉ๋๋ค.
guustnieuwenhuis ์ 2018๋ 12์ 05์ผ
์์ ๊ฐ์ ์ค๋ฅ์ด๋ฉฐ ์ด์ํ ๊ฒ์ ๊ฐ์ ธ์ค์ง ์์ต๋๋ค. ๊ฐ์ ธ์ค๋ ์ ์ผํ ๊ฒ์ import * as Rw from '../../../components';
์ด๊ณ ์ด๊ฒ์ ์ฌ๋ฐ๋ฅธ ๊ฐ์ ธ์ค๊ธฐ์
๋๋ค. ๋น๋ ๋ฐ ๊ฐ๋ฐ ์ ๋ฐ์ํฉ๋๋ค. ์ ๋ ์๋์ฐ์์์. ๋ณํฉ๋ #491 pr๊ณผ ์ ์ฌํ Windows ๊ด๋ จ ๋ฌธ์ ์ผ ์ ์์ต๋๊น? Btw ๋ด ์ฝ๋๋ ๋ง์ ์ค๋ฅ๋ฅผ ๋ฐ์์ํค๋ฉด์ ์๋ํฉ๋๋ค.,
Kivylius ์ 2018๋ 12์ 12์ผ
์๋์ฐ 10์์๋ ๊ฐ์ ๋ฌธ์ ์
๋๋ค.
popuguytheparrot ์ 2018๋ 12์ 12์ผ
Docz๋ ํ์ฌ Windows์์ ์ฝ๋์๋๋ฐ์์ ์ด ๋ฒ๊ทธ๋ก ์ธํด ์์๋์์ต๋๋ค: https://github.com/codesandbox/codesandboxer/issues/33.
์ด๋ค ์ด์ ๋ก ์ด์ ์ ์ค๋ฅ๋ก ์ธํด ์ฑ์ด ์๋ํ๋ ๊ฒ์ ๋ง์ ์ ์์์ง๋ง ์ด์ Docz๋ Windows์์ ์ ํ ๋น๋๋์ง ์์ต๋๋ค. ํ์ฌ ํด๊ฒฐ ๋ฐฉ๋ฒ์ doczrc.js
์์ ์ด ์ต์
์ผ๋ก ์ฝ๋์๋๋ฐ์ค๋ฅผ ๋นํ์ฑํํ๋ ๊ฒ์
๋๋ค. { codeSandbox: false }
smathson ์ 2018๋ 12์ 18์ผ
๐4๐2
์ฌ๊ธฐ์ ๊ฐ์ ์ค๋ฅ
andrelmlins ์ 2018๋ 12์ 26์ผ
๋ค์ ์ค๋ฅ ์ค ์ผ๋ถ์ ๋ํ codesanboxer ๋ฌธ์์ ์ฐธ๊ณ ์ฌํญ( ์ฌ๊ธฐ ์์ ์ฐพ์ ์ ์์):
codesandboxer-fs
๋ ๋์ ํ์ผ์ด ์๋ ํจํค์ง์ ์ปจํ ์คํธ๋ฅผ ์ฌ์ฉํ๊ณ ํด๋น ํ์ผ์package.json
์ ๋ํ ์ฌ์ฉ ๊ฐ๋ฅํ npm ์ข ์์ฑ์ ๊ธฐ๋ฐ์ผ๋ก ํ๋ฉฐ ์ด ๋ฒ์ ๋ฐ์ ์์น์์ ๊ฐ์ ธ์จ ํ์ผ์ ํฌํจํ์ง ์์ต๋๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก codesandboxer์๋ ์์ ์กฐ์น๊ฐ ์์ต๋๋ค. ์ฆ, ํ ํจํค์ง์ ์๋ ๊ฒฝ์ฐ ๋ชจ๋ ธ ๋ฆฌํฌ์งํ ๋ฆฌ ๋ด์ ๋ค๋ฅธ ํจํค์ง์์ ์์ค ํ์ผ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค(๋์ ์ ๋ ๊ฐ์ ธ์ค๊ธฐ๋ฅผ ์์ํจ).
์ด๋ฌํ ์ค๋ฅ ์ค ์ผ๋ถ๋ Windows ๋ฌธ์ ๊ฐ ์๋๋ผ ์ด ๋ฌธ์ ์ฒ๋ผ ๋ณด์ ๋๋ค.
ํด๋น ํ๋ก์ ํธ์ ๋ํ ์ด ์ค๋ฅ ๋ฉ์์ง์ ๊ด๋ จ๋ ์๋ก์ด ๋ฌธ์ ๋ฅผ ๋ง๋ค์์ต๋๋ค. ๊ทธ๋์ ์ด๊ฒ์ ๊ณ ํต์ค๋ฝ์ง ์์ต๋๋ค: https://github.com/codesandbox/codesandboxer/issues/49
Noviny ์ 2019๋ 02์ 21์ผ
์ด ํ์ด์ง๊ฐ ๋์์ด ๋์๋์?
0 / 5 - 0 ๋ฑ๊ธ