Skip to content

Latest commit

 

History

History
120 lines (98 loc) · 5.69 KB

CONTRIBUTING.md

File metadata and controls

120 lines (98 loc) · 5.69 KB

Contributing

Getting Started

  • Install just
  • Fork and clone the repo
  • Create, activate & install dependencies
$ python -m venv venv
$ . venv/bin/activate
$ just install

Coding style

Linters

  • $ just lint to run them all.
  • pylint & flake8: $ just lint-python
  • eslint: $ just lint-js

Formatter

Format js code with prettier:

$ npm run format

Commit messages

Prefix your commit messages with an emoji according to this list:

Commit type Emoji
Initial commit 🎉 :tada:
Version tag 🔖 :bookmark:
New feature :sparkles:
Bugfix 🐛 :bug:
Metadata 📇 :card_index:
Documentation 📚 :books:
Documenting source code 💡 :bulb:
Performance 🐎 :racehorse:
Cosmetic 💄 :lipstick:
Tests 🚨 :rotating_light:
Adding a test :white_check_mark:
General update 🚧 :construction:
Improve format/structure 🎨 :art:
Move code 🐾 :feet:
Refactor code 🔨 :hammer:
DRY up code 🐫 :camel:
Removing code/files 🔪 :hocho:
Continuous Integration 💚 :green_heart:
Security 🔒 :lock:
Upgrading dependencies ⬆️ :arrow_up:
Downgrading dependencies ⬇️ :arrow_down:
Lint 👕 :shirt:
Translation 👽 :alien:
Text 📝 :pencil:
Critical hotfix 🚑 :ambulance:
Deploying stuff 🚀 :rocket:
Fixing on MacOS 🍎 :apple:
Fixing on Linux 🐧 :penguin:
Fixing on Windows 🏁 :checkered_flag:
Adding CI build system 👷 :construction_worker:
Analytics or tracking code 📈 :chart_with_upwards_trend:
Removing a dependency :heavy_minus_sign:
Adding a dependency :heavy_plus_sign:
Docker 🐳 :whale:
Configuration files 🔧 :wrench:
Bundles update 📦 :package:
Merging branches 🔀 :twisted_rightwards_arrows:
Bad code / need improv. 💩 :hankey:
Reverting changes :rewind:
Breaking changes 💥 :boom:
Code review changes 👌 :ok_hand:
Accessibility :wheelchair:
Move/rename repository 🚚 :truck:
Add component(s) 🍚 :rice:
Other Be creative

Guides

Adding features, components and bug fixes

  • If you add a feature or fix a bug, it should also have a test.
  • Features and component should have a standalone demo in tests/apps/pages or tests/components/pages.
  • Bundle tests by package/system, components tests in tests/components.

Upgrading a package vendors

  • Get a new external url
  • Download the url to vendors (eg: cd dazzler/assets/vendors && wget https://unpkg.com/react@16.8.6/umd/react.production.min.js)
  • Ensure new filename has version in it for cache breaking, vendors are copied flat.
  • Also download dev bundles to vendors if available.
  • Change the requirements urls and paths.

Adding a new component package

  • Create a new directory in src for the components.
  • Add webpack entrypoint.
  • Add a package in dazzler/components/<package_name>/__init__.py (Copy dazzler/components/core/__init__.py and change _name)
  • Add a build:dazzler::<package_name> npm command, add the comma

Component creation

  • Build the components: $ just build.
  • Watch $ just watch.
  • Components styles should be using css classes primarily.
  • SCSS for styling, scoped with library-name-component-name.
  • Spinal casing for css classes.
  • extension .(t|j)sx for react components .(t|j)s otherwise.
  • Include a docstring for every component/props.
  • Include a test page in tests/components/pages.
  • Include an acceptance test in tests/components/test_[package_name].py

Release

  • Run $ just publish