npm
This commit is contained in:
parent
07300eb96f
commit
2730cc0d8e
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Toes is a personal web server you run in your home.
|
Toes is a personal web server you run in your home.
|
||||||
|
|
||||||
Set it up, turn it on, and forget about the cloud.
|
Turn it on and forget about the cloud.
|
||||||
|
|
||||||
## quickstart
|
## quickstart
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "toes",
|
"name": "@because/toes",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "personal web appliance - turn it on and forget about the cloud",
|
||||||
"module": "src/index.ts",
|
"module": "src/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"toes": "src/cli/index.ts"
|
"toes": "src/cli/index.ts"
|
||||||
},
|
},
|
||||||
|
|
@ -27,4 +28,4 @@
|
||||||
"@because/hype": "^0.0.1",
|
"@because/hype": "^0.0.1",
|
||||||
"kleur": "^4.1.5"
|
"kleur": "^4.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -284,12 +284,12 @@ function getAppPackage(): { name?: string; scripts?: { toes?: string } } | null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getAppName = () => getAppPackage()?.name || basename(process.cwd())
|
||||||
const isApp = () => !!getAppPackage()?.scripts?.toes
|
const isApp = () => !!getAppPackage()?.scripts?.toes
|
||||||
|
|
||||||
function resolveAppName(name?: string): string | undefined {
|
function resolveAppName(name?: string): string | undefined {
|
||||||
if (name) return name
|
if (name) return name
|
||||||
const pkg = getAppPackage()
|
if (isApp()) return getAppName()
|
||||||
if (pkg?.scripts?.toes) return pkg.name || basename(process.cwd())
|
|
||||||
console.error('No app specified and current directory is not a toes app')
|
console.error('No app specified and current directory is not a toes app')
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
@ -300,7 +300,7 @@ async function pushApp() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = basename(process.cwd())
|
const appName = getAppName()
|
||||||
|
|
||||||
const localManifest = generateManifest(process.cwd(), appName)
|
const localManifest = generateManifest(process.cwd(), appName)
|
||||||
const result = await getManifest(appName)
|
const result = await getManifest(appName)
|
||||||
|
|
@ -430,7 +430,7 @@ async function pullApp() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = basename(process.cwd())
|
const appName = getAppName()
|
||||||
|
|
||||||
const remoteManifest: Manifest | undefined = await get(`/api/sync/apps/${appName}/manifest`)
|
const remoteManifest: Manifest | undefined = await get(`/api/sync/apps/${appName}/manifest`)
|
||||||
if (!remoteManifest) {
|
if (!remoteManifest) {
|
||||||
|
|
@ -507,7 +507,7 @@ async function syncApp() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = basename(process.cwd())
|
const appName = getAppName()
|
||||||
const gitignore = loadGitignore(process.cwd())
|
const gitignore = loadGitignore(process.cwd())
|
||||||
const localHashes = new Map<string, string>()
|
const localHashes = new Map<string, string>()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user