Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 2.66 KB

CONTRIBUTING.md

File metadata and controls

80 lines (56 loc) · 2.66 KB

Contributing to IBM Gantt Chart

Requirements for development

  • Recent Node and Npm installed. I currently use node v10.10.0 and npm v6.8.0
  • Install yarn with npm i -g yarn
  • Install lerna with npm i -g lerna

How to develop?

  1. Install required packages with yarn install (Don't pay attention to unmet peer dependency warnings).

  2. Link the different packages with lerna link

  3. Go into the dev package. i.e. cd packages/ibm-gantt-dev

  4. Start dev examples yarn start

  5. Open https://localhost:8080/basic.html

Note: Build relies on gda-scripts that provides (kind of) webpack presets and useful scripts (sort of create-react-app for libraries).

How to publish?

  1. Bump version of all packages with lerna version (necessary before building to inject the proper version number)

  2. Build all packages lerna run build:all

  3. Publish all packages lerna publish from-package --no-git-reset

How to follow guidelines?

This projects follows a quite opinionated convention for formatting and linting. But don't worry, it's all automatic. Use yarn check:fix to properly format your code and fix common issues (i.e. missing , ou ;) or yarn check:list to only list issues.

Note: a pre-commit script will enforce formatting and linting.

Recommended extensions for VS Code

Use the following extensions to automatically format files on save and display linting errors. Import sorting is manually triggered on alt+command+o

You may use the following settings to configure the extensions:

settings.json

{
  "editor.formatOnSave": true,
  "editor.rulers": [120],
  "editor.tabSize": 2,
  "javascript.validate.enable": false,
  "eslint.autoFixOnSave": true,
  "stylelint.enable": true,
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "prettier.eslintIntegration": true,
  "prettier.stylelintIntegration": true,
  "prettier.printWidth": 120,
  "prettier.singleQuote": true,
  "prettier.trailingComma": "es5",
  "sort-imports.on-save": false
}

keybinding.json

[
  {
    "key": "alt+cmd+o",
    "command": "sort-imports.sort"
  }
]