0.6.6 • Published 2 years ago

insiw v0.6.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Interactive SI Widget (InSIW)

This is the new interactive widget made for the SI widget.

How to run

Due to the irritation that is switching local node versions all the time, there is a docker image that handles node for you. Note that due to .npmrc reasons, npm i needs to be run from outside the container. A future improvement would be to handle this better, but it's not a priority for now.

In order to build it:

./tools/dev/build.sh

In order to run it:

./tools/dev/run.sh

The dev command should be run from within the container, to make sure that it works for all.

CLI Commands

  • npm install: Installs dependencies

  • npm run dev: Run a development, HMR server

  • npm run serve: Run a production-like server

  • npm run build: Production-ready build

  • npm run lint: Pass TypeScript files using ESLint

  • npm run test: Run Jest and Enzyme with enzyme-adapter-preact-pure for your tests

For detailed explanation on how things work, checkout the CLI Readme.

How to deploy

QA

Deploying the iframe to qa is done by pushing a commit. The new version of the code will be available here after a few minutes.

Staging

Deployment is done using git tags. When you are happy with what you have developed, and want to cut a new version, run

git tag -a <version> -m '<message>'

Please make sure to add a sensible message, as this is the main way of documenting what your new version will introduce.

NOTE: Also change the version in the package.json file!

Once you have tagged the version you are happy with, remember to push the tag.

git push --tag

Also remember to push your code changes.

You can now, at any time, deploy that version to either staging or prod, using the setup manual workflows in Github.

Run

git tag -n

in order to list all tags.

Prod

The deployment to prod is done in the same way as to staging. Note that this step will also publish a new version to npm!