-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Contributing
Thanks for being interested in contributing to this project! Here are some steps and notes for you before you go.
- Share Your Wenyan Scripts
- Share Your Works Related to Wenyan
- Contribute to Code
- Contribute to Documentation
- Contribute to Online IDE
- Contribute to Standard Library
- Contribute to Testing
To share your scripts, you can:
- Publish your code snippets on the Snippets Site
- Add examples to the main repo
- Create and publish your own packages on wyg
Made a tool/work for wenyan? Cool! Open an issue and share your work. We will add it to our wiki pages.
WIP
WIP
WIP
WIP
Check out the Testing Section.
You will need Node.js version 10+
After cloning the repo, run:
# install all the dependencies
npm i
# watch and auto re-build code into dist
$ npm run dev
# watch and auto re-build code for online ide
$ npm run dev:site
# directly run and test cli without building
$ npm run cli
# build all dist files, including npm packages
$ npm run build
# run the full test suite, including linting/type checking
$ npm test
There are some other scripts available in the scripts section of the package.json
file.
Please make sure to have this pass successfully before submitting a PR. Although the same tests will be run against your PR on the CI server, it is better to have it working locally.
-
tools
: contains build-related scripts and configuration files. Usually, you don't need to touch them. -
dist
: contains built files for distribution. -
typings
: contains type declarations for Typescript. These declarations are generated alongside with building. Usually, you don't need to worry about them either. -
test
: contains all tests. The unit tests are written with Jest. Refer to this Section for more details. -
static
: contains files of the Online IDE and website. -
examples
: contains examples contributed by the community. They will also be bundled into the Online IDE. -
site
: the legacy website files. Using to redirect to the new one. -
lib
: contains the Standard Libraries. The subfolders are for language-specified codes. -
documentation
: the legacy documentation files. Please use wiki now. -
src
: contains the source code. The codebase is written in Typescript with ES2015 syntax.-
transpilers
: contains code for the transpiling to different target languages. -
parser.ts
: contains code for the compiler core. -
runtime.ts
: contains code for Browser Runtime. -
cli.ts
: contains code for Command Line Interface.
-
Don't worry about the code style as long as you install the dev dependencies. Git hooks will format and fix them for you on committing.
Our Code of Conduct is a guide to make it easier to enrich all of us and the technical communities in which we participate.