Skip to content

Commit

Permalink
config(ts): add emitDecoratorMetadata option to true
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Dec 17, 2023
1 parent 0004def commit 2ddf08e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/tsconfig",
"version": "4.11.0",
"version": "4.12.0",
"description": "Exports the base TypeScript configuration for Athena applications and packages.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
15 changes: 7 additions & 8 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@
* file that was distributed with this source code.
*/


import { tsc } from './tsc.js'
import { rimraf } from 'rimraf'
import { copyfiles } from './copyfiles.js'
import { META_FILES, TS_CONFIG_PATH, BUILD_FOLDER_NAME } from './constants.js'
import { tsc } from "./tsc.js";
import { rimraf } from "rimraf";
import { copyfiles } from "./copyfiles.js";
import { META_FILES, TS_CONFIG_PATH, BUILD_FOLDER_NAME } from "./constants.js";

/**
* Delete old `BUILD_FOLDER_NAME` folder.
*/
await rimraf(BUILD_FOLDER_NAME)
await rimraf(BUILD_FOLDER_NAME);

/**
* Compile the application using tsc.
*/
await tsc(TS_CONFIG_PATH)
await tsc(TS_CONFIG_PATH);

/**
* Copy `META_FILES` to `BUILD_FOLDER_NAME` folder.
*/
await copyfiles(META_FILES, BUILD_FOLDER_NAME)
await copyfiles(META_FILES, BUILD_FOLDER_NAME);
31 changes: 21 additions & 10 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
/**
* @athenna/tsconfig
*
* (c) João Lenon <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/**
*
* Files that will be copied to the `BUILD_FOLDER_NAME` folder.
*/
export const META_FILES = [
'templates/**/*',
'configurer/**/*',
'resources/**/*',
'package.json',
'package-lock.json',
'LICENSE.md',
'README.md'
]
"templates/**/*",
"configurer/**/*",
"resources/**/*",
"package.json",
"package-lock.json",
"LICENSE.md",
"README.md",
];

/**
* Path to tsconfig file that will be used by `tsc` compiler.
*/
export const TS_CONFIG_PATH = 'node_modules/@athenna/tsconfig/tsconfig.lib-build.json'
export const TS_CONFIG_PATH =
"node_modules/@athenna/tsconfig/tsconfig.lib-build.json";

/**
* Build folder name that files will be copied to.
*/
export const BUILD_FOLDER_NAME = 'build'
export const BUILD_FOLDER_NAME = "build";
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"esModuleInterop": true,
"removeComments": false,
"resolveJsonModule": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"useDefineForClassFields": false,
"verbatimModuleSyntax": true,
Expand Down

0 comments on commit 2ddf08e

Please sign in to comment.