Nano Template
A lightweight and extensible template rendering library for JavaScript projects. Includes utilities for HTML elements and template rendering.
This project uses Vite for server-side rendering (SSR) with React and Express.js.
Usage
Use it as a template to create new repositories in your Git.
Installation
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Start the SSR:
npm run serve
- Build for production:
npm run build:client
npm run build:server
Project Structure
.
├── public/ # Static assets
├── src/ # Source code
│ ├── App.jsx # Main React component
│ ├── entry-client.jsx # Client entry point
│ ├── entry-server.jsx # Server entry point
│ ├── index.html # Template for SSR
│ ├── styles/ # CSS styles
│ ├── components/ # React components
│ ├── layouts/ # React components for the server rendering
├── server.js # Express server
├── vite.config.js # Vite configuration
└── package.json # Project dependencies
Scripts
- Build: Builds the project using Rollup.
- Test: Runs tests using Jest.
- Lint: Checks code for linting issues.
- Release: Prepares the project for release.
Development
Testing
Linting
- Check linting issues:
npm run lint
Building
- Build the project:
npm run build
CHANGELOG.md
Keep a changelog for documenting updates in each release in CHANGELOG.md.
Contributing
See CONTRIBUTING.md for guidelines.
License
ISC License