Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nielse63/node-template
Barebones repo template for node.js apps
https://github.com/nielse63/node-template
nodejs template
Last synced: 28 days ago
JSON representation
Barebones repo template for node.js apps
- Host: GitHub
- URL: https://github.com/nielse63/node-template
- Owner: nielse63
- License: apache-2.0
- Created: 2020-07-25T07:40:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T15:38:45.000Z (about 2 months ago)
- Last Synced: 2024-09-13T04:17:40.511Z (about 2 months ago)
- Topics: nodejs, template
- Language: JavaScript
- Homepage: https://nielse63.github.io/node-template/
- Size: 3.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# node-template
[![node](https://github.com/nielse63/node-template/actions/workflows/node.js.yml/badge.svg)](https://github.com/nielse63/node-template/actions/workflows/node.js.yml) ![David](https://img.shields.io/david/nielse63/node-template)
> Barebones repo template for node.js apps
## Intro
`node-template` is a light-as-hell GitHub template repo to quickly and easily get a new Node.js project up and running. It's meant to be a skeleton for future projects and framework/feature agnostic - whether you want to create an Express app, CLI tool, or just a quick script `node-template` is a good starting point.
## Features
- Linting - `eslint-config-airbnb-base` setup by default
- Code Formatting - `prettier` and `eslint` formatting options enabled
- Node Versioning - `.nvmrc` set to latest LTS
- Testing - Minimal `jest` configuration setup
- CI/CD - Skeleton GitHub Actions included
- Community Files - GitHub community files are created by default## Installation
1. Click [Use this template](https://github.com/nielse63/node-template/generate) at the top of the node-template GitHub repo
2. Clone your project
3. Run `npm run setup` - you'll be prompted for new values
4. **Optional**: After you completed the setup run `rm -rf .bin/cli`## Usage
After you've run the setup script, you're ready to start developing. The structure and content is like any normal basic node.js app:
```
.
├── .bin # scripts and tooling
├── .github # github workflows and templates
├── .husky # git hooks configuration
├── docs # github-pages docs
├── index.js # main entry
└── src # source file directory
├── __tests__ # tests
└── index.js # main source entry
```### Scripts
There are a number of useful npm scripts:
| Script | Description |
| ----------------- | ------------------------------------------------- |
| `npm run setup` | Installs dependencies and configures the app info |
| `npm run test` | Run Jest unit tests |
| `npm run lint` | Check and fix all files using ESLint and Prettier |
| `npm run release` | Release a new version of the app |## Roadmap
I'm planning on adding the following feature enhancements soon:
- [ ] Automated doc generation
- [ ] Script to auto-generate jest tests
- [ ] More GitHub actions and workflows
- [ ] Improved documentation