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

feat: remove execa, setup actions to publish to beta and main #9

Merged
merged 7 commits into from
Jun 13, 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
27 changes: 27 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to npm

on:
push:
branches:
- 'dev'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: use node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- name: install dependencies
run: pnpm install
- name: build and publish
run: pnpm pub:beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to npm

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: use node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- name: install dependencies
run: pnpm install
- name: build and publish
run: pnpm pub
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@
href="https://github.com/orgs/gdsc-nits-org/repositories?q=template%3Atrue+archived%3Afalse"
>GDSC NITS project templates</a
>
by running <code>npx codekon</code>
by running <code>pnpx codekon</code>
</p>

<div align="center">

[![install size][packagephobia-image]][packagephobia-url] [![NPM version][npm-image]][npm-url]

</div>

## About

[GDSC NITS](https://gdscnits.in) has a set of templates to streamline the development of web based projects by having **opiniated** configs and settings. The various templates available are -
Expand All @@ -42,10 +48,14 @@

- To use `codekon` interactively:

Using npm:

```bash
npx codekon
```

Using pnpm:

```bash
pnpx codekon
```
Expand All @@ -64,10 +74,6 @@ pnpx codekon [projectName] [templateName]

For example:

```bash
npx codekon my-app react-js-app
```

```bash
pnpx codekon my-app react-js-app
```
Expand All @@ -88,3 +94,9 @@ pnpx codekon my-app react-js-app
- [x] ~~Test `pnpm create codekon`.~~ My bad. For this to work, the package name should have been `create-codekon`.
- [ ] Add screenshots and video.
- [x] Fix `pnpm dlx codekon`.
- [x] Remove `execa` and test with `child-process`. Reduced install size by 55%. Brought node support to `>=18` from `>= 20.5.0`.

[packagephobia-image]: https://packagephobia.com/badge?p=codekon
[packagephobia-url]: https://packagephobia.com/result?p=codekon
[npm-url]: https://www.npmjs.com/package/codekon
[npm-image]: https://img.shields.io/npm/v/codekon?color=0b7285&logoColor=0b7285
11 changes: 7 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ export default [
...tseslint.configs.recommended,
{
plugins: {
"import": pluginImport,
import: pluginImport,
},
},
{
rules: {
"import/order": ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}],
"import/order": [
"error",
{ alphabetize: { order: "asc", caseInsensitive: true } },
],
// "import/no-unused-modules": ["error", {"unusedExports": true}]
}
}
},
},
];
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codekon",
"version": "1.0.0",
"version": "1.0.2",
"description": "Entirety of GDSC NITS project templates at your fingertips",
"type": "module",
"main": "dist/src/index.js",
Expand All @@ -18,7 +18,7 @@
"pub:beta": "pnpm build && npm publish --tag beta",
"pub": "pnpm build && npm publish"
},
"keywords": [],
"keywords": ["gdsc", "reactjs", "nodejs", "typescript", "template", "cli", "codekon", "express", "mongodb", "postgresql"],
"repository": {
"type": "git",
"url": "git+https://github.com/gdsc-nits-org/codekon.git"
Expand All @@ -29,9 +29,11 @@
"Adhiraj Dutta <bytehead.dev@gmail.com> (https://adhiraj.me)"
],
"license": "GPL-3.0",
"engines": {
"node": ">= 18"
},
"dependencies": {
"commander": "^12.1.0",
"execa": "^9.2.0",
"kolorist": "^1.8.0",
"ora": "^8.0.1",
"prompts": "^2.4.2"
Expand Down
Loading