Skip to content

Commit

Permalink
Fixed npm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itsrn authored Aug 25, 2023
2 parents cb9f7e1 + 4b661e6 commit 9f148c6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ node_modules/
yarn.lock
.yarn/
.pnp.loader.mjs
.npmignore
.npmrc
lib/
build/
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.gitignore
tests/
src/
.yarn/
.github/
yarn.lock
.npmrc
.gitignore
.mocharc.json
tsconfig.json
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "hidabroot",
"version": "0.6.3-beta",
"version": "0.6.4-beta",
"description": "An unofficial API for hidabroot",
"main": "./lib/index.js",
"types": "lib/index.d.ts",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"scripts": {
"test": "mocha ./test/allTests.test.ts",
"build": "tsc",
Expand Down
6 changes: 3 additions & 3 deletions test/allTests.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe } from "mocha";
import { expect } from "chai";
import { todayNews, getArticle } from "../lib/index";
import { todayNews, getArticle } from "../build/index";

describe("todayNews function", () => {
it("should return the json object of today news", async () => {
Expand All @@ -16,9 +16,9 @@ describe("getArticle function", () => {
expect(result).to.be.a("string");
});

it('should return null (because article doesnt exist)', async () => {
it("should return null (because article doesnt exist)", async () => {
const notExistArticleID = 3247328947239478923;
const result = await getArticle(notExistArticleID);
expect(result).to.equal(null);
})
});
});
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"module": "commonjs",
"noImplicitReturns": true,
"esModuleInterop": true,
"outDir": "lib",
"outDir": "build",
"sourceMap": true,
"target": "es5",
"declaration": true,
"types": ["node"]
"types": ["mocha", "node"]
},
"compileOnSave": true,
"include": ["src"]
Expand Down

0 comments on commit 9f148c6

Please sign in to comment.