https://github.com/swz-git/yare-typescript-template
https://github.com/swz-git/yare-typescript-template
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/swz-git/yare-typescript-template
- Owner: swz-git
- Created: 2021-07-17T22:35:03.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T09:18:41.000Z (about 4 years ago)
- Last Synced: 2025-10-28T22:08:12.428Z (8 months ago)
- Language: JavaScript
- Size: 53.7 KB
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yare-typescript-template
## Requirements
- node.js 14+
- yarn (to install, do `npm i -g yarn`)
## Setup
Setup is super easy, just run `yarn install --production=false` in console.
You can now start writing yare code in src/main.js (for typescript just rename the file to main.ts)
## Use
- To bundle your js into a single file, use `yarn build`.
- Once it's done, a bundle should have appeared at dist/bundle.js
- Use the `-s` flag while building to auto upload your bundle to yare
- Use the `-a` flag to change to a new account to sync to.
- Use the `-w` flag while building to watch the `./src` directory for changes
- Use the `-nm` flag while building to disable the minifer
- Use the `--main=src/main.js` flag while building to use a custom main file
## Additional information
- This automatically puts your code in a anonymous function `(()=>{// your code here})()`
- To update the typescript typings you can run `yarn install --production=false` again.