0.2.2 • Published 4 years ago

webpack-to-ardoq v0.2.2

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

Setup

  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 empty, flexible workspaces. One for sources and one for libraries
  6. In the libraries workspace create this type hierarchy:
  • Library folder
  • Library
  1. In the sources workspace, create the following component types:
  • Folder
  • Javascript
  • Typescript
  • Style
  • Template
  • Graphic
  • Font
  • Other
  1. Also create the following reference types in both workspaces
  • imports
  • requires
  1. Set the organization and workspace ids in the config
  1. 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()),'')
  2. 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()),'')
  3. 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

Build

Run npm run build to transpile files in /src to ES6 in /dist.

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago