Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md

README.md

📌 index / 💻 developers guidelines

👨‍💻 Developers Guidelines

This document provides specifications on how-to contribute to the project.

🗃 Branch's

Name Type Checkout Description
nightly alpha git checkout nightly All pull request here, draft code and tests
beta beta git checkout beta If nightly correctly works, merge in beta
master stable git checkout master If beta correctly works, merge in master

All developers will work in nightly or in sub-branch of nightly. Git flow is recommended. Only owner (example: @ptkdev) merges in beta and merges in master if code works correctly after tests.

🗄 Update your fork (sync your code of branch)

If you fork the repo for contributions before send pull request you need align your source code to latest version. This is a simple task, run:

  1. npm run git-set-upstream (only once)
  2. npm run git-pull-upstream (sync your code before sending pull request)

🚩 Commit message

It's recommended, for consistency, to use similar commit message. I love [Tag] Message syntax. Example:

Message Status Description
[Feature] Available likemode_name Good Tag Feature is ok
[Fix] Bad selector likemode_name Good Tag Fix is ok
[Test] New test for likemode_name Good Tag Test is ok
[Update/Test] Test likemode_name Good Multiple tags is ok
[Refactor] Utils constructor Good Tag Refactor is ok
[Update] package.js Good Tag Update is ok
Update AUTHORS.md Bad Missing [ ]
Fix Bad Useless comment, missing [ ]
[Fix]text text text Bad Need space after ]
[Fixs] Bad selector likemode_name Bad Don't use plural tag name

🐍 Linter and snake_case

Important: Is recommended to use eslint globally (npm install eslint -g) and use vs-code or sublime-text with eslint plugin.

npm run lint provides show syntax errors (eslint plugin in ide/editor will show it automatically). After git commit the eslint, run --fix command and it'll fix automatically 90% of syntax errors.

Other eslint rules are marked in eslintrc.json file, check it.

🐝 Syntax

Type Syntax Note
class Snake_case First letter uppercase (capital letter)
method snake_case Lower case
function snake_case Lower case
var name snake_case Lower case
let name snake_case Lower case
const name snake_case Lower case
enum / struct SNAKE_CASE All letters uppercase (all capital letters)

It happens that another library use camelCase method and eslint --fix convert camelCase method in snake_case. A solution for this problem is to add method or variable names in eslintrc.json whitelist.

Example: "snakecasejs/whitelist": ["defaultViewport","executablePath"] that ignores executablePath and defaultViewport camelCase name. See snakecasejs.

🍄 NPM Version and package.json

Name Branch Description
1.0-nightly.20180101 nightly Version-BranchName-YearMonthDay
1.0-beta.1 beta Version-BranchName-NumberOfBeta
1.0 master Version

Update the suffix value (in nightly branch) to current date. See semver.

Dependences are all set on @latest, IMHO is good, supports latest version of libraries (why? in primis: security!)

🎁 Support: Donate

💫 License

  • Documentation and Contributions have CC BY 4.0 License
  • Images and Logos have CC BY-NC 4.0 License
  • Code Snippets/Examples have MIT License
Copyleft (c) 2018-2019 Patryk Rzucidło (@PTKDev) <support@ptkdev.io>
You can’t perform that action at this time.