Template screenshot

Template

Author Avatar Theme by Elderjs
Updated: 11 May 2022
111 Stars

Elder.js template project. It is part template, part tutorial. Dive in!

Categories

Overview

The Elder.js Template Project is a project template designed for Elder.js apps. It provides a starting point for creating apps using Elder.js, a static site generator for Svelte. The template can be found on GitHub at https://github.com/elderjs/template. Elder.js source code can be accessed at https://github.com/elderjs/elderjs. A live demo of the template can be viewed at https://elderjs.pages.dev/.

Features

  • Easy Setup: The Elder.js Template Project provides a simple starting point for creating Elder.js apps, allowing developers to quickly set up their projects.
  • Live Reloading: A development server is included in the template that watches for file changes and automatically refreshes the page, making it easy to see changes in real time.
  • Rollup Integration: Rollup, a module bundler, is integrated into the template and automatically restarts when it detects file changes.
  • Browser Reload: If the Elder.js configuration file includes the @elderjs/plugin-browser-reload plugin, the browser will automatically restart after the server restarts, providing a seamless development experience.
  • ESBuild Support: The template supports the experimental npm run esbuild command, which provides a faster development experience and is expected to improve rapidly.

Installation

To create a new project based on the Elder.js Template Project using degit, follow these steps:

  1. Install the dependencies by running npm install or yarn install.
  2. Start the project by running npm run dev or yarn dev.
  3. Open your browser and navigate to localhost:3000 to view the app running.
  4. Edit any file in the src directory, save it, and the page will automatically reload to reflect the changes.

If you want to build the HTML for production, run the following command:

npm run build

This will generate all of your statically generated files in the ./public directory.

To run the app in SSR mode for production, use the following command:

npm start

Summary

The Elder.js Template Project is a project template designed to facilitate the creation of Elder.js apps. It offers easy setup, live reloading, Rollup integration, browser reload support, and experimental ESBuild capabilities. By following the installation guide, developers can quickly set up their projects and start building static sites or apps using Elder.js.