Skip to content

Commit

Permalink
chore: moves generated files to the 'dist' directory, and adds it to …
Browse files Browse the repository at this point in the history
…the .gitignore file
  • Loading branch information
bilthon committed Nov 14, 2024
1 parent d6718c2 commit 7540d8a
Show file tree
Hide file tree
Showing 7 changed files with 603 additions and 575 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.env
admin.macaroon
tls.cert
tls.cert
dist/
2 changes: 1 addition & 1 deletion bot/validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ const isBannedFromCommunity = async (user: UserDocument, communityId: string) =>
}
};

module.exports = {
export {
validateSellOrder,
validateBuyOrder,
validateUser,
Expand Down
1,129 changes: 566 additions & 563 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "0.11.1",
"author": "Francisco Calderón <[email protected]>",
"description": "P2P lightning network telegram bot",
"main": "app.js",
"main": "dist/app.js",
"scripts": {
"prestart": "npx tsc",
"start": "node ./app",
"start": "node ./dist/app",
"predev": "npx tsc",
"dev": "nodemon ./app",
"dev": "nodemon ./dist/app",
"lint": "eslint .",
"format": "prettier --write '**/*.js'",
"pretest": "npx tsc",
"test": "export NODE_ENV=test && mocha --exit tests/**/*.spec.js"
"format": "prettier --write '**/*.{js,ts}'",
"pretest": "tsc -p tsconfig.test.json",
"test": "export NODE_ENV=test && mocha --exit 'dist/tests/**/*.spec.js'"
},
"license": "MIT",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion tests/bot/bot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('Telegram bot', () => {
flags += flag.length;
});
let langs = 0;
fs.readdirSync(path.join(__dirname, '../../locales')).forEach(file => {
fs.readdirSync(path.join(__dirname, '../../../locales')).forEach(file => {
langs++;
});
expect(flags).to.be.equal(langs);
Expand Down
21 changes: 18 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
{
"compilerOptions": {
"strict": true,
"strict": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"downlevelIteration": true
}
"downlevelIteration": true,
"outDir": "./dist",
"rootDir": ".",
"allowJs": true,
"moduleResolution": "node"
},
"include": [
"app.ts",
"bot/**/*",
"jobs/**/*",
"ln/**/*",
"lnurl/**/*",
"models/**/*",
"util/**/*",
"locales/**/*",
],
"exclude": ["node_modules", "dist", "tests", "locales"]
}
9 changes: 9 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"include": [
"tests/**/*"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 7540d8a

Please sign in to comment.