Comparing version 0.0.19 to 0.0.20
@@ -45,3 +45,3 @@ "use strict"; | ||
await fs_1.promises.mkdir(dirPath, { recursive: true }); | ||
console.log(`Directory created or already exists: ${dirPath}`); | ||
// console.log(`Directory created or already exists: ${dirPath}`); | ||
} | ||
@@ -48,0 +48,0 @@ } |
@@ -5,9 +5,16 @@ /** | ||
declare class JavaScriptMinifier { | ||
/** | ||
* Configuration for the JavaScript compiler. | ||
*/ | ||
private config; | ||
/** | ||
* Constructs an instance with the provided configuration. | ||
* @param {any} config - Configuration object - minification options for Terser. | ||
* Default configuration for the JavaScript compiler. | ||
*/ | ||
constructor(config: any); | ||
private static defaultConfig; | ||
/** | ||
* Constructs an instance with merged configuration of default and custom options. | ||
* @param {any} customConfig - OptionalConfiguration object - minification options for Terser. | ||
*/ | ||
constructor(customConfig?: any); | ||
/** | ||
* Minifies a JavaScript file. | ||
@@ -14,0 +21,0 @@ * @param {string} inputPath - Path to the input JavaScript file. |
"use strict"; | ||
// class/JavaScriptMinifier.ts | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -19,2 +22,3 @@ // Copyright 2023 Scape Agency BV | ||
var fs_1 = require("fs"); | ||
var terser_config_js_1 = __importDefault(require("../config/terser.config.js")); | ||
// ============================================================================ | ||
@@ -28,7 +32,14 @@ // Classes | ||
/** | ||
* Constructs an instance with the provided configuration. | ||
* @param {any} config - Configuration object - minification options for Terser. | ||
* Default configuration for the JavaScript compiler. | ||
*/ | ||
constructor(config) { | ||
this.config = config; | ||
static { this.defaultConfig = terser_config_js_1.default; } | ||
/** | ||
* Constructs an instance with merged configuration of default and custom options. | ||
* @param {any} customConfig - OptionalConfiguration object - minification options for Terser. | ||
*/ | ||
constructor(customConfig = {}) { | ||
this.config = { | ||
...JavaScriptMinifier.defaultConfig, | ||
...customConfig | ||
}; | ||
} | ||
@@ -35,0 +46,0 @@ /** |
@@ -31,2 +31,3 @@ "use strict"; | ||
class TypeScriptCompiler { | ||
// private config: ts.CompilerOptions; | ||
// private config: { [key: symbol]: any}; | ||
@@ -37,4 +38,3 @@ /** | ||
static { this.defaultConfig = ts_config_js_1.default; } | ||
// private static defaultConfig: ts.CompilerOptions = tsConfig; | ||
// private static defaultConfig: CompilerOptions = tsConfig; | ||
// private static defaultConfig: ts.CompilerOptions = tsConfig; | ||
/** | ||
@@ -41,0 +41,0 @@ * Constructs an instance with merged configuration of default and custom options. |
@@ -8,2 +8,3 @@ "use strict"; | ||
var StylizedLogger_js_1 = __importDefault(require("../class/StylizedLogger.js")); | ||
// import CONFIG from '../path/to/config.js'; // Assuming CONFIG is imported from a config file | ||
const directoryCleaner = new DirectoryCleaner_js_1.default(); | ||
@@ -10,0 +11,0 @@ const logger = new StylizedLogger_js_1.default(); |
{ | ||
"name": "pack.gl", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Package Builder.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -52,3 +52,3 @@ // class/DirectoryGenerator.ts | ||
await fsPromises.mkdir(dirPath, { recursive: true }); | ||
console.log(`Directory created or already exists: ${dirPath}`); | ||
// console.log(`Directory created or already exists: ${dirPath}`); | ||
} | ||
@@ -55,0 +55,0 @@ } catch (error) { |
@@ -24,2 +24,3 @@ // class/JavaScriptMinifier.ts | ||
import { promises as fs } from 'fs'; | ||
import terserConfig from "../config/terser.config.js" | ||
@@ -36,11 +37,24 @@ | ||
private config: any; | ||
/** | ||
* Constructs an instance with the provided configuration. | ||
* @param {any} config - Configuration object - minification options for Terser. | ||
* Configuration for the JavaScript compiler. | ||
*/ | ||
constructor(config: any) { | ||
this.config = config; | ||
} | ||
private config: any; | ||
/** | ||
* Default configuration for the JavaScript compiler. | ||
*/ | ||
private static defaultConfig: any = terserConfig; | ||
/** | ||
* Constructs an instance with merged configuration of default and custom options. | ||
* @param {any} customConfig - OptionalConfiguration object - minification options for Terser. | ||
*/ | ||
constructor( | ||
customConfig: any = {}, | ||
) { | ||
this.config = { | ||
...JavaScriptMinifier.defaultConfig, | ||
...customConfig | ||
}; | ||
} | ||
@@ -47,0 +61,0 @@ /** |
@@ -36,2 +36,3 @@ // class/PackageCreator.ts | ||
private packageJson: PackageJson; | ||
@@ -38,0 +39,0 @@ |
@@ -42,4 +42,4 @@ // class/TypeScriptCompiler.ts | ||
*/ | ||
// private config: ts.CompilerOptions; | ||
private config: any; | ||
// private config: ts.CompilerOptions; | ||
// private config: { [key: symbol]: any}; | ||
@@ -51,4 +51,3 @@ | ||
private static defaultConfig: any = tsConfig; | ||
// private static defaultConfig: ts.CompilerOptions = tsConfig; | ||
// private static defaultConfig: CompilerOptions = tsConfig; | ||
// private static defaultConfig: ts.CompilerOptions = tsConfig; | ||
@@ -55,0 +54,0 @@ /** |
import DirectoryCleaner from '../class/DirectoryCleaner.js'; | ||
import StylizedLogger from '../class/StylizedLogger.js'; | ||
import CONFIG from '../path/to/config.js'; // Assuming CONFIG is imported from a config file | ||
// import CONFIG from '../path/to/config.js'; // Assuming CONFIG is imported from a config file | ||
@@ -5,0 +5,0 @@ const directoryCleaner = new DirectoryCleaner(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234645
88
4939