1
0
Fork 0
 
 
 
Go to file
Jonathan Clem a26c57109e
Update README.md
2019-04-22 11:46:19 -04:00
.github Add `lerna bootstrap` to main.workflow 2019-04-20 11:07:55 -04:00
packages Make use of @actions/exit in @actions/toolkit 2019-04-20 10:54:42 -04:00
.gitignore Add Toolkit class w/logging & exits 2019-04-19 17:00:42 -04:00
.prettierrc.json Add ESLint and Prettier tooling 2019-04-19 15:35:44 -04:00
LICENSE.md Add license files 2019-04-20 10:38:10 -04:00
README.md Update README.md 2019-04-22 11:46:19 -04:00
jest.config.js Add working Jest & TypeScript config 2019-04-19 15:15:34 -04:00
lerna.json Initialize a Lerna project 2019-04-19 14:29:24 -04:00
package-lock.json Add Toolkit class w/logging & exits 2019-04-19 17:00:42 -04:00
package.json Add `lerna bootstrap` to main.workflow 2019-04-20 11:07:55 -04:00
tsconfig.json Rename packages/github to packages/toolkit 2019-04-19 15:52:23 -04:00

README.md

Actions Toolkit 🛠

Packages

Package Description
@actions/exit Provides utilities for exiting from an action
@actions/toolkit A general-purpose toolkit for writing actions

Development

This repository uses Lerna to manage multiple packages. Read the documentation there to begin contributing.

Useful Scripts

  • npm run bootstrap This runs lerna bootstrap which will install dependencies in this repository's packages and cross-link packages where necessary.
  • npm run build This compiles TypeScript code in each package (this is especially important if one package relies on changes in another when you're running tests). This is just an alias for lerna run tsc.
  • npm run format This checks that formatting has been applied with Prettier.
  • npm test This runs all Jest tests in all packages in this repository.
    • If you need to run tests for only one package, you can pass normal Jest CLI options:
      $ npm test -- packages/toolkit
      

Creating a Package

  1. In a new branch, create a new Lerna package:
$ lerna create @actions/new-package

This will ask you some questions about the new package. Start with 0.0.0 as the first version (look generally at some of the other packages for how the package.json is structured).

  1. Add a tsconfig.json file for the new package (you can probably just reuse one from another existing package):
$ cp packages/toolkit/tsconfig.json packages/new-package/tsconfig.json
  1. Add tsc script to the new package's package.json file:
"scripts": {
  "tsc": "tsc"
}
  1. Start developing 😄