If you're not sure where to start? You'll probably want to learn a bit about a few topics before getting dirt in your hands.
- ASTs (Abstract Syntax Tree): this project makes heavy use of code transformation with Babel and GraphQL. Check out AST Explorer to learn more about ASTs interactively
- Babel: I'd recommend a read to the the Babel Plugin Handbook to understand how a plugin is written.
- GraphQL: the GraphQL.js module is not only meant to build servers, it also exports a core subset of GraphQL functionality for creation of GraphQL type systems.
- Lerna: this is mono repository and we use Lerna to manage our packages.
- Yarn workspaces: Lerna is setup to be used with Yarn workspaces.
Have read this contributing guide and still need some help? Feel free to ping me on twitter, I can be found as @miguel_albernaz.
As Lerna is configured in this package to be used with Yarn, not using NPM will save you a lot of time.
$ git clone https://github.com/grafoojs/grafoo
$ cd grafoo
$ yarn # this command will install dependencies and automatically build every package
As mentioned above after every yarn
install all the packages are built automatically. But if you want to build then anyway just run:
$ yarn prepare
$ cd packages/[any-package]
$ yarn build
$ yarn test
I recomend the usage of NPX for any Lerna command if you don't want to install it globally.
$ npx lerna run test:coverage
$ cd packages/[any-package]
$ yarn test
$ cd packages/[any-package]
$ yarn test --watch
$ cd packages/[any-package]
$ yarn test:coverage