@nera-static/installer
v1.1.1
Published
CLI tool to scaffold new Nera static site projects
Maintainers
Readme
🛠️ Nera Installer
A simple CLI tool to create new Nera static site projects.
📦 Installation
npm install -g @nera-static/installer🚀 Usage
Create new project
nera new <project-name>This will:
- Clone the official Nera starter template
- Remove the
.gitfolder - Run
npm install - Print next steps
Example
nera new my-website
cd my-website
npm run devUpdate existing project
nera update⚠️ Important: Always commit your changes before running nera update to ensure you can revert if needed.
This will:
- Check that you're in a Nera project
- Create a backup of
assets/,config/andpages/folder - Clone the latest main branch from https://github.com/seebaermichi/nera.git
- Update all files in
src/andviews/_defaults/, and mergepackage.json - Restore backup files
- Install updated dependencies
Example
cd my-website
nera update
npm run dev🧪 Development
Clone the installer and run tests with:
npm install
npm testOr run a specific test file:
npx vitest run test/create.test.js
npx vitest run test/update.test.js🔧 Troubleshooting
If an update fails, the installer will attempt to restore your files from backup automatically. If you encounter issues:
- Check that you're in a Nera project directory (must have
package.jsonwithnerametadata) - Ensure you have internet access for downloading updates
- Make sure you have write permissions in the project directory
- Try running the command with elevated permissions if needed
📁 Project Structure
.
├── bin/ # CLI entrypoint
├── src/ # Internal logic
├── test/ # Vitest test files
└── package.json🧑💻 Author
Michael Becker GitHub
📦 License
MIT
