- Thanks to https://github.com/dataflows/meteor-typescript-utils
- Ready to go typescript solution!
- Full support for Typescript 1.5!
- Unit testing with karma directly in Webstorm!
- Typescript modules!
- Clone this repository
- Run
npm install
in the main directory - Add your files (see section Files).
- If you want to use modules use
build-debug-modules
orbuild-release-modules
gulp task (see section Modules). - If you do not want modules use
build
gulp taks. - Done!
To get modules running, you need to register top level modules in modules:export package.
For example, if our modules are like MyModule.SubModule1
, MyModule.SubModule2
, MyOtherModule.SubModule1
then the top level module is MyModule.
We register this module as following:
//file: /src/packages/exports/exports.js
MyModule = {}
MyOtherModule = {}
and
//file: /src/packages/exports/package.js
...
api.export('MyModule');
api.export('MyOtherModule');
...
Registering module in package assures that the top level module definition is loaded before any other module extension. In the next section, we explain what options we have in building the project.
All the magic needed to run the project is hidden inside the gulp files. Just choose your favourite editor (i.e. Sublime, Webstorm, Visual Studio Code) and run the gulp files to compile your project. These are the tasks that are currently supported:
build
- Builds the project into/src/js
directory, ignoring modulesbuild-debug-modules
- Builds the project into/src/js
with multiple files, where files are split into three directories (client, server and lib). Files are prefixed by number assuring the correct load order. The load order is detected from references within "*.ts" files.build-release-modules
- Builds the project into three files: client/client.js, lib/lib.js and server/server.js.tslint
- Runs a tslint
This boilerplate has been pre-configured for:
- Visual Studio Code
- WebStorm
Please check out the Typescript-Utils page to see how to write awesome statically typed template helpers, events and routes.
We have chosen Semantic UI as the main front end framework. You can control which components are used in '/src/client/lib/semanticui/custom.semantic.json'
semantic:ui
- Beautifully crafted web pages with Semantic UIuseraccounts:semantic-ui
- User accounts manipulation in semantic uiaccounts-password
- Authentification packageflemay:autoprefixer
- Vital helper for Semantic UI package (can be removed if Semantic UI is removed)iron:router
- Popular routing solutionmultiply:iron-router-progress
- Visual progress display (progress colors are defined in /client/stylesheets/progress.css)meteorhacks:subs-manager
- Subscription manager to save trafficmeteorhacks:fast-render
- Blazing fast page load, no more waitingalanning:roles
- Roles managementdataflows:typescript-utils
- Typescript goodies
We leave the rest of the packages up to you, not to annoy you too much.
This project has been configured to run with Karma (e.g. in Webstorm) for super fast unit testing. Just click on Run Configurations -> add -> Karma.
You can install karma cli if you plan to run karma tests in terminalsudo npm install -g karma-cli
.
You can now simply run karma start
.
This project is provided on the MIT license.