modify ignre

This commit is contained in:
S.long 2020-08-28 16:05:36 +07:00
parent b2f46fff97
commit fc3d09a2b4
8 changed files with 42 additions and 2 deletions

2
.gitignore vendored
View File

@ -8,8 +8,6 @@
# Node Modules # Node Modules
**/node_modules **/node_modules
# Built
dist
# Error File # Error File
yarn-error.log yarn-error.log

2
dist/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
export { default as power } from "./sample";
export { default as sqrt } from "./sample2";

10
dist/index.js vendored Normal file
View File

@ -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; } });

2
dist/sample.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare const power: (n?: number | undefined) => number | undefined;
export default power;

12
dist/sample.js vendored Normal file
View File

@ -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;

2
dist/sample2.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
declare const sqrt: (n: number) => number | undefined;
export default sqrt;

12
dist/sample2.js vendored Normal file
View File

@ -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;

View File

@ -16,6 +16,8 @@
"build": "tsc", "build": "tsc",
"test": "jest", "test": "jest",
"build:test": "yarn jest && yarn build", "build:test": "yarn jest && yarn build",
"publish": "yarn build:test && npm publish --registry https://npm.osa.cubetiqs.com",
"run:example": "cd example && yarn start" "run:example": "cd example && yarn start"
}, },
"devDependencies": { "devDependencies": {