This repository has been archived by the owner on Jun 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use yarn workspaces for easier install
the goal: when someone clones this repo and runs `yarn` to install dependencies, all of the dependencies for the templates get installed as well. Additionally, this is done in such a way that linting works for these projects. This is a little bit tricky! Each template has a file at `assembly/tsconfig.json` which has an `extends` directive. This `extends` points to `../node_modules/assemblyscript/[...]`. So the installation of packages for each of these templates must be done in such a way that this relative lookup does not break. That's what the `nohoist` option does. Note that typescript supports some version of module resolution, rather than relative path, for the `extends` option. I tried to use this briefly and ran into problems, whereas `nohoist` worked very quickly. It seems like other people have had problems with `extends` pointing to packages as well: microsoft/TypeScript#18865 (comment) This also adds the `yarn.lock`, since we have no config preventing it, and this is considered best practice (https://classic.yarnpkg.com/blog/2016/11/24/lockfiles-for-all/)
- Loading branch information