forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
ebc48f6b53
commit
e7de94576f
232 changed files with 11430 additions and 3365 deletions
|
@ -14,20 +14,24 @@ import { GenerateLicenseInfo } from "./generateLicenseInfo"
|
|||
|
||||
class ImportCustomTheme extends Script {
|
||||
constructor() {
|
||||
super(["Given the path of a custom layer, will load the layer into mapcomplete as official","",
|
||||
"Usage:",
|
||||
"vite-node scripts/importCustomTheme.ts <path-of-layer-or-theme>"].join("\n"))
|
||||
super(
|
||||
[
|
||||
"Given the path of a custom layer, will load the layer into mapcomplete as official",
|
||||
"",
|
||||
"Usage:",
|
||||
"vite-node scripts/importCustomTheme.ts <path-of-layer-or-theme>",
|
||||
].join("\n")
|
||||
)
|
||||
}
|
||||
|
||||
async main(args: string[]) {
|
||||
if(args.length === 0){
|
||||
if (args.length === 0) {
|
||||
this.printHelp()
|
||||
return
|
||||
}
|
||||
const path = args[0]
|
||||
|
||||
const layerconfig = <LayerConfigJson>JSON.parse(
|
||||
readFileSync(path, "utf-8"))
|
||||
const layerconfig = <LayerConfigJson>JSON.parse(readFileSync(path, "utf-8"))
|
||||
const id = layerconfig.id
|
||||
const dirPath = "./assets/layers/" + id
|
||||
if (!existsSync(dirPath)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue