Minimal Elder.js Template Project
This is a minimal project template for Elder.js apps.
If you are new you should start with the full template: https://github.com/elderjs/template
For reference:
- Elder.js source is here: https://github.com/elderjs/elderjs
- Elder.js Docs are on ElderGuide.com
Get started
To create a new project based on this template using degit:
npx degit Elderjs/minimal elderjs-minimial
cd elderjs-minimialInstall the dependencies:
npm install # or just yarnStart Project:
npm startNavigate to localhost:3000. You should see your app running.
Development:
For development, we recommend running two separate terminals. One for the server and the other for rollup.
Terminal 1
npm run dev:server # `npm start` above starts a server, but doesn't rebuild your Svelte components on change.Terminal 2
npm run dev:rollup # This rebuilds your svelte components on change.Once you have these two terminals open, edit a component file in src, save it, and reload the page to see your changes.
To Build HTML:
npm run buildThis will build all of your html into the /public/ folder.
What to Expect
- Nodemon is watching your files for changes. It will restart when it needs to.
- Rollup is watching your files for changes. It will restart when it needs to.
- If your
elder.config.jshas@elderjs/plugin-browser-reload': {}in it's plugins, your browser will automatically restart after the server restarts.