https://github.com/kriasoft/hyperapp-starter
Boilerplate and tooling for authoring modern web applications with Hyperapp and Node.js.
https://github.com/kriasoft/hyperapp-starter
best-practices boilerplate css html hyperapp isomorphic javascript nodejs ssr template universal
Last synced: 4 months ago
JSON representation
Boilerplate and tooling for authoring modern web applications with Hyperapp and Node.js.
- Host: GitHub
- URL: https://github.com/kriasoft/hyperapp-starter
- Owner: kriasoft
- License: mit
- Created: 2018-07-01T18:09:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T13:43:12.000Z (over 7 years ago)
- Last Synced: 2025-06-12T10:22:36.287Z (8 months ago)
- Topics: best-practices, boilerplate, css, html, hyperapp, isomorphic, javascript, nodejs, ssr, template, universal
- Language: JavaScript
- Homepage: https://hyperapp.js.org/
- Size: 57.6 KB
- Stars: 61
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
#
Hyperapp Starter
[](https://www.npmjs.com/package/create-hyperapp-starter)
[](https://hyperappjs.herokuapp.com 'Join us')
Boilerplate and tooling for authoring modern web applications
with [Hyperapp](https://hyperapp.js.org/) and [Node.js](https://nodejs.org/).
- **Best practices** — The project is based on [HTML5 Boilerplate](https://html5boilerplate.com/)
which is the product of years of iterative development and community knowledge.
- **No build configuration** — Hassle-free updates for the whole toolchain with a single dependency.
- **Isomorphic** — Write code once and run it on both client and server-side.
---
This project was bootstrapped with [Hyperapp Starter](https://github.com/kriasoft/hyperapp-starter)
([support](https://hyperappjs.herokuapp.com)).
## Prerequisites
- MacOS, Windows, or Linux
- [Node.js](https://nodejs.org/) v8.9.0 or newer
- Text editor or [IDE](https://en.wikipedia.org/wiki/IDE)
(e.g. [VS Code](https://code.visualstudio.com/) +
[EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
plugin)
## Getting Started
To create a new app, run a single command:
```bash
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:
```bash
npm init hyperapp-starter
```
## Basic structure
```bash
.
├── 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](https://jestjs.io/docs/en/cli#options)
which [Jest](https://jestjs.io/) supports.
### `npm run lint`
Finds problematic patterns in code using [ESLint](https://eslint.org/)
and [stylelint](https://stylelint.io/).
Using `--fix` option you can automatically fix some of them
and also format files using [Prettier](https://prettier.io/).
### `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](https://github.com/kriasoft/hyperapp-tools) for more.
## License
Hyperapp Starter is MIT licensed.
See [LICENSE](https://github.com/kriasoft/hyperapp-starter/blob/master/LICENSE.md).