Commit 96d7717a authored by Arthur Verschaeve's avatar Arthur Verschaeve

Typescript-backbone: add `compile` npm script

This is consistent with how other apps are doing compilation steps
and removes the need to install typescript locally.
parent 6e57d39d
...@@ -7,5 +7,11 @@ ...@@ -7,5 +7,11 @@
"lodash": "^3.1.0", "lodash": "^3.1.0",
"todomvc-app-css": "^1.0.0", "todomvc-app-css": "^1.0.0",
"todomvc-common": "^1.0.1" "todomvc-common": "^1.0.1"
},
"devDependencies": {
"typescript": "^1.4.0"
},
"scripts": {
"compile": "tsc js/app.ts"
} }
} }
...@@ -39,12 +39,10 @@ This application uses TypeScript classes to create Backbone.js models and views, ...@@ -39,12 +39,10 @@ This application uses TypeScript classes to create Backbone.js models and views,
## Running ## Running
A standalone TypeScript compiler is available on NPM. To compile the TypeScript in this project, install the dependencies and run the `compile` script.
npm install -g typescript ```
# from examples/typescript-backbone
To compile the TypeScript in this project: $ npm run compile
$ open index.html
# from examples/typescript-backbone ```
tsc js/app.ts
open index.html
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment