Home

Awesome

Meteor React Typescript Starter Project

dependencies Status devDependencies Status

Meteor Packages

barbatus:typescript: To support TypeScript. [GitHub Home]

ecmascript: Required for if source contains JavaScript files. Can be removed if using TypeScript fully.

mdg:validated-method: Wrapper for Meteor methods. See Meteor Guide for details. Typings in /@types folder. [GitHub Home]

aldeed:collection2: For schema validation on write. See Meteor Guide for details. Typings in /@types folder. [GitHub Home]

meteortesting:mocha: Meteor testing package. See Meteor Guide for more details.

Meteor Typings

Meteor TypeScript definitions are stored in @types folder, which are included in typeRoots option in tsconfig.json.

Note: As described in this issue, TypeRoots is a support added for back compat with typings and to allow migration. However meteor typings have not been updated to new typings workflow.

TypeScript Config

tsconfig.json: Files in client and server are included in TypeScript transpilation. Files in imports will be transitively transpiled when imported by files in client and server folder. However, for TypesScript compiler settings in tsconfig.json to apply to 'orphaned' files in imports directory (i.e. files that not imported), the imports folder is included as well.

VS Code Debugging

Default timeout when attaching to new meteor debug instance is 30 seconds. To increase if needed. Alternatively run npm run debug and attach manually.

Chrome Debugging requires chrome VS Code extension.

Starting Project

meteor npm install
# Run project
meteor run
# Run in debug mode
meteor npm run debug

Test Coverage

Linux Users: Change %CD% to $PWD/ for npm scripts in package.json.

# Generate coverage report
npm run test:coverage

# Run test and coverage in watch mode
# browse to localhost:3000 and localhost:3000/coverage
npm run test:watch:coverage