-
-
Notifications
You must be signed in to change notification settings - Fork 5
Developer Guide
ifctool has 2 workspaces, lib
and tool
. Workspaces are a feature of npm, that allows multiple sub-packages to be maintained and sync'd with each other. In our case, tool depends on lib.
tool
is the wrapper around lib to make a command-line tool that parses flags, reads a local file, prints results to stdout and stderr, and yields a return code for success or error
lib
is the core functionality of ifctool. It's based on web-ifc and adds functionality we find missing in web-ifc.
lib
exports are defined in lib/src/index.js, which simply re-exports all top-level exports from lib/src/Ifc.js. Maybe this should change to explicitly name exports for a more stable API.
There are currently 4 locations where version is harcoded. These are kept in sync manually See issue. Each should be updated to the new version you're building:
tool/package.json
lib/package.json
lib/src/version.js
From within the lib directory:
npm pack --pack-destination ~
This will drop an archive file in your home directory, e.g.: ~/bldrs-ai-ifclib-5.2.4.tgz
. This can be used in your package.json
with:
"@bldrs-ai/ifclib": "file:/Users/pablo/pm/Share/bldrs-ai-ifclib-5.2.3.tgz",
Note that npm
allows a ~
path, while yarn
requires more explicit paths; the example above is safe for me for both.
Once the NPM is built and validated
npm publish --access public --tag beta
Then go to your client project, and switch the import to test the new version from its network host:
"@bldrs-ai/ifclib": "^5.2.3",
And finally tag as default latest and commit the changes:
npm dist-tag add @bldrs-ai/ifclib@5.2.3 latest
git add . ; git ci -m 'v5.2.3'