webpack-to-ardoq
v0.2.2
Published
1. `npm install` 2. Copy `config-sample.json` to `config.json` 3. Choose an org to use, and create a folder for the new workspaces 4. Generate an API token for the script, and configure the `connection.token` property in the config file 5. Create two empt
Downloads
635
Maintainers
Keywords
Readme
Setup
npm install
- Copy
config-sample.json
toconfig.json
- Choose an org to use, and create a folder for the new workspaces
- Generate an API token for the script, and configure the
connection.token
property in the config file - Create two empty, flexible workspaces. One for sources and one for libraries
- In the libraries workspace create this type hierarchy:
- Library folder
- Library
- In the sources workspace, create the following component types:
- Folder
- Javascript
- Typescript
- Style
- Template
- Graphic
- Font
- Other
- Also create the following reference types in both workspaces
- imports
- requires
- Set the organization and workspace ids in the config
- Find your organization label
- Find the workspace ids by setting each workspace as your context, and look at the url
- After opening the workspaces, run the following script in your browser console to get the component type ids:
ARDOQ.context.workspaces().reduce((a,w)=>a+'\n'+Object.values(w.getModel().getAllTypes()).reduce((b,t)=>`${b}\n ${t.name} - ${t.id}`,w.name()),'')
- Run the following for the reference types
ARDOQ.context.workspaces().reduce((a,w)=>a+'\n'+Object.values(w.getModel().getReferenceTypes()).reduce((b,t)=>`${b}\n ${t.name} - ${t.id}`,w.name()),'')
- Punch the ids into the config
USAGE
npm start /path-to/ardoq-front/ ./config.json [...options]
- Options:
- dryRun (skips import):
npm start /path-to/ardoq-front/ ./config.json dryRun
- clearCache (clears the webpack stats cache):
npm start /path-to/ardoq-front/ ./config.json clearCache
- dryRun (skips import):
Build
Run npm run build
to transpile files in /src to ES6 in /dist.