webpack-to-ardoq

0.2.2 • Public • Published

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()),'')
  1. 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()),'')
  1. 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.

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-to-ardoq

Weekly Downloads

1,336

Version

0.2.2

License

MIT

Unpacked Size

14.6 kB

Total Files

9

Last publish

Collaborators

  • oyvinmar
  • alicja.majewska.ardoq
  • sseppola
  • rafaa2
  • hegelstad
  • totokaka
  • michaltaberski-ardoq
  • davidnegleyardoq
  • chriskr
  • oyvindsabo
  • holographic-principle
  • tomoboy
  • john.sloat