Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beforan/trijam
One stop shop for all my trijam submissions
https://github.com/beforan/trijam
Last synced: about 2 months ago
JSON representation
One stop shop for all my trijam submissions
- Host: GitHub
- URL: https://github.com/beforan/trijam
- Owner: beforan
- License: mit
- Created: 2021-10-15T12:28:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-23T09:43:47.000Z (about 3 years ago)
- Last Synced: 2023-02-28T00:23:07.858Z (almost 2 years ago)
- Language: TypeScript
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trijam
One stop shop for all my trijam submissions
## Prerequisites
- node >= `16.x`
- pnpm
- `npx pnpm add -g pnpm`## Monorepo / Workspace notes
This repo uses `pnpm` to efficiently manage npm packages across multiple projects.
When using pnpm:
- `-w` will perform a command in the top level workspace
- good for installing shared dev dependencies
- `-C ` will perform a command as if you were in that dir.
- saves a lot of `cd`-ing.
- e.g. `pnpm add -C my-project phaser` will install phaser for the project in `./my-project/`
- `--filter ` will perform a command against a named package
- e.g. `pnpm --filter my-project dev` will run the `dev` script from the `package.json` with the package name `my-project`
- `-r` will perform a command against all packages
- e.g. `pnpm -r build` will run the `build` script in EVERY `package.json` in the repo.## Setup a project for Phaser/TS/Vite
1. Start a TS Vite project
- `pnpm dlx create-vite --template vanilla-ts`
1. Add Packages
- Dependencies:
- `phaser`
- Dev Dependencies:
- `vite-tsconfig-paths`1. Extra config
```jsonc
// tsconfig.json
{
// ...
"compilerOptions": {
//...
"baseUrl": ".",
"paths": {
"~/*": ["src/*"]
// Any other useful absolute import paths
}
}
}
``````ts
// vite.config.ts
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";export default defineConfig({
plugins: [tsconfigPaths()],
});
```