Skip to content

Commit

Permalink
fix(#151): rename importmap to importMap and import-map
Browse files Browse the repository at this point in the history
Co-authored-by: Suzu Tomo <[email protected]>
  • Loading branch information
nnmrts and kamekyame authored Nov 23, 2021
1 parent d5b5dc6 commit 8dce831
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ for additional info.
"cmd": "deno run app.ts",
"desc": "Run the main server.",

"importmap": "importmap.json"
"importMap": "importmap.json"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ value: 'typescript'}, ]}>
"cmd": "deno run app.ts",
"desc": "Run the main server.",

"importmap": "importmap.json"
"importMap": "importmap.json"
}
}
}
Expand All @@ -439,7 +439,7 @@ scripts:
cmd: deno run app.ts
desc: Run the main server.

importmap: "importmap.json"
importMap: "importmap.json"
```
</TabItem>
Expand All @@ -452,7 +452,7 @@ export default <DenonConfig>{
cmd: "deno run app.ts",
desc: "Run the main server.",

importmap: "importmap.json",
importMap: "importmap.json",
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"description": "Permissions that are granted to the script.",
"$ref": "#/definitions/flags"
},
"importmap": {
"importMap": {
"description": "Load import map file.",
"type": "string",
"default": "importmap.json"
Expand Down
4 changes: 2 additions & 2 deletions src/scripts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Deno.test({
env: {
SECRET: "123", // not going to show up
},
importmap: "cool.code.json",
importMap: "cool.code.json",
inspect: "127.0.0.1:4321",
inspectBrk: "127.0.0.1:1234",
lock: "lock.json",
Expand Down Expand Up @@ -66,7 +66,7 @@ Deno.test({

const values = {
"--cert": "secure.pem",
"--importmap": "cool.code.json",
"--import-map": "cool.code.json",
"--lock": "lock.json",
"--log-level": "info",
"--config": "tsconfig.json",
Expand Down
12 changes: 6 additions & 6 deletions src/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export interface ScriptOptions {
/** A list of boolean `--allow-*` deno cli options or
* a map of option names to values */
allow?: string[] | FlagsObject | "all";
/** The path to an importmap json file,
* passed to deno cli's `--importmap` option.
/** The path to an import map json file,
* passed to deno cli's `--import-map` option.
*
* **Note** This currently requires the `--unstable` flag */
importmap?: string;
importMap?: string;
/** The path to a tsconfig json file,
* passed to deno cli's `--tsconfig` option. */
tsconfig?: string;
Expand Down Expand Up @@ -120,9 +120,9 @@ export function buildFlags(options: ScriptOptions): string[] {
});
}
}
if (options.importmap) {
flags.push("--importmap");
flags.push(options.importmap);
if (options.importMap) {
flags.push("--import-map");
flags.push(options.importMap);
}
if (options.lock) {
flags.push("--lock");
Expand Down

0 comments on commit 8dce831

Please sign in to comment.