npm scripts - theRAPTLab/gsgo GitHub Wiki

  • npm run bootstrap -- runs lerna bootstrap, which is a distinct operation from building the libraries. It's essentially part of package management. It essentially deletes ALL the node_modules directories, reinitializes each project in gs_packages, then figures out which ones are common and can be moved to the top-level so there aren't duplicates, and rewrites links as necessary (or it used to, npm may have changed). Bootstrap is only needed when adding any package through npm install . You should always run bootstrap afterwards.

  • npm start -- runs build and multiview gem

  • npm run mcp -- runs the asset server, without all the gemsrv stuff. This is used to test the asset server stand-alone

  • npm run build -- builds everything, including URSYS so it generates the target libraries client.js and server.js that what is actually loaded when doing the import UR from '@gemstep/ursys/client' The reason npm run build is necessary is because when the gsgo repo is downloaded, the "library version" of URSYS has not yet been compiled into server.js and client.js; these are what are loaded by:

    • import * as UR from '@gemstep/ursys/client' on the client side
    • const UR = require('@gemstep/ursys/server') for server code:

    The client.js and server.js files are not committed to the repo currently, but we could probably allow them now that they are fairly stable.

  • npm run gem -- NOTE does NOT build the system. The reason for taking it out was because it would double or triple build when I was doing development simultaneously on URSYS and GEMSRV codebases. If you are NOT making changes to URSYS, you can instead just do npm run build after npm run bootstrap for a fresh install, but for the researcher end user case just doing npm run start after the bootstrap should be sufficient.

Special Development Scripts

  • npm run ursys -- a live compiler for the URSYS library for when Sri is modifying it when also modifying GEM server. Just for developing ursys using live reload
  • npm run sridev -- special script just for Sri's development process
  • *:multi -- creates multiple column views

Deprecated Scripts

  • npm run admin -- old admin panel mockup

See also

  • #335
⚠️ **GitHub.com Fallback** ⚠️