@gimloader/build
Advanced tools
Comparing version
{ | ||
"name": "@gimloader/build", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A package to help build complex plugins for Gimloader", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -1,1 +0,1 @@ | ||
export default function createGLConfig(name: string, description: string, author: string, bundler: string, plugins: string[]): string; | ||
export default function createGLConfig(name: string, description: string, author: string, bundler: string, useTs: boolean, plugins: string[]): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = createGLConfig; | ||
function createGLConfig(name, description, author, bundler, plugins) { | ||
let useTs = plugins.includes('typescript'); | ||
function createGLConfig(name, description, author, bundler, useTs, plugins) { | ||
let config = ""; | ||
@@ -7,0 +6,0 @@ if (plugins.includes('typescript')) { |
@@ -63,2 +63,4 @@ "use strict"; | ||
let deps = dependencies[plugin]; | ||
if (!deps) | ||
continue; | ||
for (let dep of deps) { | ||
@@ -65,0 +67,0 @@ if (installed.includes(dep)) |
@@ -49,2 +49,3 @@ "use strict"; | ||
let plugins; | ||
let useTs = false; | ||
if (bundler === "esbuild") { | ||
@@ -54,5 +55,7 @@ plugins = await (0, prompts_1.checkbox)({ | ||
choices: [ | ||
{ name: "typescript", value: "esbuild-typescript" }, | ||
{ name: "esbuild-svelte", value: "esbuild-svelte" } | ||
] | ||
}); | ||
useTs = plugins.includes('esbuild-typescript'); | ||
} | ||
@@ -70,4 +73,4 @@ else { | ||
}); | ||
useTs = plugins.includes('typescript'); | ||
} | ||
let useTs = plugins.includes('typescript'); | ||
// create the package.json if it doesn't exist | ||
@@ -89,3 +92,3 @@ (0, createPackageJson_1.default)(name, description, author, useTs, plugins); | ||
console.log('Creating GL.config.js...'); | ||
let config = (0, createGLConfig_1.default)(name, description, author, bundler, plugins); | ||
let config = (0, createGLConfig_1.default)(name, description, author, bundler, useTs, plugins); | ||
fs_1.default.writeFileSync(configPath, config); | ||
@@ -92,0 +95,0 @@ // create main file |
{ | ||
"name": "@gimloader/build", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A package to help build complex plugins for Gimloader", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
38670
0.44%950
0.42%