Deplacement de l'index de la racine vers le source

This commit is contained in:
Amaury 2021-04-18 16:16:15 +02:00
parent 37744733b4
commit b2f34a6b01
6 changed files with 14 additions and 13 deletions

View File

@ -1,2 +0,0 @@
export { ListenerRss } from "./src/listener-rss";
export { ListenerRSSInfos } from "./src/Models/ListenerRSSInfos";

View File

@ -2,7 +2,8 @@
"name": "listener-rss",
"version": "1.0.0",
"description": "A lightweight library to give some additions for the [rss-parser package](https://github.com/rbren/rss-parser).",
"main": "index.js",
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"test": "cross-env TS_NODE_PROJECT='./tests/tsconfig.json' mocha --require ts-node/register ./tests/**/*-spec.ts",
"build": "tsc -p ./src"

2
src/index.ts Normal file
View File

@ -0,0 +1,2 @@
export { ListenerRss } from "./listener-rss";
export { ListenerRSSInfos } from "./Models/ListenerRSSInfos";

View File

@ -67,9 +67,9 @@ export class ListenerRss extends EventEmitter {
*/
start(): void {
this.loopRunning = true;
const fun: () => void = async () => {
await Promise.resolve(
await Promise.resolve(
await this.fetchRSS()
.then((obj: { [key: string]: any }) => {
this.emit("update", obj);

View File

@ -2,9 +2,5 @@
"extends": "../tsconfig.base.json",
"compilerOptions": {
"moduleResolution": "node"
},
"exclude": [
"build/",
"node_modules"
]
}
}

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es2018",
"module": "es2015",
"module": "CommonJS",
"lib": ["es6"],
"allowJs": true,
"outDir": "build",
@ -12,10 +12,14 @@
"esModuleInterop": true,
"resolveJsonModule": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"declaration": true
},
"include": [
"src"
],
"exclude": [
"build/",
"node_modules"
"node_modules/"
]
}