Skip to content

Commit

Permalink
Chore/dev setup (#1)
Browse files Browse the repository at this point in the history
* chore: simplify repo

* chore: add build script

* chore: gitignore dist

* chore: add prettier config

* ci: add publish pipeline

* chore: downgrade version

* chore: tab width

* chore: add script

* chore: prettier format

* chore: add prettier

* chore: do not use script

* chore: add build:watch script

* chore: add readme

* ci: use provenance
  • Loading branch information
jkoenig134 authored Nov 15, 2023
1 parent a96081d commit 4c68a8c
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 17 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
push:
branches: [main]

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npx enhanced-publish --if-possible
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
dist
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
dist-test
node_modules
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "none",
"semi": false
}
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# codemagic-tools

[![GitHub Actions CI](https://github.com/js-soft/codemagic-tools/workflows/Publish/badge.svg)](https://github.com/js-soft/codemagic-tools/actions?query=workflow%3APublish)
[![npm version](https://badge.fury.io/js/@js-soft%2fcodemagic-tools.svg)](https://www.npmjs.com/package/@js-soft/codemagic-tools)

Codemagic Tools is a collection of tools to be used in Codemagic CI/CD pipelines.

## Installation

```bash
npm install @js-soft/codemagic-tools
```

## Usage

```bash
jscm --help
```

## License

[MIT](LICENSE)
203 changes: 200 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 22 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
{
"name": "@js-soft/codemagic-tools",
"version": "1.0.0",
"version": "0.0.1",
"description": "Codemagic extended tooling",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/js-soft/codemagic-tools.git"
},
"author": "j&s-soft GmbH",
"license": "MIT",
"homepage": "https://github.com/js-soft/codemagic-tools#readme",
"bugs": {
"url": "https://github.com/js-soft/codemagic-tools/issues"
},
"homepage": "https://github.com/js-soft/codemagic-tools#readme",
"repository": "github:js-soft/codemagic-tools",
"license": "MIT",
"author": "j&s-soft GmbH",
"main": "index.js",
"bin": {
"jscm": "dist/index.js"
},
"scripts": {
"build": "tsc",
"build:watch": "tsc -w",
"start": "ts-node src/index.ts"
},
"dependencies": {
"axios": "^1.6.2"
"axios": "^1.6.2",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.9.0",
"@types/yargs": "^17.0.31",
"prettier": "^3.1.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"publishConfig": {
"access": "public",
"provenance": true
}
}
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node

import yargs from "yargs"

const argv = yargs(process.argv.slice(2))
.options({ a: { type: "boolean", default: false } })
.parseSync()

console.log(argv)
Loading

0 comments on commit 4c68a8c

Please sign in to comment.