Home

Awesome

<img height="24" src="https://cdn.rawgit.com/kriasoft/hyperapp-starter/master/logo.svg"> Hyperapp Starter

npm downloads slack chat

Boilerplate and tooling for authoring modern web applications with Hyperapp and Node.js.


This project was bootstrapped with Hyperapp Starter (support).

Prerequisites

Getting Started

To create a new app, run a single command:

npm init hyperapp-starter

It will generate the initial project structure inside the current directory and install the dependencies.

Also you can directly specify the project directory if you want to:

npm init hyperapp-starter <project-directory>

Basic structure

.
├── build/              # Compiled output
├── coverage/           # Test coverage reports
├── node_modules/       # 3rd-party libraries and utilities
├── public/             # Static files such as favicon.ico etc.
├── src/                # Application source code
│   ├── app.js          # Universal (Isomorphic) application entry point
│   ├── index.js        # Client-side rendering, e.g. app(state, actions, view, container)
│   └── server.js       # Server-side rendering, e.g. renderToString(view, state, actions)
├── .env                # Environment variables (optional)
├── package.json        # The list of project dependencies + NPM scripts
└── README.md           # Getting started guide

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode with "live reload". Uses src/index.js and src/server.js files as entry points for client-side and server-side apps.

npm test

Launches the test runner. It will look for test files with .test.js or .spec.js suffix. Also you can use any cli options which Jest supports.

npm run lint

Finds problematic patterns in code using ESLint and stylelint. Using --fix option you can automatically fix some of them and also format files using Prettier.

npm run build

Builds the app for production to the build folder. It correctly bundles, optimizes and minifys the build for the best performance and the filenames include the hashes for a long term caching. Using --render option you can generate html files for a static site hosting.

See Hyperapp Tools for more.

License

Hyperapp Starter is MIT licensed. See LICENSE.