Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup #1

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/rulesets/Default branch ruleset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Default branch ruleset",
"target": "branch",
"source_type": "Repository",
"source": "alessiofrittoli/node-module-starter",
"source": "alessiofrittoli/next-api",
"enforcement": "active",
"conditions": {
"ref_name": {
Expand Down
2 changes: 1 addition & 1 deletion .github/rulesets/Tagging ruleset.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Tagging ruleset",
"target": "tag",
"source_type": "Repository",
"source": "alessiofrittoli/node-module-starter",
"source": "alessiofrittoli/next-api",
"enforcement": "active",
"conditions": {
"ref_name": {
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/dist
/node_modules
/coverage

.env.*
!.env.test
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/src
/__tests__
/docs
/coverage

/node_modules
/.git
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#212121",
"titleBar.border": "#CB3837",
"titleBar.border": "#484848",
"titleBar.activeForeground": "#F0F0F0",
"statusBar.background": "#212121",
"statusBar.border":"#CB3837",
"statusBar.border":"#484848",
"statusBar.foreground": "#F0F0F0",
"activityBar.activeBorder": "#CB3837",
"activityBar.activeBorder": "#484848",
},
}
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing to Node Module Starter 🛠️
# Contributing to Next.js API utilities △

We’re excited that you’re interested in contributing to Node Module Starter! This guide will help you get started.
We’re excited that you’re interested in contributing to Next.js API utilities! This guide will help you get started.

## How to Contribute

### 1. Report Issues

If you find a bug, have a question, or want to suggest a new feature:

- Search Existing Issues: Check the [Issues](https://github.com/alessiofrittoli/node-module-starter/issues) tab to see if your concern has already been addressed.
- Search Existing Issues: Check the [Issues](https://github.com/alessiofrittoli/next-api/issues) tab to see if your concern has already been addressed.
- Create a New Issue: If not, open a new issue. Please provide:
- A clear and descriptive title.
- Detailed steps to reproduce the issue (if applicable).
Expand All @@ -18,12 +18,12 @@ If you find a bug, have a question, or want to suggest a new feature:

Please, take a look at [Contributing to a project - GitHub Docs](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) page for more in-detail informations.

- Go to the [repository page](https://github.com/alessiofrittoli/node-module-starter).
- Go to the [repository page](https://github.com/alessiofrittoli/next-api).
- Click the Fork button.
- Clone your fork to your local machine:

```bash
git clone https://github.com/your-username/node-module-starter.git
git clone https://github.com/your-username/next-api.git
```

### 3. Create a Branch
Expand All @@ -33,7 +33,7 @@ To make changes:
- Navigate to your cloned repository:

```bash
cd node-module-starter
cd next-api
```

- Create and switch to a new branch:
Expand Down Expand Up @@ -91,4 +91,4 @@ Pull requests will be reviewed by maintainers.
Feedback may be provided; be prepared to make changes if requested.
Once approved, your contribution will be merged into the main branch.

Thank you for helping improve Node Module Starter! 🎉
Thank you for helping improve Next.js API utilities! 🎉
42 changes: 17 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Node Module Starter 🛠️
# Next.js API utilities △

Version 0.2.0
Version 0.1.0

## Starter repository for developing node_modules
## Next.js API utility library

### Table of Contents

Expand All @@ -16,36 +16,18 @@ Version 0.2.0

---

### Getting started (delete once cloned in your project)
### Getting started

Run the following command to start using `node-module-starter` for your projects:
Run the following command to start using `next-api` in your projects:

```bash
git clone git@github.com:alessiofrittoli/node-module-starter.git && git remote remove origin
```

install dependencies

```bash
pnpm i
```

Read the [Creating a repository from a template - GitHub Docs](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for more in-detail informations about creating a new Repository from a template using GitHub web interface.

---

### Getting started (customize based on your project needs)

Run the following command to start using `{package_name}` in your projects:

```bash
npm i {package_name}
npm i @alessiofrittoli/next-api
```

or using `pnpm`

```bash
pnpm i {package_name}
pnpm i @alessiofrittoli/next-api
```

---
Expand Down Expand Up @@ -105,6 +87,16 @@ pnpm test:jest
pnpm test:jest:jsdom
```

Run tests with coverage.

An HTTP server is then started to serve coverage files from `./coverage` folder.

⚠️ You may see a blank page the first time you run this command. Simply refresh the browser to see the updates.

```bash
pnpm test:coverage
```

---

### Contributing
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config = [
pluginJs.configs.recommended,
...tseslintReccommended,
{ files: [ 'src/**/*.{js,mjs,cjs,ts}' ] },
{ ignores: [ 'dist' ] },
{ ignores: [ 'dist', 'coverage' ] },
]

export default config
30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "@alessiofrittoli/node-module-starter",
"version": "0.2.0",
"description": "Basic Node Module repository",
"name": "@alessiofrittoli/next-api",
"version": "0.1.0",
"description": "Next.js API utility library",
"author": {
"name": "Alessio Frittoli",
"email": "info@alessiofrittoli.it",
"url": "https://alessiofrittoli.it"
},
"license": "MIT",
"keywords": [
"nodejs",
"npm",
"node_modules"
"next",
"next.js",
"next-server"
],
"homepage": "https://github.com/alessiofrittoli/node-module-starter#readme",
"homepage": "https://github.com/alessiofrittoli/next-api#readme",
"bugs": {
"url": "https://github.com/alessiofrittoli/node-module-starter/issues",
"url": "https://github.com/alessiofrittoli/next-api/issues",
"email": "info@alessiofrittoli.it"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alessiofrittoli/node-module-starter.git"
"url": "git+https://github.com/alessiofrittoli/next-api.git"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -30,12 +30,15 @@
],
"sideEffects": false,
"scripts": {
"build": "eslint && pnpm test:ci && pnpm test:ci:jsdom && tsup",
"build": "pnpm lint && pnpm test:ci && pnpm test:ci:jsdom && tsup",
"lint": "eslint",
"test": "jest --watchAll --verbose",
"test:jsdom": "JSDOM=true pnpm test",
"test:ci": "jest --ci --verbose",
"test:ci:jsdom": "JSDOM=true pnpm test:ci",
"test:serve-coverage": "http-server ./coverage/lcov-report --gzip true -p 0 -o --silent",
"test:coverage": "concurrently --prefix none --kill-others \"pnpm jest --watchAll --verbose --coverage\" \"pnpm test:serve-coverage\"",
"test:coverage:jsdom": "JSDOM=true pnpm test:coverage",
"test:jest": "pnpm test jest.test.ts",
"test:jest:jsdom": "JSDOM=true pnpm test:jest"
},
Expand All @@ -44,15 +47,18 @@
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"concurrently": "^9.1.0",
"dotenv": "^16.4.7",
"esbuild": "0.24.0",
"eslint": "^9.17.0",
"globals": "^15.13.0",
"globals": "^15.14.0",
"http-server": "^14.1.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0"
"typescript-eslint": "^8.18.1"
}
}
Loading