File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1- import { existsSync , readFileSync } from "node:fs" ;
1+ import { existsSync , readFileSync , mkdirSync } from "node:fs" ;
22import { join } from "node:path" ;
33import { fileURLToPath } from "node:url" ;
44import { ImportMap } from "@jspm/import-map" ;
@@ -20,6 +20,8 @@ export const root = fileURLToPath(`file://${wd}`);
2020export const cacheMap = new Map ( ) ;
2121export const nodeImportMapPath = join ( root , "node.importmap" ) ;
2222export const cache = join ( root , ".cache" ) ;
23+ const hasCacheFoler = existsSync ( cache )
24+ if ( ! hasCacheFoler ) mkdirSync ( cache ) ;
2325const map = existsSync ( nodeImportMapPath ) ? JSON . parse ( readFileSync ( nodeImportMapPath , { encoding : "utf8" } ) ) : { } ;
2426export const importmap = new ImportMap ( { rootUrl : import . meta. url , map } ) ;
2527
@@ -28,4 +30,4 @@ export const options = parseArgs({
2830 options : { debugNodeImportmapLoader : { alias : "d" , type : "boolean" , default : false } } ,
2931} ) ;
3032
31- export const isDebuggingEnabled = Boolean ( options . debugNodeImportmapLoader ) ;
33+ export const isDebuggingEnabled = Boolean ( options ? .debugNodeImportmapLoader ) ;
Original file line number Diff line number Diff line change 1- import * as TeleportProjectGeneratorPreact from "@teleporthq/teleport-project-generator-preact" ;
2- import * as TeleportProjectGeneratorReact from "@teleporthq/teleport-project-generator-react" ;
3- import * as TeleportTypes from "@teleporthq/teleport-types" ;
1+ // import * as TeleportProjectGeneratorPreact from "@teleporthq/teleport-project-generator-preact";
2+ // import * as TeleportProjectGeneratorReact from "@teleporthq/teleport-project-generator-react";
3+ // import * as TeleportTypes from "@teleporthq/teleport-types";
44import * as react from "react" ;
55import * as reactRouter from "react-router" ;
66import * as reactRouterDom from "react-router-dom" ;
77import assert from "assert" ;
88
99// Write main module code here, or as a separate file with a "src" attribute on the module script.
1010console . log (
11- TeleportProjectGeneratorPreact ,
12- TeleportProjectGeneratorReact ,
13- TeleportTypes ,
11+ // TeleportProjectGeneratorPreact,
12+ // TeleportProjectGeneratorReact,
13+ // TeleportTypes,
1414 react ,
1515 reactRouter ,
1616 reactRouterDom ,
You can’t perform that action at this time.
0 commit comments