Skip to content

Commit

Permalink
:npm build and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yysun committed Dec 25, 2020
1 parent 0a757ea commit afc0bd6
Show file tree
Hide file tree
Showing 24 changed files with 119 additions and 10,277 deletions.
36 changes: 5 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can build applications using [Component](docs/#/05-component) that also have

* [Order from Amazon](https://www.amazon.com/Practical-Application-Development-AppRun-High-Performance/dp/1484240685/)

## AppRun CLI
## Create AppRun Apps

We recommend using TypeScript and JSX. TypeScript provides [strong typing](https://medium.com/@yiyisun/strong-typing-in-apprun-78520be329c1). JSX provides more [advanced features](https://dev.to/yysun/advanced-view-features-in-apprun-17g5).

Expand Down Expand Up @@ -86,46 +86,20 @@ npx degit yysun/apprun-electron-forge my-app
npx degit yysun/apprun-websockets my-app
npx degit yysun/apprun-websockets-sqlite my-app
```
## AppRun Developer Tools

## ES2015 by Default

In the past, the AppRun default version on npm is 1.x. The CLI creates tsconfig for es5. You can use --es6 option to create tsconfig for 2.x.

On Feb 21, 2020, the default version on npm has been changed from 1.x to 2.x. And the CLI creates tsconfig for es2015. You can use --es5 option for 1.x.

When upgrading projects to the latest version (2.x), please modify the tsconfig from targeting es5 to es2015.

Currently, the npm tags are as following:

* apprun@es5: 1.x, stable, es5
* apprun@latest: 2.x, stable, es2015, web components
* apprun@next: 3.x, dev, es2015, web components, lit-html

## Developer Tools

### CLI in Console

To use the AppRun dev-tools CLI, include the dev-tools script.
To use the AppRun dev-tools, include the dev-tools script.

```JavaScript
<script src="https://unpkg.com/apprun@latest/dist/apprun-dev-tools.js"></script>
<script src="https://unpkg.com/apprun/dist/apprun-dev-tools.js"></script>
```

See [AppRun CLI Run in the Console](https://dev.to/yysun/make-cli-run-in-the-console-42ho)
### Dev-Tools Extensions

AppRun supports the Redux DevTools Extension. To use the dev-tools, install the [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension). You can monitor the events and states in the devtools.
AppRun Dev Tools connects to the Redux DevTools Extension. To use the dev-tools, install the [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension). You can monitor the events and states.

![app-dev-tools](docs/imgs/apprun-dev-tools.gif)


### VS Code Extension

AppRun has a code snippet extension for VS Code that you can install from the extension marketplace. It inserts the AppRun code template for application, component and event handling.

![app-dev-tools](docs/imgs/apprun-vscode-extension.png)


## Contribute

You can launch the webpack dev-server and the demo app from the _demo_ folder with the following npm commands:
Expand Down
2 changes: 1 addition & 1 deletion demo-html/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo-html/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/app.js.map

Large diffs are not rendered by default.

25 changes: 5 additions & 20 deletions demo/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 id="apprun-book-from-apress">AppRun Book from Apress</h2>
<ul>
<li><a href="https://www.amazon.com/Practical-Application-Development-AppRun-High-Performance/dp/1484240685/">Order from Amazon</a></li>
</ul>
<h2 id="apprun-cli">AppRun CLI</h2>
<h2 id="create-apprun-apps">Create AppRun Apps</h2>
<p>We recommend using TypeScript and JSX. TypeScript provides <a href="https://medium.com/@yiyisun/strong-typing-in-apprun-78520be329c1">strong typing</a>. JSX provides more <a href="https://dev.to/yysun/advanced-view-features-in-apprun-17g5">advanced features</a>.</p>
<p>We recommend using webpack for building production code. However, you can also have fast and productive <a href="https://dev.to/yysun/a-dev-server-supports-esm-3cea">development experiences with esm-server</a>.</p>
<p>Use the AppRun CLI to initialize a TypeScript and webpack configured project:</p>
Expand All @@ -54,27 +54,12 @@ <h2 id="starter-templates">Starter Templates</h2>
npx degit yysun/apprun-electron-forge my-app
npx degit yysun/apprun-websockets my-app
npx degit yysun/apprun-websockets-sqlite my-app</code></pre>
<h2 id="es2015-by-default">ES2015 by Default</h2>
<p>In the past, the AppRun default version on npm is 1.x. The CLI creates tsconfig for es5. You can use --es6 option to create tsconfig for 2.x.</p>
<p>On Feb 21, 2020, the default version on npm has been changed from 1.x to 2.x. And the CLI creates tsconfig for es2015. You can use --es5 option for 1.x.</p>
<p>When upgrading projects to the latest version (2.x), please modify the tsconfig from targeting es5 to es2015.</p>
<p>Currently, the npm tags are as following:</p>
<ul>
<li>apprun@es5: 1.x, stable, es5</li>
<li>apprun@latest: 2.x, stable, es2015, web components</li>
<li>apprun@next: 3.x, dev, es2015, web components, lit-html</li>
</ul>
<h2 id="developer-tools">Developer Tools</h2>
<h3 id="cli-in-console">CLI in Console</h3>
<p>To use the AppRun dev-tools CLI, include the dev-tools script.</p>
<pre><code class="language-JavaScript">&lt;script src=&quot;https://unpkg.com/apprun@latest/dist/apprun-dev-tools.js&quot;&gt;&lt;/script&gt;</code></pre>
<h2 id="apprun-developer-tools">AppRun Developer Tools</h2>
<p>To use the AppRun dev-tools, include the dev-tools script.</p>
<pre><code class="language-JavaScript">&lt;script src=&quot;https://unpkg.com/apprun/dist/apprun-dev-tools.js&quot;&gt;&lt;/script&gt;</code></pre>
<p>See <a href="https://dev.to/yysun/make-cli-run-in-the-console-42ho">AppRun CLI Run in the Console</a></p>
<h3 id="dev-tools-extensions">Dev-Tools Extensions</h3>
<p>AppRun supports the Redux DevTools Extension. To use the dev-tools, install the <a href="https://github.com/zalmoxisus/redux-devtools-extension">Redux DevTools Extension</a>. You can monitor the events and states in the devtools.</p>
<p>AppRun Dev Tools connects to the Redux DevTools Extension. To use the dev-tools, install the <a href="https://github.com/zalmoxisus/redux-devtools-extension">Redux DevTools Extension</a>. You can monitor the events and states.</p>
<p><img src="docs/imgs/apprun-dev-tools.gif" alt="app-dev-tools"></p>
<h3 id="vs-code-extension">VS Code Extension</h3>
<p>AppRun has a code snippet extension for VS Code that you can install from the extension marketplace. It inserts the AppRun code template for application, component and event handling.</p>
<p><img src="docs/imgs/apprun-vscode-extension.png" alt="app-dev-tools"></p>
<h2 id="contribute">Contribute</h2>
<p>You can launch the webpack dev-server and the demo app from the <em>demo</em> folder with the following npm commands:</p>
<pre><code class="language-sh">npm install
Expand Down
Loading

0 comments on commit afc0bd6

Please sign in to comment.