fix(build): modernize project configuration and tighten smartjimp TypeScript compatibility
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartjimp",
|
||||
"shortDescription": "image processing with sharp and jimp",
|
||||
"npmPackagename": "@push.rocks/smartjimp",
|
||||
"license": "MIT",
|
||||
"description": "A TypeScript library for image processing combining both sharp and jimp libraries.",
|
||||
"keywords": [
|
||||
"image processing",
|
||||
"TypeScript",
|
||||
"sharp",
|
||||
"jimp",
|
||||
"resize image",
|
||||
"convert image format",
|
||||
"image caching",
|
||||
"buffer manipulation",
|
||||
"AVIF",
|
||||
"WEBP",
|
||||
"PNG"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-05-01 - 1.2.1 - fix(build)
|
||||
modernize project configuration and tighten smartjimp TypeScript compatibility
|
||||
|
||||
- migrate npm metadata to the new @git.zone/@ship.zone config structure and add .smartconfig.json
|
||||
- update package scripts and dependency versions for the current toolchain
|
||||
- improve SmartJimp typings and error handling, including optional variation support and typed sharp options
|
||||
- move tests to a Node-specific entry and adapt them to the current smartfile API
|
||||
- enable stricter TypeScript settings with noImplicitAny and explicit node types
|
||||
|
||||
## [1.2.0] - 2025-01-02
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2020 Task Venture Capital GmbH (hello@lossless.com)
|
||||
Copyright (c) 2020 Task Venture Capital GmbH <hello@task.vc>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+15
-8
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartjimp",
|
||||
"description": "A TypeScript library for image processing combining both sharp and jimp libraries.",
|
||||
"shortDescription": "image processing with sharp and jimp",
|
||||
"npmPackagename": "@push.rocks/smartjimp",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks",
|
||||
"description": "A TypeScript library for image processing combining both sharp and jimp libraries.",
|
||||
"keywords": [
|
||||
"image processing",
|
||||
"TypeScript",
|
||||
@@ -22,13 +22,20 @@
|
||||
"WEBP",
|
||||
"PNG"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"tsdoc": {
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
}
|
||||
}
|
||||
+18
-15
@@ -5,28 +5,29 @@
|
||||
"description": "A TypeScript library for image processing combining both sharp and jimp libraries.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"author": "Task Venture Capital GmbH <hello@task.vc>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --allowimplicitany)",
|
||||
"buildDocs": "tsdoc",
|
||||
"localPublish": "gitzone commit && pnpm run build && pnpm publish && pnpm publish --access public --registry=\"https://registry.npmjs.org\""
|
||||
"test": "tstest test/",
|
||||
"format": "gitzone format",
|
||||
"build": "tsbuild",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^2.3.2",
|
||||
"@types/node": "^20.11.17"
|
||||
"@git.zone/tsbuild": "^4.4.0",
|
||||
"@git.zone/tsrun": "^2.0.3",
|
||||
"@git.zone/tstest": "^3.6.3",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/pngjs": "^6.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@push.rocks/levelcache": "^3.0.8",
|
||||
"@push.rocks/smartfile": "^11.0.4",
|
||||
"@push.rocks/smarthash": "^3.0.4",
|
||||
"@push.rocks/levelcache": "^3.2.2",
|
||||
"@push.rocks/smartfile": "^13.1.3",
|
||||
"@push.rocks/smarthash": "^3.2.7",
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
"@push.rocks/smartrequest": "^4.2.1",
|
||||
"jimp": "^1.6.0",
|
||||
"sharp": "^0.34.3"
|
||||
"@push.rocks/smartrequest": "^5.0.1",
|
||||
"jimp": "^1.6.1",
|
||||
"sharp": "^0.34.5"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@@ -37,6 +38,8 @@
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
".smartconfig.json",
|
||||
"license",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
|
||||
Generated
+3058
-4835
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smartjimp from '../ts/index.js';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
|
||||
const smartFileFactory = smartfile.SmartFileFactory.nodeFs();
|
||||
const sourceImageUrl = 'https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80';
|
||||
|
||||
let testSmartJimp: smartjimp.SmartJimp;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp' });
|
||||
expect(testSmartJimp).toBeInstanceOf(smartjimp.SmartJimp);
|
||||
});
|
||||
|
||||
tap.test('should be able to create a master', async () => {
|
||||
const smartfileInstance = await smartFileFactory.fromUrl(sourceImageUrl);
|
||||
const convertedAsset = await testSmartJimp.getFromSmartfile(smartfileInstance, { width: 500 });
|
||||
await smartFileFactory.fromBuffer('.nogit/result.avif', convertedAsset).write();
|
||||
});
|
||||
|
||||
tap.test('should be able to use jimp', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'jimp' });
|
||||
const smartfileInstance = await smartFileFactory.fromUrl(sourceImageUrl);
|
||||
const convertedAsset = await testSmartJimp.computeAssetVariation(smartfileInstance.contentBuffer, {
|
||||
format: 'png',
|
||||
});
|
||||
await smartFileFactory.fromBuffer('.nogit/result2.png', convertedAsset).write();
|
||||
});
|
||||
|
||||
tap.test('should create progressive JPEG with Sharp', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp' });
|
||||
const smartfileInstance = await smartFileFactory.fromUrl(sourceImageUrl);
|
||||
|
||||
// Create progressive JPEG
|
||||
const progressiveJpeg = await testSmartJimp.getFromSmartfile(smartfileInstance, {
|
||||
format: 'jpeg',
|
||||
progressive: true,
|
||||
width: 800,
|
||||
});
|
||||
|
||||
expect(progressiveJpeg).toBeInstanceOf(Buffer);
|
||||
await smartFileFactory.fromBuffer('.nogit/progressive.jpg', progressiveJpeg).write();
|
||||
});
|
||||
|
||||
tap.test('should convert PNG to progressive JPEG', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp' });
|
||||
|
||||
// First create a PNG
|
||||
const smartfileInstance = await smartFileFactory.fromUrl(sourceImageUrl);
|
||||
const pngBuffer = await testSmartJimp.computeAssetVariation(smartfileInstance.contentBuffer, {
|
||||
format: 'png',
|
||||
width: 500,
|
||||
});
|
||||
|
||||
// Then convert it to progressive JPEG
|
||||
const progressiveJpeg = await testSmartJimp.computeAssetVariation(pngBuffer, {
|
||||
format: 'jpeg',
|
||||
progressive: true,
|
||||
});
|
||||
|
||||
expect(progressiveJpeg).toBeInstanceOf(Buffer);
|
||||
await smartFileFactory.fromBuffer('.nogit/png-to-progressive.jpg', progressiveJpeg).write();
|
||||
});
|
||||
|
||||
export default tap.start();
|
||||
@@ -1,62 +0,0 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smartjimp from '../ts/index.js';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
|
||||
let testSmartJimp: smartjimp.SmartJimp;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp'});
|
||||
expect(testSmartJimp).toBeInstanceOf(smartjimp.SmartJimp);
|
||||
});
|
||||
|
||||
tap.test('should be able to create a master', async () => {
|
||||
const smartfileInstance = await smartfile.SmartFile.fromUrl('https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80')
|
||||
const convertedAsset = await testSmartJimp.getFromSmartfile(smartfileInstance, {width: 500});
|
||||
(await smartfile.SmartFile.fromBuffer('.nogit/result.avif', convertedAsset)).write();
|
||||
});
|
||||
|
||||
tap.test('should be able to use jimp', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'jimp'});
|
||||
const smartfileInstance = await smartfile.SmartFile.fromUrl('https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80')
|
||||
const convertedAsset = await testSmartJimp.computeAssetVariation(smartfileInstance.contentBuffer, {
|
||||
format: 'png',
|
||||
});
|
||||
(await smartfile.SmartFile.fromBuffer('.nogit/result2.png', convertedAsset)).write();
|
||||
})
|
||||
|
||||
tap.test('should create progressive JPEG with Sharp', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp'});
|
||||
const smartfileInstance = await smartfile.SmartFile.fromUrl('https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80')
|
||||
|
||||
// Create progressive JPEG
|
||||
const progressiveJpeg = await testSmartJimp.getFromSmartfile(smartfileInstance, {
|
||||
format: 'jpeg',
|
||||
progressive: true,
|
||||
width: 800
|
||||
});
|
||||
|
||||
expect(progressiveJpeg).toBeInstanceOf(Buffer);
|
||||
(await smartfile.SmartFile.fromBuffer('.nogit/progressive.jpg', progressiveJpeg)).write();
|
||||
})
|
||||
|
||||
tap.test('should convert PNG to progressive JPEG', async () => {
|
||||
const testSmartJimp = new smartjimp.SmartJimp({ mode: 'sharp'});
|
||||
|
||||
// First create a PNG
|
||||
const smartfileInstance = await smartfile.SmartFile.fromUrl('https://images.unsplash.com/photo-1673276628202-737bf3020ac2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3774&q=80')
|
||||
const pngBuffer = await testSmartJimp.computeAssetVariation(smartfileInstance.contentBuffer, {
|
||||
format: 'png',
|
||||
width: 500
|
||||
});
|
||||
|
||||
// Then convert it to progressive JPEG
|
||||
const progressiveJpeg = await testSmartJimp.computeAssetVariation(pngBuffer, {
|
||||
format: 'jpeg',
|
||||
progressive: true
|
||||
});
|
||||
|
||||
expect(progressiveJpeg).toBeInstanceOf(Buffer);
|
||||
(await smartfile.SmartFile.fromBuffer('.nogit/png-to-progressive.jpg', progressiveJpeg)).write();
|
||||
})
|
||||
|
||||
tap.start();
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartjimp',
|
||||
version: '1.0.18',
|
||||
description: 'a tool fr working with images in TypeScript'
|
||||
version: '1.2.1',
|
||||
description: 'A TypeScript library for image processing combining both sharp and jimp libraries.'
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export class SmartJimp {
|
||||
sourceTypeArg: 'streamfile' | 'smartfile',
|
||||
sourceIdArg: string,
|
||||
assetVariationArg?: IAssetVariation
|
||||
) {
|
||||
): string {
|
||||
return `${sourceTypeArg}_${sourceIdArg}_${
|
||||
assetVariationArg
|
||||
? `${assetVariationArg.width || 'auto'}x${assetVariationArg.height || 'auto'}`
|
||||
@@ -41,7 +41,7 @@ export class SmartJimp {
|
||||
}`;
|
||||
}
|
||||
|
||||
sharpMod: typeof pluginsTyped.sharpType.default;
|
||||
private sharpMod?: typeof pluginsTyped.sharpType.default;
|
||||
public async getSharpMod(): Promise<
|
||||
typeof pluginsTyped.sharpType.default
|
||||
> {
|
||||
@@ -51,7 +51,7 @@ export class SmartJimp {
|
||||
return this.sharpMod;
|
||||
}
|
||||
|
||||
jimpMod: typeof pluginsTyped.jimpType;
|
||||
private jimpMod?: typeof pluginsTyped.jimpType;
|
||||
public async getJimpMod(): Promise<typeof pluginsTyped.jimpType> {
|
||||
if (!this.jimpMod) {
|
||||
this.jimpMod = await import('jimp');
|
||||
@@ -59,12 +59,16 @@ export class SmartJimp {
|
||||
return this.jimpMod;
|
||||
}
|
||||
|
||||
public async computeAssetVariation(assetBufferArg: Buffer, assetVariationArg: IAssetVariation) {
|
||||
if (this.options.mode === 'sharp') {
|
||||
const sharp = await this.getSharpMod();
|
||||
public async computeAssetVariation(
|
||||
assetBufferArg: Buffer,
|
||||
assetVariationArg?: IAssetVariation
|
||||
): Promise<Buffer> {
|
||||
if (!assetVariationArg) {
|
||||
return assetBufferArg;
|
||||
}
|
||||
|
||||
if (this.options.mode === 'sharp') {
|
||||
const sharp = await this.getSharpMod();
|
||||
let sharpImage = sharp(assetBufferArg);
|
||||
sharpImage = sharpImage.resize(assetVariationArg.width, assetVariationArg.height);
|
||||
const resultResize = sharpImage.resize(assetVariationArg.width, assetVariationArg.height);
|
||||
@@ -73,29 +77,29 @@ export class SmartJimp {
|
||||
}
|
||||
switch (assetVariationArg.format) {
|
||||
case 'avif':
|
||||
const avifOptions: any = {};
|
||||
const avifOptions: pluginsTyped.sharpType.AvifOptions = {};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
avifOptions.quality = assetVariationArg.quality;
|
||||
}
|
||||
sharpImage = resultResize.avif(avifOptions);
|
||||
break;
|
||||
case 'webp':
|
||||
const webpOptions: any = {};
|
||||
const webpOptions: pluginsTyped.sharpType.WebpOptions = {};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
webpOptions.quality = assetVariationArg.quality;
|
||||
}
|
||||
sharpImage = resultResize.webp(webpOptions);
|
||||
break;
|
||||
case 'png':
|
||||
const pngOptions: any = {};
|
||||
const pngOptions: pluginsTyped.sharpType.PngOptions = {};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
pngOptions.quality = assetVariationArg.quality;
|
||||
}
|
||||
sharpImage = resultResize.png(pngOptions);
|
||||
break;
|
||||
case 'jpeg':
|
||||
const jpegOptions: any = {
|
||||
progressive: assetVariationArg.progressive || false
|
||||
const jpegOptions: pluginsTyped.sharpType.JpegOptions = {
|
||||
progressive: assetVariationArg.progressive || false,
|
||||
};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
jpegOptions.quality = assetVariationArg.quality;
|
||||
@@ -104,8 +108,8 @@ export class SmartJimp {
|
||||
break;
|
||||
default:
|
||||
// Default to JPEG
|
||||
const defaultJpegOptions: any = {
|
||||
progressive: assetVariationArg.progressive || false
|
||||
const defaultJpegOptions: pluginsTyped.sharpType.JpegOptions = {
|
||||
progressive: assetVariationArg.progressive || false,
|
||||
};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
defaultJpegOptions.quality = assetVariationArg.quality;
|
||||
@@ -117,24 +121,27 @@ export class SmartJimp {
|
||||
const jimpMod = await this.getJimpMod();
|
||||
let jimpImage = await jimpMod.Jimp.read(assetBufferArg);
|
||||
if (assetVariationArg.width || assetVariationArg.height) {
|
||||
const resizeOptions: any = {};
|
||||
if (assetVariationArg.width) resizeOptions.w = assetVariationArg.width;
|
||||
if (assetVariationArg.height) resizeOptions.h = assetVariationArg.height;
|
||||
jimpImage.resize(resizeOptions);
|
||||
if (assetVariationArg.width && assetVariationArg.height) {
|
||||
jimpImage.resize({ w: assetVariationArg.width, h: assetVariationArg.height });
|
||||
} else if (assetVariationArg.width) {
|
||||
jimpImage.resize({ w: assetVariationArg.width });
|
||||
} else if (assetVariationArg.height) {
|
||||
jimpImage.resize({ h: assetVariationArg.height });
|
||||
}
|
||||
}
|
||||
if (assetVariationArg.invert) {
|
||||
jimpImage.invert();
|
||||
}
|
||||
// Note: Jimp does not support progressive JPEG encoding
|
||||
// Progressive option is ignored in jimp mode
|
||||
const jpegOptions: any = {};
|
||||
const jpegOptions: { quality?: number } = {};
|
||||
if (assetVariationArg.quality !== undefined) {
|
||||
jpegOptions.quality = assetVariationArg.quality;
|
||||
}
|
||||
|
||||
switch (assetVariationArg.format) {
|
||||
case 'png':
|
||||
return await jimpImage.getBuffer("image/png");
|
||||
return await jimpImage.getBuffer('image/png');
|
||||
case 'webp':
|
||||
case 'avif':
|
||||
console.log(`Jimp doesn't support ${assetVariationArg.format}, falling back to JPEG`);
|
||||
@@ -142,9 +149,11 @@ export class SmartJimp {
|
||||
case 'jpeg':
|
||||
default:
|
||||
// Default to JPEG
|
||||
return await jimpImage.getBuffer("image/jpeg", jpegOptions);
|
||||
return await jimpImage.getBuffer('image/jpeg', jpegOptions);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error(`Unsupported smartjimp mode: ${this.options.mode}`);
|
||||
}
|
||||
|
||||
public async getFromSmartfile(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
export const packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
|
||||
export const nogitDir = plugins.path.join(packageDir, '.nogit/')
|
||||
export const nogitDir = plugins.path.join(packageDir, '.nogit/');
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noImplicitAny": true,
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
"verbatimModuleSyntax": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
"exclude": ["dist_*/**/*.d.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user