First Commit

This commit is contained in:
Benjamin Toby 2025-01-16 09:01:06 +01:00
parent cab7b131bf
commit a7b4e3f00b
4 changed files with 14 additions and 22 deletions

View File

@ -1,9 +1,11 @@
# Simple CI/CD package for any application
[![package version](https://img.shields.io/npm/v/nodecid.svg?style=flat-square)](https://npmjs.org/package/nodecid)
[![package downloads](https://img.shields.io/npm/dm/nodecid.svg?style=flat-square)](https://npmjs.org/package/nodecid)
NOTE: This package is for Bun runtime
[![package version](https://img.shields.io/bun/v/nodecid.svg?style=flat-square)](https://bunjs.org/package/nodecid)
[![package downloads](https://img.shields.io/bun/dm/nodecid.svg?style=flat-square)](https://bunjs.org/package/nodecid)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![package license](https://img.shields.io/npm/l/nodecid.svg?style=flat-square)](https://npmjs.org/package/nodecid)
[![package license](https://img.shields.io/bun/l/nodecid.svg?style=flat-square)](https://bunjs.org/package/nodecid)
Integrate a simple CI/CD process into your application without the hassle.
@ -11,7 +13,7 @@ _**NOTE:** This package needs `node` installed to work_
## Requirements
- **Node JS Runtime and NPM:** You need to have `NodeJS` and `npm` installed on the target machine for this package to work.
- **Node JS Runtime and NPM:** You need to have `NodeJS` and `bun` installed on the target machine for this package to work.
- **`nodecid.config.json` file:** This package depends on a configuration file located in the root directory of your application.
## Installation
@ -19,13 +21,13 @@ _**NOTE:** This package needs `node` installed to work_
To install this package globally just run:
```shell
npm install -g nodecid
bun install -g nodecid
```
To run the package directly run:
```shell
npx nodecid
bunx nodecid
```
This will download the package and run the binaries directly. After the first run it won't download the package again.
@ -47,7 +49,7 @@ Your `nodecid.config.json` file should look like this:
```json
{
"start": "node index.js",
"preflight": ["npm run test", "npm run build"]
"preflight": ["bun run test", "bun run build"]
}
```

View File

@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env bun
import fs from "fs";
import path from "path";

View File

@ -1,10 +1,10 @@
{
"name": "@moduletrace/nodecid",
"version": "1.0.8",
"description": "Simple CI/CD process",
"name": "@moduletrace/buncid",
"version": "1.0.0",
"description": "Simple CI/CD process For Bun runtime",
"main": "dist/index.js",
"bin": {
"nodecid": "./dist/index.js"
"buncid": "./dist/index.js"
},
"scripts": {
"compile": "bun build --compile --minify --sourcemap --bytecode index.ts --outfile bin/nodecid"

10
run.sh
View File

@ -1,10 +0,0 @@
#!/bin/bash
if command -v bun >/dev/null 2>&1; then
exec bun dist/index.js "$@"
elif command -v node >/dev/null 2>&1; then
exec node dist/index.js "$@"
else
echo "Neither Bun nor Node.js is installed."
exit 1
fi