Skip to content

Commit

Permalink
feat(cli): migrate application entrypoint to Strcli (#180)
Browse files Browse the repository at this point in the history
* refactor: update cli.ts to use stricli/core structure

* refactor: migrate doctor command to stricli

* refactor: migrate clean command to stricli

* refactor: migrate debug command to stricli

* refactor: migrate build command to stricli

* refactor: migrate include command to stricli

* refactor: migrate init command to stricli

* refactor: migrate remove command to stricli

* refactor: migrate run command to stricli

* refactor: migrate scan command to stricli

* refactor: migrate setup command to stricli

* refactor: migrate teardown command to stricli

* refactor: migrate update command to strcli

* refactor: resolve linting errors

* fix: resolve build errors, update package.json config

* ci: pin ubuntu to 22.04

* refactor: resolve formatting, linting from CI
  • Loading branch information
HipsterBrown authored Nov 10, 2024
1 parent f15a572 commit 52db3c1
Show file tree
Hide file tree
Showing 56 changed files with 1,902 additions and 731 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
format_and_lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies
Expand All @@ -39,7 +39,7 @@ jobs:
run: pnpm run format && pnpm run lint

compile:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

# Allow this job to push changes to your repository
permissions:
Expand All @@ -27,10 +27,10 @@ jobs:
run_install: false


- name: Use Node.js 18
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
release:
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'skip ci')"

steps:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies
Expand Down
21 changes: 0 additions & 21 deletions bin/xs-dev

This file was deleted.

6 changes: 3 additions & 3 deletions docs/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
import { defineCollection } from 'astro:content'
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'

export const collections = {
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};
}
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ const loveConfig = require('eslint-config-love')
module.exports = [
{
...loveConfig,
files: ["src/**/*.ts"],
}
files: ['src/**/*.ts'],
},
]
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
"version": "0.32.6",
"description": "CLI for automating the setup and usage of Moddable XS tools",
"types": "build/types/types.d.ts",
"engines": {
"node": ">=20"
},
"bin": {
"xs-dev": "bin/xs-dev"
"xs-dev": "build/src/cli.js"
},
"scripts": {
"xs-dev": "tsx src/cli.ts",
"format": "prettier --write **/*.{js,ts,json}",
"lint": "eslint src/",
"clean-build": "rm -rf ./build",
Expand All @@ -32,8 +36,7 @@
"build",
"LICENSE",
"README.md",
"docs",
"bin"
"docs"
],
"license": "MIT",
"repository": {
Expand All @@ -42,6 +45,7 @@
},
"dependencies": {
"@octokit/rest": "^19.0.3",
"@stricli/core": "^1.1.0",
"axios": "^1.2.1",
"gluegun": "^5.1.2",
"serialport": "^10.3.0",
Expand Down Expand Up @@ -87,6 +91,7 @@
"tailwindcss": "^3.0.24",
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.1.0"
},
Expand Down
Loading

0 comments on commit 52db3c1

Please sign in to comment.