Skip to content

Commit

Permalink
setup (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiofrittoli authored Jan 17, 2025
1 parent 336d127 commit fdd0bd8
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 135 deletions.
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/stream-writer",
"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/stream-writer",
"enforcement": "active",
"conditions": {
"ref_name": {
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configurations": [
{
"type": "node",
"name": "vscode-jest-tests.v2.node-module-starter",
"name": "vscode-jest-tests.v2.stream-writer",
"request": "launch",
"args": [
"test",
Expand Down
10 changes: 5 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#212121",
"titleBar.border": "#CB3837",
"titleBar.border": "#41AF73",
"titleBar.activeForeground": "#F0F0F0",
"statusBar.background": "#212121",
"statusBar.border":"#CB3837",
"statusBar.border":"#41AF73",
"statusBar.foreground": "#F0F0F0",
"activityBar.activeBorder": "#CB3837",
"activityBarBadge.foreground":"#F0F0F0",
"activityBarBadge.background":"#CB3837",
"activityBar.activeBorder": "#41AF73",
"activityBarBadge.foreground":"#212121",
"activityBarBadge.background":"#41AF73",
},
}
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 Stream Writer 🪶

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 Stream Writer! 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/stream-writer/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/stream-writer).
- 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/stream-writer.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 stream-writer
```

- 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 Stream Writer! 🎉
122 changes: 13 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,137 +1,41 @@
# Node Module Starter 🛠️
# Stream Writer 🪶

[![NPM Latest Version][version-badge]][npm-url] [![Coverage Status][coverage-badge]][coverage-url] [![NPM Monthly Downloads][downloads-badge]][npm-url] [![Dependencies][deps-badge]][deps-url]

[version-badge]: https://img.shields.io/npm/v/%40alessiofrittoli%2Fnode-module-starter
[npm-url]: https://npmjs.org/package/%40alessiofrittoli%2Fnode-module-starter
[coverage-badge]: https://coveralls.io/repos/github/alessiofrittoli/node-module-starter/badge.svg
[coverage-url]: https://coveralls.io/github/alessiofrittoli/node-module-starter
[downloads-badge]: https://img.shields.io/npm/dm/%40alessiofrittoli%2Fnode-module-starter.svg
[deps-badge]: https://img.shields.io/librariesio/release/npm/%40alessiofrittoli%2Fnode-module-starter
[deps-url]: https://libraries.io/npm/%40alessiofrittoli%2Fnode-module-starter
[version-badge]: https://img.shields.io/npm/v/%40alessiofrittoli%2Fstream-writer
[npm-url]: https://npmjs.org/package/%40alessiofrittoli%2Fstream-writer
[coverage-badge]: https://coveralls.io/repos/github/alessiofrittoli/stream-writer/badge.svg
[coverage-url]: https://coveralls.io/github/alessiofrittoli/stream-writer
[downloads-badge]: https://img.shields.io/npm/dm/%40alessiofrittoli%2Fstream-writer.svg
[deps-badge]: https://img.shields.io/librariesio/release/npm/%40alessiofrittoli%2Fstream-writer
[deps-url]: https://libraries.io/npm/%40alessiofrittoli%2Fstream-writer

## Starter repository for developing node_modules
## Easly push data to a Stream

### Table of Contents

- [Getting started](#getting-started)
- [Development](#development)
- [ESLint](#eslint)
- [Jest](#jest)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#made-with-)

---

### 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 `stream-writer` in your projects:

```bash
git clone [email protected]: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}
```

or using `pnpm`

```bash
pnpm i {package_name}
```

---

### Development

#### Install depenendencies

```bash
npm install
npm i @alessiofrittoli/stream-writer
```

or using `pnpm`

```bash
pnpm i
```

#### Build the source code

Run the following command to test and build code for distribution.

```bash
pnpm build
```

#### [ESLint](https://www.npmjs.com/package/eslint)

warnings / errors check.

```bash
pnpm lint
```

#### [Jest](https://npmjs.com/package/jest)

Run all the defined test suites by running the following:

```bash
# Run tests and watch file changes.
pnpm test:watch

# Run tests and watch file changes with jest-environment-jsdom.
pnpm test:jsdom

# Run tests in a CI environment.
pnpm test:ci

# Run tests in a CI environment with jest-environment-jsdom.
pnpm test:ci:jsdom
```

You can eventually run specific suits like so:

```bash
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
test:coverage:serve
pnpm i @alessiofrittoli/stream-writer
```

---

### Contributing

Contributions are truly welcome!\
Please refer to the [Contributing Doc](./CONTRIBUTING.md) for more information on how to start contributing to this project.

---

### Security

If you believe you have found a security vulnerability, we encourage you to **_responsibly disclose this and NOT open a public issue_**. We will investigate all legitimate reports. Email `[email protected]` to disclose any security vulnerabilities.
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "@alessiofrittoli/node-module-starter",
"version": "1.3.0",
"description": "Starter repository for developing node_modules",
"name": "@alessiofrittoli/stream-writer",
"version": "0.1.0",
"description": "Easly push data to a Stream",
"author": {
"name": "Alessio Frittoli",
"email": "[email protected]",
"url": "https://alessiofrittoli.it"
},
"license": "MIT",
"keywords": [
"nodejs",
"npm",
"node_modules"
"stream",
"stream-writer",
"streaming"
],
"homepage": "https://github.com/alessiofrittoli/node-module-starter#readme",
"homepage": "https://github.com/alessiofrittoli/stream-writer#readme",
"bugs": {
"url": "https://github.com/alessiofrittoli/node-module-starter/issues",
"url": "https://github.com/alessiofrittoli/stream-writer/issues",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alessiofrittoli/node-module-starter.git"
"url": "git+https://github.com/alessiofrittoli/stream-writer.git"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -30,10 +30,10 @@
],
"sideEffects": false,
"scripts": {
"build": "pnpm lint && pnpm test:ci && pnpm test:ci:jsdom && tsup",
"build": "pnpm lint && pnpm test:ci && tsup",
"build:watch": "tsup --watch",
"lint": "eslint",
"release": "node scripts/publish.js --verbose",
"release": "node scripts/publish.js --verbose --npm",
"test": "jest",
"test:watch": "jest --watchAll --verbose",
"test:jsdom": "JSDOM=true pnpm test:watch",
Expand Down

0 comments on commit fdd0bd8

Please sign in to comment.