The following are the basic expectations of wikibonsai projects. Divergences will be noted in the corresponding CONTRIBUTING.md of other projects.
$ git clone https://github.com/wikibonsai/<repo-name>$ yarn install$ yarn buildwill clean/rm build files and rebuild the project.
$ yarn rebuild$ yarn test$ yarn add /path/to/build/filesBasic:
$ yarn testTargeted:
$ yarn test -g 'general test scenario; specific test scenario;'publish npm package
-
Test project (see 'test' above).
-
(Re)Build project (see '(re)build' above).
-
Publish package.
yarn publish- Copy build into
releases/dir (not in repo).
#todo
$ bundle install --local /path/to/gem
$ bundle install
$ bundle exec rspec spec
$ bundle exec rake build
gem 'gem-name'; path: /path/to/gem/
$ bundle exec jekyll serve --trace
$ bundle exec rake release
Reuse regex, constants, and other utilities from base packages rather than re-implementing them — so long as it doesn't pull in an extraneous dependency. Depend vertically, never sideways or circularly:
wikirefs (base) → marked-/markdown-it-/remark-wikirefs (parsers) → apps / ssgs
caml-mkdn (base) → marked-/markdown-it-/remark-caml (parsers) → apps / ssgs
A wikirefs parser already depends on the base wikirefs lib, so it should reuse wikirefs.RGX / wikirefs.CONST / wikirefs.slugify instead of hand-rolling them. But a *-caml parser must not add a wikirefs dependency just to borrow a regex — caml parsers stay standalone (they depend only on caml-mkdn), so they duplicate the small bit of logic instead. Duplicate before you couple sideways.