now has package typings
This commit is contained in:
parent
cc5f57da44
commit
3d5aa9fda7
14
dist/index.d.ts
vendored
Normal file
14
dist/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
import SmartpathCheck = require("./smartpath.check");
|
||||
import SmartpathGet = require("./smartpath.get");
|
||||
import SmartpathTransform = require("./smartpath.transform");
|
||||
/**
|
||||
*
|
||||
* @type {{getPath: (function(any): undefined)}}
|
||||
*/
|
||||
declare let smartpath: {
|
||||
check: typeof SmartpathCheck;
|
||||
get: typeof SmartpathGet;
|
||||
transform: typeof SmartpathTransform;
|
||||
};
|
||||
export = smartpath;
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -13,4 +13,4 @@ var smartpath = {
|
||||
};
|
||||
module.exports = smartpath;
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxJQUFPLGNBQWMsV0FBVyxtQkFBbUIsQ0FBQyxDQUFDO0FBQ3JELElBQU8sWUFBWSxXQUFXLGlCQUFpQixDQUFDLENBQUM7QUFDakQsSUFBTyxrQkFBa0IsV0FBVyx1QkFBdUIsQ0FBQyxDQUFDO0FBRTdEOzs7R0FHRztBQUNILElBQUksU0FBUyxHQUFHO0lBQ1osS0FBSyxFQUFFLGNBQWM7SUFDckIsR0FBRyxFQUFFLFlBQVk7SUFDakIsU0FBUyxFQUFFLGtCQUFrQjtDQUNoQyxDQUFDO0FBR0YsaUJBQVMsU0FBUyxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cInR5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLnBsdWdpbnNcIik7XG5pbXBvcnQgU21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zXCIgLz5cbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLnBsdWdpbnNcIik7XG5pbXBvcnQgU21hcnRwYXRoQ2hlY2sgPSByZXF1aXJlKFwiLi9zbWFydHBhdGguY2hlY2tcIik7XG5pbXBvcnQgU21hcnRwYXRoR2V0ID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLmdldFwiKTtcbmltcG9ydCBTbWFydHBhdGhUcmFuc2Zvcm0gPSByZXF1aXJlKFwiLi9zbWFydHBhdGgudHJhbnNmb3JtXCIpO1xuXG4vKipcbiAqXG4gKiBAdHlwZSB7e2dldFBhdGg6IChmdW5jdGlvbihhbnkpOiB1bmRlZmluZWQpfX1cbiAqL1xubGV0IHNtYXJ0cGF0aCA9IHtcbiAgICBjaGVjazogU21hcnRwYXRoQ2hlY2ssXG4gICAgZ2V0OiBTbWFydHBhdGhHZXQsXG4gICAgdHJhbnNmb3JtOiBTbWFydHBhdGhUcmFuc2Zvcm1cbn07XG5cblxuZXhwb3J0ID0gc21hcnRwYXRoO1xuIl19
|
||||
|
2
dist/smartpath.check.d.ts
vendored
Normal file
2
dist/smartpath.check.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare let isDir: (pathArg: string) => boolean;
|
||||
export declare let isFile: (pathArg: any) => boolean;
|
2
dist/smartpath.check.js
vendored
2
dist/smartpath.check.js
vendored
@ -6,4 +6,4 @@ exports.isFile = function (pathArg) {
|
||||
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRVcsYUFBSyxHQUFHLFVBQVMsT0FBYztJQUN0QyxNQUFNLENBQUMsQ0FBQyxjQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDNUIsQ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gPSByZXF1aXJlKFwiLi9zbWFydHBhdGgucGx1Z2luc1wiKTtcblxuZXhwb3J0IGxldCBpc0RpciA9IGZ1bmN0aW9uKHBhdGhBcmc6c3RyaW5nKXtcbiAgICByZXR1cm4gIWlzRmlsZShwYXRoQXJnKTtcbn1cblxuZXhwb3J0IGxldCBpc0ZpbGUgPSBmdW5jdGlvbihwYXRoQXJnKXtcbiAgICByZXR1cm4gL1xcLlthLXpBLVpdKiQvLnRlc3QocGF0aEFyZyk7IC8vIGNoZWNrcyBpZiB0aGVyZSBpcyBhIC5hbnl0aGluZyBhdCB0aGUgZW5kXG59Il19
|
||||
|
6
dist/smartpath.get.d.ts
vendored
Normal file
6
dist/smartpath.get.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
/**
|
||||
* returns the type of the given path. Can be "url" or "local"
|
||||
*/
|
||||
export declare let type: (pathStringArg: string) => string;
|
||||
export declare let home: (pathArgument?: string) => any;
|
2
dist/smartpath.get.js
vendored
2
dist/smartpath.get.js
vendored
@ -23,4 +23,4 @@ exports.home = function (pathArgument) {
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5nZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBDQUEwQztBQUMxQyxJQUFPLE9BQU8sV0FBVyxxQkFBcUIsQ0FBQyxDQUFDO0FBRWhEOztHQUVHO0FBQ1EsWUFBSSxHQUFHLFVBQVMsYUFBb0I7SUFDM0MsSUFBSSxRQUFRLEdBQUcsb0JBQW9CLENBQUE7SUFDbkMsRUFBRSxDQUFBLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFBLENBQUM7UUFDN0IsTUFBTSxDQUFDLEtBQUssQ0FBQztJQUNqQixDQUFDO0lBQUMsSUFBSSxDQUFDL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250ZW50IjpbIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCJ0eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3NtYXJ0cGF0aC5wbHVnaW5zXCIpO1xuXG4vKipcbiAqIHJldHVybnMgdGhlIHR5cGUgb2YgdGhlIGdpdmVuIHBhdGguIENhbiBiZSBcInVybFwiIG9yIFwibG9jYWxcIlxuICovXG5leHBvcnQgbGV0IHR5cGUgPSBmdW5jdGlvbihwYXRoU3RyaW5nQXJnOnN0cmluZyk6c3RyaW5nIHtcbiAgICBsZXQgdXJsUmVnZXggPSAvaHR0cFtzfFxcc106XFwvXFwvLiovaVxuICAgIGlmKHVybFJlZ2V4LmV4ZWMocGF0aFN0cmluZ0FyZykpe1xuICAgICAgICByZXR1cm4gXCJ1cmxcIjtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gXCJsb2NhbFwiO1xuICAgIH07XG59O1xuXG5leHBvcnQgbGV0IGhvbWUgPSBmdW5jdGlvbihwYXRoQXJndW1lbnQ/OnN0cmluZyl7XG4gICAgaWYocGF0aEFyZ3VtZW50KXtcbiAgICAgICAgcmV0dXJuIHBsdWdpbnMuaG9tZS5yZXNvbHZlKHBhdGhBcmd1bWVudCk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIHBsdWdpbnMuaG9tZSgpO1xuICAgIH1cbn07Il19
|
||||
|
4
dist/smartpath.plugins.d.ts
vendored
Normal file
4
dist/smartpath.plugins.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
export declare var beautylog: any;
|
||||
export declare var home: any;
|
||||
export declare var path: any;
|
2
dist/smartpath.plugins.js
vendored
2
dist/smartpath.plugins.js
vendored
@ -4,4 +4,4 @@ exports.beautylog = require("beautylog");
|
||||
exports.home = require("home");
|
||||
exports.path = require("path");
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,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iAvPlxuZXhwb3J0IHZhciBiZWF1dHlsb2cgPSByZXF1aXJlIChcImJlYXV0eWxvZ1wiKTtcbmV4cG9ydCB2YXIgaG9tZSA9IHJlcXVpcmUoXCJob21lXCIpO1xuZXhwb3J0IHZhciBwYXRoID0gcmVxdWlyZShcInBhdGhcIik7XG5cbiJdfQ==
|
||||
|
2
dist/smartpath.transform.d.ts
vendored
Normal file
2
dist/smartpath.transform.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
export declare let toAbsolute: (relativeArg: any, baseArg?: string) => any;
|
2
dist/smartpath.transform.js
vendored
2
dist/smartpath.transform.js
vendored
@ -37,4 +37,4 @@ exports.toAbsolute = function (relativeArg, baseArg) {
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC50cmFuc2Zvcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBDQUEwQztBQUMxQyxJQUFPLE9BQU8sV0FBVyxxQkFBcUIsQ0FBQyxDQUFDO0FBRWhEOztnREFFZ0Q7QUFDaEQsSUFBSSxZQUFZLEdBQUcsVUFBUyxZQUFtQixFQUFFLE9BQWU7SUFDNUQsSUFBSSxZQUFtQixDQUFDO0lBQ3hCLEVBQUUsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxDQUFBLENBQUM7UUFDUixZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFDLFlBQVksQ0FBQyxDQUFDO0lBQzNELENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNILFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQztJQUN2RCxDQUFDO0lBQ0QsTUFBTSxDQUFDLFlBQVksQ0FBQztBQUN4QixDQUFDL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YnNvbHV0ZSA9IGZ1bmN0aW9uKHJlbGF0aXZlQXJnOmFueSwgYmFzZUFyZz86c3RyaW5nKTphbnkge1xuICAgIGlmKHR5cGVvZiByZWxhdGl2ZUFyZyA9PT0gXCJzdHJpbmdcIil7XG4gICAgICAgIHJldHVybiBtYWtlQWJzb2x1dGUocmVsYXRpdmVBcmcsYmFzZUFyZyk7XG4gICAgfSBlbHNlIGlmKEFycmF5LmlzQXJyYXkocmVsYXRpdmVBcmcpKXtcbiAgICAgICAgbGV0IHJlbGF0aXZlQXJyYXkgPSByZWxhdGl2ZUFyZ1xuICAgICAgICBsZXQgYWJzb2x1dGVBcnJheTpzdHJpbmdbXSA9IFtdO1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gcmVsYXRpdmVBcnJheSl7XG4gICAgICAgICAgICBhYnNvbHV0ZUFycmF5LnB1c2gobWFrZUFic29sdXRlKHJlbGF0aXZlQXJyYXlba2V5XSxiYXNlQXJnKSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBhYnNvbHV0ZUFycmF5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLmVycm9yKFwic21hcnRwYXRoLmFic29sdXRlKCkgY291bGQgbm90IG1ha2Ugc2Vuc2Ugb2YgdGhlIGlucHV0LiBcIiArXG4gICAgICAgICAgICBcIklucHV0IGlzIG5laXRoZXIgU3RyaW5nIG5vciBBcnJheVwiKTtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbn07Il19
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "3.1.5",
|
||||
"description": "offers smart ways to handle paths",
|
||||
"main": "dist/index.js",
|
||||
"typings":"dist/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
},
|
||||
@ -26,7 +27,7 @@
|
||||
"home": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"npmts": "^5.0.4",
|
||||
"npmts": "^5.1.0",
|
||||
"should": "^8.3.1"
|
||||
}
|
||||
}
|
||||
|
3
test/test.d.ts
vendored
Normal file
3
test/test.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference path="../ts/typings/main.d.ts" />
|
||||
declare let should: any;
|
||||
declare let smartpath: any;
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user