Skip to content

Latest commit

 

History

History
86 lines (45 loc) · 1.73 KB

CONTRIBUTING.md

File metadata and controls

86 lines (45 loc) · 1.73 KB

Contributing to Enafore

Building

Enafore requires Node.js and pnpm.

To build Enafore for production, first install dependencies:

pnpm install --frozen-lockfile

Then build:

pnpm build

Then run:

PORT=4002 node server.js

Single-Instance Mode

To build Enafore as a frontend for one instance, set the SINGLE_INSTANCE environment variable.

SINGLE_INSTANCE=your.domain.tld pnpm build

Exporting

Enafore is a static site. When you run pnpm build, static files will be written to __sapper__/export.

Installing

To install with dev dependencies, run:

pnpm install

Dev server

To run a dev server with hot reloading:

pnpm dev

Now it's running at localhost:4002.

Linux users: for file changes to work, you'll probably want to run export CHOKIDAR_USEPOLLING=1 because of this issue.

Linting

Enafore uses JavaScript Standard Style.

Lint:

pnpm lint

Automatically fix most linting issues:

pnpm lint-fix

Tests

lol, lmao

Debug build

To disable minification in a production build (for debugging purposes), you can run:

DEBUG=1 pnpm build

Debugging Webpack

The Webpack Bundle Analyzer report.html and stats.json are available publicly via e.g.:

This is also available locally after pnpm build at .sapper/client/report.html.

Architecture

See Architecture.md.

Internationalization

See Internationalization.md.