From fc3d09a2b4cc6a5809e6f422be74d6efd0782acc Mon Sep 17 00:00:00 2001 From: "S.long" Date: Fri, 28 Aug 2020 16:05:36 +0700 Subject: [PATCH] modify ignre --- .gitignore | 2 -- dist/index.d.ts | 2 ++ dist/index.js | 10 ++++++++++ dist/sample.d.ts | 2 ++ dist/sample.js | 12 ++++++++++++ dist/sample2.d.ts | 2 ++ dist/sample2.js | 12 ++++++++++++ package.json | 2 ++ 8 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/sample.d.ts create mode 100644 dist/sample.js create mode 100644 dist/sample2.d.ts create mode 100644 dist/sample2.js diff --git a/.gitignore b/.gitignore index f210151..0853d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,6 @@ # Node Modules **/node_modules -# Built -dist # Error File yarn-error.log diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..e608b37 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,2 @@ +export { default as power } from "./sample"; +export { default as sqrt } from "./sample2"; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..1e35e9b --- /dev/null +++ b/dist/index.js @@ -0,0 +1,10 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sqrt = exports.power = void 0; +var sample_1 = require("./sample"); +Object.defineProperty(exports, "power", { enumerable: true, get: function () { return __importDefault(sample_1).default; } }); +var sample2_1 = require("./sample2"); +Object.defineProperty(exports, "sqrt", { enumerable: true, get: function () { return __importDefault(sample2_1).default; } }); diff --git a/dist/sample.d.ts b/dist/sample.d.ts new file mode 100644 index 0000000..963341c --- /dev/null +++ b/dist/sample.d.ts @@ -0,0 +1,2 @@ +declare const power: (n?: number | undefined) => number | undefined; +export default power; diff --git a/dist/sample.js b/dist/sample.js new file mode 100644 index 0000000..b42ee12 --- /dev/null +++ b/dist/sample.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var power = function (n) { + if (typeof n === "undefined" || n === null) { + return undefined; + } + if (typeof n !== "number") { + return undefined; + } + return Math.pow(n, 2); +}; +exports.default = power; diff --git a/dist/sample2.d.ts b/dist/sample2.d.ts new file mode 100644 index 0000000..89893ee --- /dev/null +++ b/dist/sample2.d.ts @@ -0,0 +1,2 @@ +declare const sqrt: (n: number) => number | undefined; +export default sqrt; diff --git a/dist/sample2.js b/dist/sample2.js new file mode 100644 index 0000000..8e40986 --- /dev/null +++ b/dist/sample2.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var sqrt = function (n) { + if (typeof n === "undefined" || n === null) { + return undefined; + } + if (typeof n !== "number") { + return undefined; + } + return Math.sqrt(n); +}; +exports.default = sqrt; diff --git a/package.json b/package.json index 45feddf..bca38fb 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "build": "tsc", "test": "jest", "build:test": "yarn jest && yarn build", + "publish": "yarn build:test && npm publish --registry https://npm.osa.cubetiqs.com", + "run:example": "cd example && yarn start" }, "devDependencies": {