This tutorial will help you integrate Flexmonster with TypeScript.
npm install -g flexmonster-cli
Create the sample project with the following CLI command:
flexmonster create typescript -r
The flexmonster create typescript
command does the following:
.zip
archive with the sample TypeScript project from GitHub.flexmonster-typescript-project/
folder will appear in your working directory.The -r
option, which is short for --run
, completes the following tasks:
package.json
.index.html
file from a browser.When the contents of the main.ts
file are changed, use the following command to recompile main.js
:
tsc main.ts
Create the sample project with the following CLI command:
flexmonster create typescript webpack -r
The flexmonster create typescript webpack
command does the following:
.zip
archive with the sample TypeScript + webpack project from GitHub.flexmonster-typescript-webpack-project/
folder will appear in your working directory.The -r
option, which is short for --run
, completes the following tasks:
package.json
.TypeScript type definitions for Flexmonster can be found inside the node_modules/flexmonster/types/flexmonster.d.ts
file.
To install the flexmonster
npm package to the node_modules/
directory, run the following command inside your project:
flexmonster add js-flexmonster
You may be interested in the following articles: