forked from MapComplete/MapComplete
Scripts: update id-preset reading script
This commit is contained in:
parent
46d3054cc8
commit
c7e7b4beed
1 changed files with 18 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/***
|
||||
* Parses presets from the iD repository and extracts some usefull tags from them
|
||||
* Parses presets from the iD repository and extracts some useful tags from them
|
||||
*/
|
||||
import ScriptUtils from "../ScriptUtils"
|
||||
import { existsSync, readFileSync, writeFileSync } from "fs"
|
||||
|
@ -8,6 +8,8 @@ import { LayerConfigJson } from "../../src/Models/ThemeConfig/Json/LayerConfigJs
|
|||
import { MappingConfigJson } from "../../src/Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
|
||||
import SmallLicense from "../../src/Models/smallLicense"
|
||||
import Script from "../Script"
|
||||
import { GenerateLicenseInfo } from "../generateLicenseInfo"
|
||||
|
||||
|
||||
interface IconThief {
|
||||
steal(iconName: string): boolean
|
||||
|
@ -285,8 +287,20 @@ class IdThief {
|
|||
class ReadIdPresets extends Script {
|
||||
constructor() {
|
||||
super(
|
||||
"Reads the id-tagging-schema repository and steals the presets; which will be written into 'id_presets.json'\n\nArguments: [path-to-repository] [path-to-target]\n" +
|
||||
"Note that default arguments are used"
|
||||
[
|
||||
|
||||
"Reads the id-tagging-schema repository and steals the presets; which will be written into 'id_presets.json'\n\nArguments: [path-to-repository] [path-to-target]",
|
||||
"Note that default arguments are used",
|
||||
"Before running this script, you'll want to have the following file structure:",
|
||||
"",
|
||||
"# ../mapcomplete (this repository)",
|
||||
"cd ../font-awesome && git pull && cd - # (https://github.com/FortAwesome/Font-Awesome)",
|
||||
"cd ../temaki && git pull && cd - # https://github.com/ideditor/temaki",
|
||||
"cd ../maki && git pull && cd - # https://github.com/mapbox/maki",
|
||||
"cd ../id-tagging-schema && git pull && nvm use && npm ci && npm run build && npm run dist",
|
||||
"",
|
||||
"The source file is then loaded in ../id-tagging_schema/data/presets/shop/<various>.Json"
|
||||
].join("\n")
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -349,3 +363,4 @@ class ReadIdPresets extends Script {
|
|||
}
|
||||
|
||||
new ReadIdPresets().run()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue