Skip to content

Commit 5028642

Browse files
authored
v1.0.2 (#41)
* ⚡ npm updates + version * ⚡ finalizing verzion * 🐛 mistake nohup.out * 🐛 fixes repl path completition * ⚡ xdg docs improved * ⚡ $.pathFromURL
1 parent c4c5b92 commit 5028642

File tree

308 files changed

+25315
-20898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+25315
-20898
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pipe( $.xdg.temp, s.mkdir )("foo bar");
2525
Open ‘▸’ sections for quick overview and/or navigate to link(s) for more detailed
2626
information and documentation.
2727

28-
<!-- #region --><details> <summary><a href="./docs/modules/s.md">s #shelljs</a> namespace <em>(unix shell-like commands in JavaScript)</em></summary>
28+
<!-- #region --><details> <summary><a href="./docs/namespaces/s/README.md">s #shelljs</a> namespace <em>(unix shell-like commands in JavaScript)</em></summary>
2929

3030
```js
3131
s.ls().forEach(echo); // ShellArray
@@ -41,7 +41,7 @@ and some additional added by nodejsscript. Typically `s.cat`/`s.grep`/…,
4141
to run other than builtin commands use `s.run`/`s.runA`.
4242

4343
These functions returns `ShellArray`/`ShellString`/`Promise<ShellString>`,
44-
these types are union types of `string[]`/`string` with [`ShellReturnValueNJS`](./docs/interfaces/s.ShellReturnValueNJS.md).
44+
these types are union types of `string[]`/`string` with [`ShellReturnValueNJS`](./docs/namespaces/s/interfaces/ShellReturnValueNJS.md).
4545
In simple terms, you can use it as `string[]`/`string`/`Promise<string>` or
4646
read the commad exit `code` and `stdout`/`stderr`. If it makes sence, you can
4747
pipe output to other shelljs commands. Special pipeing is `to`/`toEnd` for
@@ -53,9 +53,9 @@ s.echo("Hello World!").to("hello.txt");
5353

5454
<!-- #endregion -->
5555
</details>
56-
<!-- #region --><details> <summary><a href="./docs/modules/.md">$</a> (
57-
<a href="./docs/modules/.md#api">$.api() #sade</a>,
58-
<a href="./docs/modules/xdg_.xdg.md">$.xdg</a>,
56+
<!-- #region --><details> <summary><a href="./docs/namespaces/$/README.md">$</a> (
57+
<a href="./docs/namespaces/$/functions/api.md">$.api() #sade</a>,
58+
<a href="./docs/namespaces/xdg/namespaces/xdg/README.md">$.xdg</a>,
5959
6060
)
6161
namespace <em>(nodejsscript/cli related functions/variables)</em></summary>
@@ -93,11 +93,11 @@ $.api()
9393
(home, temp, config, … directory)
9494
- `$.stdin`: handles standard input when the script is run in shell pipe (can be
9595
helpful for `nodejsscript --eval`/`nodejsscript --print` bellow)
96-
- …for more see [related section in docs](./docs/modules/.md)
96+
- …for more see [related section in docs](./docs/namespaces/$/README.md)
9797

9898
<!-- #endregion -->
9999
</details>
100-
<!-- #region --><details> <summary><a href="./docs/README.md#echo">echo() #css-in-console</a> function/namespace</summary>
100+
<!-- #region --><details> <summary><a href="./docs/functions/echo.md">echo() #css-in-console</a> function/namespace</summary>
101101

102102
```js
103103
const css= echo.css`
@@ -118,7 +118,7 @@ echo("%cDone", css.success);
118118

119119
<!-- #endregion -->
120120
</details>
121-
<!-- #region --><details> <summary><a href="./docs/README.md#pipe">pipe()</a> function</summary>
121+
<!-- #region --><details> <summary><a href="./docs/functions/pipe.md">pipe()</a> function</summary>
122122

123123
```js
124124
pipe(

bin/repl.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function startRepl(){ return new Promise(async function(){
4444
const s_= s.$("-vFgs");
4545
if((pwd==="." ? s_.pwd().trim() : pwd)!==ls_tmp.pwd){
4646
ls_tmp.pwd= pwd;
47-
const map= pwd==="." ? l=> `"${l}"` : pwd==="/" ? l=> `"/${l}"` : l=> `"${pwd}/${l}"`;
47+
const map= pwd==="." ? l=> `"./${l}"` : pwd==="/" ? l=> `"/${l}"` : l=> `"${pwd}/${l}"`;
4848
try {
4949
const ls= s_.ls(pwd).filter(l=> l!==pwd);
5050
if(ls.length) ls_tmp.ls= ls.concat("..").map(map);

bs/build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S npx nodejsscript
2-
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
2+
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global $ */
33
$.configAssign({ fatal: true });
44
import "./build:lint.mjs";
55
import "./build:doc.mjs";

bs/build:doc.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env -S npx nodejsscript
2-
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
2+
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch */
33
$.configAssign({ fatal: true });
44
if(!s.test("-f", "./package.json")){
55
const [ curr ]= $;
@@ -20,6 +20,7 @@ await section("Generating documentation from `*.d.ts`...", () => {
2020
const tds= s.$("-fS").run([
2121
"npx typedoc",
2222
"_index.d.ts",
23+
"--plugin typedoc-plugin-markdown",
2324
"--readme none",
2425
"--defaultCategory 'Internal'",
2526
"--categoryOrder 'Public'",
@@ -81,7 +82,7 @@ await section("Generating tldr pages...", async ()=> {
8182
),
8283
md=> md.replaceAll("### ", "### s."),
8384
md=> s.echo(md).to(path_tldr)
84-
))
85+
));
8586
// shelljs from nodejsscript
8687
mdFromDts("src/shelljs.d.ts").toEnd(path_tldr);
8788
// dollar

bs/build:lint.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env -S npx nodejsscript
2-
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
3-
s.run([
2+
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global s */
3+
const res= s.$().run([
44
"npx jshint",
5-
"**/*.js",
5+
"*.js", "src/*.js bs/*.mjs",
66
"--show-non-errors",
77
].join(" "));

docs/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)