From 4d48e06fa75ebd6c600f40f7db6a0d0296a5b8a1 Mon Sep 17 00:00:00 2001 From: Ryuu Mitsuki Date: Sun, 21 Apr 2024 17:44:00 +0700 Subject: [PATCH] refactor(build): Include `lsTypes` module to minify list Added the `lsTypes` module to be minified after get transpiled from TypeScript. Other changes is unrelated changes. --- build.prop.js | 11 ++++++----- scripts/build.ts | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.prop.js b/build.prop.js index 229f797..0cdb1d1 100644 --- a/build.prop.js +++ b/build.prop.js @@ -1,13 +1,14 @@ -const { resolve } = require('node:path'); +const { join } = require('node:path'); /** @type {import('./types/build.prop').BuildPropConfig} */ module.exports = { minify: { files: [ 'dist/index.js', - 'dist/lsfnd.js' + 'dist/lsfnd.js', + 'dist/lsTypes.js' ] }, - rootDir: resolve(__dirname), - outDir: resolve('dist'), - tsconfig: 'tsconfig.production.json', + rootDir: __dirname, + outDir: join(__dirname, 'dist'), + tsconfig: 'tsconfig.production.json' }; \ No newline at end of file diff --git a/scripts/build.ts b/scripts/build.ts index b50097c..ba641f6 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -17,8 +17,7 @@ * npx ts-node scripts/build.ts [-ow|--overwrite] [-m|--minify] * ``` * - * Copyright (c) 2024 Ryuu Mitsuki. - * Licensed under the MIT license. + * Copyright (c) 2024 Ryuu Mitsuki. All rights reserved. * * @module scripts/build * @author Ryuu Mitsuki (https://github.com/mitsuki31) @@ -62,6 +61,7 @@ const legalComments: string = ` * Copyright (c) ${new Date().getFullYear()} Ryuu Mitsuki. All rights reserved. * @author Ryuu Mitsuki (https://github.com/mitsuki31) * @license ${pkg.license} + * @see [Homepage](${pkg.homepage}) * @see [Source code](${pkg.repository.url.replace(/^git\+/, '')}) */ `.trimStart();