Closed AlanSl closed 4 years ago
Latest commits fix merge conflicts and most tests, for the other tests I need to generate new samples.
With the last couple of commits this beast should be ready to review. Tests pass locally, failing on CI because I think GitHub Workflow is for some reason trying to install from the pubishConfig
registry, which isn't available until we can do npm run start:verdaccio
, which we ideally wouldn't want to do and can't do until the deps are installed anyway...
I don't think any of us actually have time to review today so I'll come back and fix that later and prioritise making more ground on the next PR!
Latest commits add in latest Master, fix some issues there with using the new protobuf, and fix CI.
I'll fill in the missing tests and docs when I'm back on Wednesday.
As discussed I'll merge this as-is to keep momentum on the design implementation, and I've added tickets to Trello for updating the docs and package readmes and for the test on the create-widget CLI itself
This PR does three interlinked things:
After this, someone developing a widget can go from an empty directory to a new widget with dev env ready to start with a one-line command:
mkdir some-widget && cd "$_"
), use NPM’s init script (or yarn create also works):npm init @libp2p-observer/widget
npm i
(after public publication) ornpm i --registry="http://localhost:4873/"
(while using the local registry described below)npm run storybook
and get developingThe widget demo in storybook is hooked up to a data sample complete with shell and other config such as linting already set up matching the main project. The default widget has some example content demonstrating how a typical component looks and allowing the user to easily explore available data:
This also allows people working on the main project to conveniently test publishing before publishing to a public repo:
npm run start:verdaccio
, which uses docker and stores local registry content in gitignored./verdaccio/storage
where published tarballs can be easily inspectednpm run storybook:component-name
andnpm run start:catalogue
for hot-reloading demosnpm run local-publish
npm install --registry="http://localhost:4873/" instead of
npm i`npm local-unpublish
thennpm local-publish
to try again.As well as easy local file storage access to locally published test packages, they can be browsed using the Verdaccio UI: