feat: support embedded import map in deno.json (#1188)
One can now inline the `imports` and `scopes` from the import map directly into deno.json. For new projects, `import_map.json` is not generated anymore. Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
co-authored by
Luca Casonato
parent
3857a49f1c
commit
1b6678951a
+1
-13
@@ -65,7 +65,6 @@ Deno.test({
|
||||
"name": tmpDirName,
|
||||
"contents": [
|
||||
{ "type": "file", "name": "README.md" },
|
||||
{ "type": "file", "name": "import_map.json" },
|
||||
{ "type": "file", "name": "fresh.gen.ts" },
|
||||
{
|
||||
"type": "directory",
|
||||
@@ -204,7 +203,6 @@ Deno.test({
|
||||
"name": tmpDirName,
|
||||
"contents": [
|
||||
{ "type": "file", "name": "README.md" },
|
||||
{ "type": "file", "name": "import_map.json" },
|
||||
{ "type": "file", "name": "fresh.gen.ts" },
|
||||
{ "type": "file", "name": "twind.config.ts" },
|
||||
{
|
||||
@@ -422,20 +420,11 @@ Deno.test({
|
||||
|
||||
await cliProcess.output();
|
||||
|
||||
// "move deno.json and import_map.json one level up"
|
||||
// move deno.json one level up
|
||||
await Deno.rename(
|
||||
path.join(tmpDirName, "subdirectory", "subsubdirectory", "deno.json"),
|
||||
path.join(tmpDirName, "deno.json"),
|
||||
);
|
||||
await Deno.rename(
|
||||
path.join(
|
||||
tmpDirName,
|
||||
"subdirectory",
|
||||
"subsubdirectory",
|
||||
"import_map.json",
|
||||
),
|
||||
path.join(tmpDirName, "import_map.json"),
|
||||
);
|
||||
|
||||
const targetFileTree: FileTree[] = [
|
||||
{
|
||||
@@ -443,7 +432,6 @@ Deno.test({
|
||||
"name": tmpDirName,
|
||||
"contents": [
|
||||
{ "type": "file", "name": "deno.json" },
|
||||
{ "type": "file", "name": "import_map.json" },
|
||||
{
|
||||
"type": "directory",
|
||||
"name": "subdirectory",
|
||||
|
||||
Reference in New Issue
Block a user