Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
f03b3df55b | |||
ca387124ee | |||
027b3fe9ad | |||
1b4681c065 | |||
96168fd870 | |||
e81c37e60a | |||
87454d41da | |||
97ae2d87b1 |
@ -123,9 +123,9 @@ trigger:
|
|||||||
pages:
|
pages:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command tsdoc
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
|
22
license
Normal file
22
license
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Lossless GmbH
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
1287
package-lock.json
generated
1287
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartpath",
|
"name": "@pushrocks/smartpath",
|
||||||
"version": "5.0.2",
|
"version": "5.0.6",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "offers smart ways to handle paths",
|
"description": "offers smart ways to handle paths",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -26,9 +26,9 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/smartpath",
|
"homepage": "https://github.com/pushrocks/smartpath",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.48",
|
"@gitzone/tsbuild": "^2.1.56",
|
||||||
"@gitzone/tsrun": "^1.2.31",
|
"@gitzone/tsrun": "^1.2.31",
|
||||||
"@gitzone/tstest": "^1.0.67",
|
"@gitzone/tstest": "^1.0.69",
|
||||||
"@pushrocks/tapbundle": "^5.0.2",
|
"@pushrocks/tapbundle": "^5.0.2",
|
||||||
"@types/node": "^17.0.21"
|
"@types/node": "^17.0.21"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './smartpath.plugins.js'
|
import * as plugins from './smartpath.plugins.js';
|
||||||
export type TPathType = 'url' | 'local';
|
export type TPathType = 'url' | 'local';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,9 +16,9 @@ export const type = (pathStringArg: string): TPathType => {
|
|||||||
/**
|
/**
|
||||||
* gets the dirname from import.meta.url
|
* gets the dirname from import.meta.url
|
||||||
*/
|
*/
|
||||||
export const getDirnameFromImportMetaUrl = (importMetaUrlArg: string) => {
|
export const dirnameFromImportMetaUrl = (importMetaUrlArg: string) => {
|
||||||
return plugins.path.dirname(plugins.url.fileURLToPath(importMetaUrlArg));
|
return plugins.path.dirname(plugins.url.fileURLToPath(importMetaUrlArg));
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns homedir as absolute path
|
* returns homedir as absolute path
|
||||||
|
@ -5,7 +5,7 @@ import * as plugins from './smartpath.plugins.js';
|
|||||||
* ------------------------------------------ */
|
* ------------------------------------------ */
|
||||||
|
|
||||||
// checks a file
|
// checks a file
|
||||||
let makeAbsolute = function (localPathArg: string, baseArg?: string): string {
|
export const makeAbsolute = (localPathArg: string, baseArg?: string): string => {
|
||||||
let absolutePath: string;
|
let absolutePath: string;
|
||||||
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg);
|
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg);
|
||||||
if (baseArg && !alreadyAbsolute) {
|
if (baseArg && !alreadyAbsolute) {
|
||||||
@ -21,7 +21,7 @@ let makeAbsolute = function (localPathArg: string, baseArg?: string): string {
|
|||||||
/* ------------------------------------------ *
|
/* ------------------------------------------ *
|
||||||
* ------- export functions ----------------- *
|
* ------- export functions ----------------- *
|
||||||
* ------------------------------------------ */
|
* ------------------------------------------ */
|
||||||
export let toAbsolute = function (relativeArg: string | string[], baseArg?: string): any {
|
export const toAbsolute = (relativeArg: string | string[], baseArg?: string): string | string[] => {
|
||||||
if (typeof relativeArg === 'string') {
|
if (typeof relativeArg === 'string') {
|
||||||
return makeAbsolute(relativeArg, baseArg);
|
return makeAbsolute(relativeArg, baseArg);
|
||||||
} else if (Array.isArray(relativeArg)) {
|
} else if (Array.isArray(relativeArg)) {
|
||||||
@ -36,6 +36,6 @@ export let toAbsolute = function (relativeArg: string | string[], baseArg?: stri
|
|||||||
'smartpath.absolute() could not make sense of the input. ' +
|
'smartpath.absolute() could not make sense of the input. ' +
|
||||||
'Input is neither String nor Array'
|
'Input is neither String nor Array'
|
||||||
);
|
);
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
17
tslint.json
Normal file
17
tslint.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
|
"rules": {
|
||||||
|
"semicolon": [true, "always"],
|
||||||
|
"no-console": false,
|
||||||
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
|
}
|
Reference in New Issue
Block a user