apprun-site

1.3.0 • Public • Published

AppRun Site

AppRun-Site is a command-line tool for building modern web applications with AppRun. It consists of three features:

  • A build command compiles your code to ES Modules with esbuild
  • A build command option renders your pages to create a static website
  • A development server that supports your code run as Single Page Applications (SPA) and supports Server-Side Rendering (SSR)

It allows you to build website pages using HTML, markdown, and AppRun components.

Quick Start

To create a new AppRun Site, run npm init apprun-app command and select the AppRun Site template.

npm init apprun-app [my-app]

An AppRun-Site project has the following structure:

/public             <- static website
/pages              <- pages of the website
  /index.html       <- index page
  /index.md         <- home page
  /main.tsx         <- start up code (registers web component and renders the layout)
/components         <- optional
/api                <- optional

You can add pages to the directory pages; they can be HTML files, markdown files, and tsx/jsx files (AppRun components).

Then, you can use:

  • npm start to start the preview server
  • npm run dev to start the dev server
  • npm run build to build for production
  • npm run render to build a static website

Documentation

Please visit https://apprun.js.org/docs/apprun-site

Have fun coding!

Package Sidebar

Install

npm i apprun-site

Weekly Downloads

1

Version

1.3.0

License

MIT

Unpacked Size

25.8 kB

Total Files

13

Last publish

Collaborators

  • yysun