Skip to content

Latest commit

 

History

History
106 lines (68 loc) · 2.75 KB

DEVELOPMENT.md

File metadata and controls

106 lines (68 loc) · 2.75 KB

Development

Development Tips

  • Always set published: false(or removed it) In Article Front Matter ,If you're using your personal dev.to account for developement.
  • Sometime dev.to api may respond with 5xx.(Take a cup of coffee ☕ or listen the lo-fi beats 🎶 until dev.to team fix it.)
  • Set ACTIONS_RUNNER_DEBUG GitHub Secret to TRUE for extra logs 📃.

Tools / Devflow

Yarn

I'm using yarn as package manager. If you are using npm, You have to replace yarn with npm or create new script like this 👇. You also PullRequest this workaround in #Hacktoberfest .

...
  scripts: {
    "rebuild": "yarn clean && yarn build",
+   "rebuild:npm": "npm clean && npm build"
  }
...

🚨 Alert : don't change action script, Because Github Action using npm.I also added action:yarn for yarn.

Run Action locally:

To run this action locally,You have to use act. After Install act follow these steps.

Set dev.to api-key to Env variable

$ export TOKEN=<key here>

😎 Pro Tip: you also add this export command in your .zshrc or .bashrc.

Install packages

$ yarn install

Run

$ yarn dev

Run with Github Action

Push or Pull Request code to main branch. Code changes on *.md is not trigger build-test CI

Prepare Package for Release

Development Packaging

$ yarn pack:dev

Production Packaging

$ yarn package

Testing(with Jest)

Tests isn't written yet 😔

$ yarn test

Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist directory.

Then run ncc and push the results:

$ yarn package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

Note : I recommend using the --license option for ncc, which will create a license file for all of the production node modules used in your project.

Your action is now published! 🚀

See the versioning documentation

Awesome Docs/Tools

License - MIT