| description | Instructions for setting up a development environment. |
|---|
Instructions for setting up a development environment.
::: tip Please see our contribution guidelines before submitting your first pull request. :::
The following sets up a development environment of the compiler where editing the sources applies changes immediately without having to go through a build step:
git clone https://github.com/AssemblyScript/assemblyscript.git
cd assemblyscript
npm install
npm linkNote that a development environment runs the sources directly by default, but will use distributions files once built. Cleaning the distribution files again with npm run clean resets this. Whether asc is running the sources or distribution files can be determined by checking the displayed version number. If it states -dev, it runs the sources directly.
To build an UMD bundle to dist/assemblyscript.js (depends on binaryen.js), including a browser version of asc to dist/asc.js (depends on assemblyscript.js):
npm run buildCleaning the distribution files (again):
npm run cleanLinting potential changes:
npm run checkRunning the tests:
npm testRunning everything in order (check, clean, test, build, test):
npm run allThe test suite is composed of a set of tests for each component, like the parser, the compiler and runtime. For each pull request, all the tests are run automatically and the PR only goes green if it passes all of them. Please see the instructions within the repository for all the details.