Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
b02ab97d4f | |||
ecfefc250c | |||
dde9948404 | |||
d041d8de68 | |||
f03b3df55b | |||
ca387124ee | |||
027b3fe9ad | |||
1b4681c065 | |||
96168fd870 | |||
e81c37e60a | |||
87454d41da | |||
97ae2d87b1 | |||
e23624a93f | |||
7183fcc00a | |||
9fad6100f0 | |||
d0e3065d12 | |||
5245e50f3d |
@ -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:
|
||||
|
@ -6,10 +6,10 @@
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartpath",
|
||||
"description": "offers smart ways to handle paths",
|
||||
"npmPackagename": "@pushrocks/smartpath",
|
||||
"npmPackagename": "@push.rocks/smartpath",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
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",
|
||||
"version": "4.0.4",
|
||||
"name": "@push.rocks/smartpath",
|
||||
"version": "5.0.7",
|
||||
"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"
|
||||
},
|
||||
|
3429
pnpm-lock.yaml
generated
Normal file
3429
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartpath',
|
||||
version: '5.0.7',
|
||||
description: 'offers smart ways to handle paths'
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './smartpath.plugins.js'
|
||||
import * as plugins from './smartpath.plugins.js';
|
||||
export type TPathType = 'url' | 'local';
|
||||
|
||||
/**
|
||||
@ -16,14 +16,14 @@ 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
|
||||
* @param pathArgument if a pathargument is given, ~ is being replaced with the homedir
|
||||
* @returns
|
||||
* @returns
|
||||
*/
|
||||
export const home = (pathArgument?: string) => {
|
||||
if (pathArgument) {
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user