If you would like to make a contribution to Nota, thanks for the help!
First, you need to install a development version of Nota on your machine. Ensure you have the versions of node and npm listed on https://nota-lang.org/. Then install pnpm, e.g. via
npm install --global pnpmThen download and build the repository via:
git clone https://github.com/nota-lang/nota/
cd nota
pnpm init-repoYou can test the CLI by running:
cd packages/nota
pnpm link --global
cd $(mktemp -d)
echo "@h1{Hello world}" > index.nota
nota build index.nota
open dist/index.htmlWe use a monorepo repository structure. All packages are contained in the packages directory, and pnpm is used to execute commands on each package. We also use lerna just for publishing new package versions. Common scripts are provided in the root package.json, which can be executed via pnpm such as pnpm build, pnpm lint, and so on.
Most source files are written in Typescript, a version of Javascript with a static type system. Style sheets are written in Sass, an extended version of CSS.
From the root of the repository, you can run pnpm build to build all packages once, or pnpm watch to automatically rebuild packages and their dependents when a source file changes.
We use tsc to generate unminified output files for library packages, i.e. packages with code used by downstream applications such as @nota-lang/nota-components. We use esbuild to generate minified/bundled output files for binary packages, i.e. packages with scripts that are run by users such as @nota-lang/nota.
We use typedoc to generate documentation for each package. Run pnpm doc to create a docs directory containing the documentation, which is hosted at https://nota-lang.github.io/nota. See the typedoc documentation for what features are supported in doc comments.
We use jest for testing and follow its conventions. Run pnpm test from the root of the repository to run the tests. See https://jestjs.io/docs/cli for more on jest's CLI options. For example, you can run pnpm test -t editor to run tests that have the name "editor".
We use eslint for linting. Run pnpm lint in a package or from the root to check for lint issues.
We use prettier for code formatting. Run pnpm fmt to automatically format all files in the repository.
Before you commit, you should run pnpm commit-check. This will clean the repository, install/rebuild everything from scratch, and run tests and lints.