Core plugins for Alethio Explorer
The project contains 3 core plugins that provide basic explorer functionality and which share the same codebase, dependencies and build process. Each plugin has a folder in packages/<pluginName>
, from which a separate npm package is created:
- eth-common - common pages and modules that should be available regardless of what data source is used
- eth-extended - pages, modules and data sources specific to the "full" explorer. This plugin uses the Alethio explorer API endpoints and a Deepstream connection
- eth-lite - a "lite" explorer plugin, using
web3
as a data source. It only offers what can be directly fetched from an eth node, without the aggregations provided by the Alethio API.
npm install
npm --add-python-to-path='true' --debug install --global windows-build-tools
npm install
just as with Linux
npm run watch
or npm run build-dev
.
You can acp link
any plugin folder into your block explorer installation.
$ npm i -g @alethio/cms-plugin-tool
$ cd <explorer-checkout-folder>
$ acp link ../explorer-core-plugins/packages/eth-common \
../explorer-core-plugins/packages/eth-extended \
../explorer-core-plugins/packages/eth-lite
npm test
(or npm run test-coverage
to generate code coverage as well).
Test coverage is written to ./coverage
in HTML and LCOV formats.
- Changes are proposed via pull requests and merged into master after they obtain approval.
- Releases are made from master, by a maintainer, collecting changes that were made since the previous release.
- A new independent version is chosen for plugins that were affected, according to semver.
- Changes are documented in CHANGELOG files, found in each package folder, committed and pushed to master.
- Publish to npm, with implicit git tags and corresponding release (see below).
This repo uses lerna. Because the source code is shared between packages, lerna will not automatically detect which packages were changed. The following commands need to be executed:
npx lerna version --force-publish=<explicitly_changed_package_names>
e.g. npx lerna version --force-publish=@alethio/explorer-plugin-eth-common,@alethio/explorer-plugin-eth-lite
npx lerna publish from-git