Compare commits

...

12 Commits

Author SHA1 Message Date
f03b3df55b 5.0.6 2022-03-17 16:19:23 +01:00
ca387124ee fix(core): update 2022-03-17 16:19:22 +01:00
027b3fe9ad 5.0.5 2022-03-16 11:35:25 +01:00
1b4681c065 fix(core): update 2022-03-16 11:35:25 +01:00
96168fd870 5.0.4 2022-03-14 15:24:17 +01:00
e81c37e60a fix(core): update 2022-03-14 15:24:16 +01:00
87454d41da 5.0.3 2022-03-14 15:15:23 +01:00
97ae2d87b1 fix(core): update 2022-03-14 15:15:23 +01:00
e23624a93f 5.0.2 2022-03-14 13:39:01 +01:00
7183fcc00a fix(core): update 2022-03-14 13:39:01 +01:00
9fad6100f0 5.0.1 2022-03-14 13:38:32 +01:00
d0e3065d12 fix(core): update 2022-03-14 13:38:32 +01:00
7 changed files with 914 additions and 416 deletions

View File

@ -123,9 +123,9 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci node install stable
- npmci npm prepare
- npmci command npm install -g @gitzone/tsdoc
- npmci npm install
- npmci command tsdoc
tags:

View File

1287
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartpath",
"version": "5.0.0",
"version": "5.0.6",
"private": false,
"description": "offers smart ways to handle paths",
"main": "dist_ts/index.js",
@ -26,9 +26,9 @@
},
"homepage": "https://github.com/pushrocks/smartpath",
"devDependencies": {
"@gitzone/tsbuild": "^2.1.48",
"@gitzone/tsbuild": "^2.1.56",
"@gitzone/tsrun": "^1.2.31",
"@gitzone/tstest": "^1.0.67",
"@gitzone/tstest": "^1.0.69",
"@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^17.0.21"
},

View File

@ -1,4 +1,4 @@
import * as plugins from './smartpath.plugins.js'
import * as plugins from './smartpath.plugins.js';
export type TPathType = 'url' | 'local';
/**
@ -16,9 +16,9 @@ export const type = (pathStringArg: string): TPathType => {
/**
* gets the dirname from import.meta.url
*/
export const getDirnameFromImportMetaUrl = () => {
}
export const dirnameFromImportMetaUrl = (importMetaUrlArg: string) => {
return plugins.path.dirname(plugins.url.fileURLToPath(importMetaUrlArg));
};
/**
* returns homedir as absolute path

View File

@ -5,7 +5,7 @@ import * as plugins from './smartpath.plugins.js';
* ------------------------------------------ */
// checks a file
let makeAbsolute = function (localPathArg: string, baseArg?: string): string {
export const makeAbsolute = (localPathArg: string, baseArg?: string): string => {
let absolutePath: string;
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg);
if (baseArg && !alreadyAbsolute) {
@ -21,7 +21,7 @@ let makeAbsolute = function (localPathArg: string, baseArg?: string): string {
/* ------------------------------------------ *
* ------- 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') {
return makeAbsolute(relativeArg, baseArg);
} 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. ' +
'Input is neither String nor Array'
);
return false;
return null;
}
};

17
tslint.json Normal file
View 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"
}