Skip to content

Commit

Permalink
refactor: rename project to archons (#26)
Browse files Browse the repository at this point in the history
* chore: rename project to `archons`

* chore: rename changesets
  • Loading branch information
fu050409 authored Jul 20, 2024
1 parent 598e622 commit 0cbc687
Show file tree
Hide file tree
Showing 39 changed files with 179 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .changeset/green-cherries-yawn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Set color choice to always
2 changes: 1 addition & 1 deletion .changeset/healthy-carpets-learn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Implement utils functions to create clap command instance
2 changes: 1 addition & 1 deletion .changeset/nasty-bugs-jog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Call callback functions with context object after merged parsed args
2 changes: 1 addition & 1 deletion .changeset/orange-bugs-rest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Merge parsed args by `clap-rs` to context args object
2 changes: 1 addition & 1 deletion .changeset/poor-cats-grow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Remove features for clap-rs
2 changes: 1 addition & 1 deletion .changeset/small-ducks-type.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Add `defineCommand` interface
2 changes: 1 addition & 1 deletion .changeset/two-keys-thank.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'clap-js': patch
'archons': patch
---

Implement command definition types
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and Test
env:
DEBUG: napi:*
APP_NAME: clap-js
APP_NAME: archons
MACOSX_DEPLOYMENT_TARGET: '10.13'
CARGO_INCREMENTAL: '1'
permissions:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["苏向夜 <[email protected]>"]
edition = "2021"
name = "clap-js"
name = "archons"
version = "0.1.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# clap-js
# archons

Fast and elegant CLI build tool based on clap-rs

Expand Down
108 changes: 54 additions & 54 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'clap-js.android-arm64.node'))
localFileExisted = existsSync(join(__dirname, 'archons.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.android-arm64.node')
nativeBinding = require('./archons.android-arm64.node')
} else {
nativeBinding = require('clap-js-android-arm64')
nativeBinding = require('archons-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'clap-js.android-arm-eabi.node'))
localFileExisted = existsSync(join(__dirname, 'archons.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.android-arm-eabi.node')
nativeBinding = require('./archons.android-arm-eabi.node')
} else {
nativeBinding = require('clap-js-android-arm-eabi')
nativeBinding = require('archons-android-arm-eabi')
}
} catch (e) {
loadError = e
Expand All @@ -63,41 +63,41 @@ switch (platform) {
switch (arch) {
case 'x64':
localFileExisted = existsSync(
join(__dirname, 'clap-js.win32-x64-msvc.node')
join(__dirname, 'archons.win32-x64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.win32-x64-msvc.node')
nativeBinding = require('./archons.win32-x64-msvc.node')
} else {
nativeBinding = require('clap-js-win32-x64-msvc')
nativeBinding = require('archons-win32-x64-msvc')
}
} catch (e) {
loadError = e
}
break
case 'ia32':
localFileExisted = existsSync(
join(__dirname, 'clap-js.win32-ia32-msvc.node')
join(__dirname, 'archons.win32-ia32-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.win32-ia32-msvc.node')
nativeBinding = require('./archons.win32-ia32-msvc.node')
} else {
nativeBinding = require('clap-js-win32-ia32-msvc')
nativeBinding = require('archons-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'clap-js.win32-arm64-msvc.node')
join(__dirname, 'archons.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.win32-arm64-msvc.node')
nativeBinding = require('./archons.win32-arm64-msvc.node')
} else {
nativeBinding = require('clap-js-win32-arm64-msvc')
nativeBinding = require('archons-win32-arm64-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -108,37 +108,37 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'clap-js.darwin-universal.node'))
localFileExisted = existsSync(join(__dirname, 'archons.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.darwin-universal.node')
nativeBinding = require('./archons.darwin-universal.node')
} else {
nativeBinding = require('clap-js-darwin-universal')
nativeBinding = require('archons-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'clap-js.darwin-x64.node'))
localFileExisted = existsSync(join(__dirname, 'archons.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.darwin-x64.node')
nativeBinding = require('./archons.darwin-x64.node')
} else {
nativeBinding = require('clap-js-darwin-x64')
nativeBinding = require('archons-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'clap-js.darwin-arm64.node')
join(__dirname, 'archons.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.darwin-arm64.node')
nativeBinding = require('./archons.darwin-arm64.node')
} else {
nativeBinding = require('clap-js-darwin-arm64')
nativeBinding = require('archons-darwin-arm64')
}
} catch (e) {
loadError = e
Expand All @@ -152,12 +152,12 @@ switch (platform) {
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'clap-js.freebsd-x64.node'))
localFileExisted = existsSync(join(__dirname, 'archons.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.freebsd-x64.node')
nativeBinding = require('./archons.freebsd-x64.node')
} else {
nativeBinding = require('clap-js-freebsd-x64')
nativeBinding = require('archons-freebsd-x64')
}
} catch (e) {
loadError = e
Expand All @@ -168,26 +168,26 @@ switch (platform) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-x64-musl.node')
join(__dirname, 'archons.linux-x64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-x64-musl.node')
nativeBinding = require('./archons.linux-x64-musl.node')
} else {
nativeBinding = require('clap-js-linux-x64-musl')
nativeBinding = require('archons-linux-x64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-x64-gnu.node')
join(__dirname, 'archons.linux-x64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-x64-gnu.node')
nativeBinding = require('./archons.linux-x64-gnu.node')
} else {
nativeBinding = require('clap-js-linux-x64-gnu')
nativeBinding = require('archons-linux-x64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -197,26 +197,26 @@ switch (platform) {
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-arm64-musl.node')
join(__dirname, 'archons.linux-arm64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-arm64-musl.node')
nativeBinding = require('./archons.linux-arm64-musl.node')
} else {
nativeBinding = require('clap-js-linux-arm64-musl')
nativeBinding = require('archons-linux-arm64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-arm64-gnu.node')
join(__dirname, 'archons.linux-arm64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-arm64-gnu.node')
nativeBinding = require('./archons.linux-arm64-gnu.node')
} else {
nativeBinding = require('clap-js-linux-arm64-gnu')
nativeBinding = require('archons-linux-arm64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -226,26 +226,26 @@ switch (platform) {
case 'arm':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-arm-musleabihf.node')
join(__dirname, 'archons.linux-arm-musleabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-arm-musleabihf.node')
nativeBinding = require('./archons.linux-arm-musleabihf.node')
} else {
nativeBinding = require('clap-js-linux-arm-musleabihf')
nativeBinding = require('archons-linux-arm-musleabihf')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-arm-gnueabihf.node')
join(__dirname, 'archons.linux-arm-gnueabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-arm-gnueabihf.node')
nativeBinding = require('./archons.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('clap-js-linux-arm-gnueabihf')
nativeBinding = require('archons-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
Expand All @@ -255,26 +255,26 @@ switch (platform) {
case 'riscv64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-riscv64-musl.node')
join(__dirname, 'archons.linux-riscv64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-riscv64-musl.node')
nativeBinding = require('./archons.linux-riscv64-musl.node')
} else {
nativeBinding = require('clap-js-linux-riscv64-musl')
nativeBinding = require('archons-linux-riscv64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-riscv64-gnu.node')
join(__dirname, 'archons.linux-riscv64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-riscv64-gnu.node')
nativeBinding = require('./archons.linux-riscv64-gnu.node')
} else {
nativeBinding = require('clap-js-linux-riscv64-gnu')
nativeBinding = require('archons-linux-riscv64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -283,13 +283,13 @@ switch (platform) {
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, 'clap-js.linux-s390x-gnu.node')
join(__dirname, 'archons.linux-s390x-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./clap-js.linux-s390x-gnu.node')
nativeBinding = require('./archons.linux-s390x-gnu.node')
} else {
nativeBinding = require('clap-js-linux-s390x-gnu')
nativeBinding = require('archons-linux-s390x-gnu')
}
} catch (e) {
loadError = e
Expand Down
4 changes: 2 additions & 2 deletions npm/android-arm-eabi/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `clap-js-android-arm-eabi`
# `archons-android-arm-eabi`

This is the **armv7-linux-androideabi** binary for `clap-js`
This is the **armv7-linux-androideabi** binary for `archons`
Loading

0 comments on commit 0cbc687

Please sign in to comment.