From 070d99645f4849cfc4479382d756bd40379594d0 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 20 Oct 2020 13:30:59 +0100 Subject: chore: Rename --importmap to --import-map (#7032) --importmap still works as an alias to --import-map but is not visible in CLI help output. --- cli/tests/import_maps/import_map.json | 14 ++++++++++++++ cli/tests/import_maps/lodash/lodash.ts | 1 + cli/tests/import_maps/lodash/other_file.ts | 1 + cli/tests/import_maps/moment/moment.ts | 1 + cli/tests/import_maps/moment/other_file.ts | 1 + cli/tests/import_maps/scope/scoped.ts | 2 ++ cli/tests/import_maps/scoped_moment.ts | 1 + cli/tests/import_maps/test.ts | 6 ++++++ cli/tests/import_maps/vue.ts | 1 + 9 files changed, 28 insertions(+) create mode 100644 cli/tests/import_maps/import_map.json create mode 100644 cli/tests/import_maps/lodash/lodash.ts create mode 100644 cli/tests/import_maps/lodash/other_file.ts create mode 100644 cli/tests/import_maps/moment/moment.ts create mode 100644 cli/tests/import_maps/moment/other_file.ts create mode 100644 cli/tests/import_maps/scope/scoped.ts create mode 100644 cli/tests/import_maps/scoped_moment.ts create mode 100644 cli/tests/import_maps/test.ts create mode 100644 cli/tests/import_maps/vue.ts (limited to 'cli/tests/import_maps') diff --git a/cli/tests/import_maps/import_map.json b/cli/tests/import_maps/import_map.json new file mode 100644 index 000000000..601874aab --- /dev/null +++ b/cli/tests/import_maps/import_map.json @@ -0,0 +1,14 @@ +{ + "imports": { + "moment": "./moment/moment.ts", + "moment/": "./moment/", + "lodash": "./lodash/lodash.ts", + "lodash/": "./lodash/", + "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts" + }, + "scopes": { + "scope/": { + "moment": "./scoped_moment.ts" + } + } +} diff --git a/cli/tests/import_maps/lodash/lodash.ts b/cli/tests/import_maps/lodash/lodash.ts new file mode 100644 index 000000000..2ec04ed3c --- /dev/null +++ b/cli/tests/import_maps/lodash/lodash.ts @@ -0,0 +1 @@ +console.log("Hello from remapped lodash!"); diff --git a/cli/tests/import_maps/lodash/other_file.ts b/cli/tests/import_maps/lodash/other_file.ts new file mode 100644 index 000000000..714adae3f --- /dev/null +++ b/cli/tests/import_maps/lodash/other_file.ts @@ -0,0 +1 @@ +console.log("Hello from remapped lodash dir!"); diff --git a/cli/tests/import_maps/moment/moment.ts b/cli/tests/import_maps/moment/moment.ts new file mode 100644 index 000000000..2b54a431e --- /dev/null +++ b/cli/tests/import_maps/moment/moment.ts @@ -0,0 +1 @@ +console.log("Hello from remapped moment!"); diff --git a/cli/tests/import_maps/moment/other_file.ts b/cli/tests/import_maps/moment/other_file.ts new file mode 100644 index 000000000..24f3a0226 --- /dev/null +++ b/cli/tests/import_maps/moment/other_file.ts @@ -0,0 +1 @@ +console.log("Hello from remapped moment dir!"); diff --git a/cli/tests/import_maps/scope/scoped.ts b/cli/tests/import_maps/scope/scoped.ts new file mode 100644 index 000000000..9a0b5d8e3 --- /dev/null +++ b/cli/tests/import_maps/scope/scoped.ts @@ -0,0 +1,2 @@ +import "moment"; +console.log("Hello from scoped!"); diff --git a/cli/tests/import_maps/scoped_moment.ts b/cli/tests/import_maps/scoped_moment.ts new file mode 100644 index 000000000..9f67f88d4 --- /dev/null +++ b/cli/tests/import_maps/scoped_moment.ts @@ -0,0 +1 @@ +console.log("Hello from scoped moment!"); diff --git a/cli/tests/import_maps/test.ts b/cli/tests/import_maps/test.ts new file mode 100644 index 000000000..9b09e9953 --- /dev/null +++ b/cli/tests/import_maps/test.ts @@ -0,0 +1,6 @@ +import "moment"; +import "moment/other_file.ts"; +import "lodash"; +import "lodash/other_file.ts"; +import "https://www.unpkg.com/vue/dist/vue.runtime.esm.js"; +import "./scope/scoped.ts"; diff --git a/cli/tests/import_maps/vue.ts b/cli/tests/import_maps/vue.ts new file mode 100644 index 000000000..76dbe1917 --- /dev/null +++ b/cli/tests/import_maps/vue.ts @@ -0,0 +1 @@ +console.log("Hello from remapped Vue!"); -- cgit v1.2.3