Installation¶
npm¶
AppRun is distributed on npm. To get it, run:
npm install apprun
Create AppRun App¶
The npm create apprun-app command line tool creates a new AppRun project. It can scaffold a new project with build tools and a development server.
To create a project, run:
npx create-apprun-app my-app
cd my-app
npm start
No build step¶
You don't need npm at all to try AppRun. You can reference it from a CDN and write your
views with the html template function — no compiler required. See
Use AppRun in the browser.
TypeScript and JSX¶
When you use JSX, configure your compiler to use AppRun's JSX factory. In tsconfig.json:
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "app.h",
"jsxFragmentFactory": "app.Fragment"
}
}
The create-apprun-app templates set this up for you. For strongly-typed components and
events, see Strong Typing.