palabra 1.8.5 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +13 -0
- package/bin/palabra.js +7 -3
- package/letras/rust/rust.json +22 -1
- package/lib/cli/instalar.js +4 -2
- package/lib/cli/parse-args.js +3 -0
- package/lib/palabra.js +2 -1
- package/lib/parser/parser.js +3 -0
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/bin/palabra.js
CHANGED
|
@@ -21,10 +21,14 @@ const instrucciones = args._.shift();
|
|
|
21
21
|
|
|
22
22
|
let cmd = '';
|
|
23
23
|
|
|
24
|
-
if (!instrucciones || instrucciones === 'i')
|
|
25
|
-
cmd = await instalar(args._);
|
|
24
|
+
if (!instrucciones || instrucciones === 'i') {
|
|
25
|
+
cmd = await instalar(args._, args);
|
|
26
|
+
} else {
|
|
27
|
+
console.error('palabra i [letra1, letra2, ..., letraN]');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
26
30
|
|
|
27
|
-
if (!args.quiet)
|
|
31
|
+
if (!args.quiet && cmd)
|
|
28
32
|
console.log(`> ${cmd}`);
|
|
29
33
|
|
|
30
34
|
if (args['dry-run'])
|
package/letras/rust/rust.json
CHANGED
|
@@ -2,8 +2,29 @@
|
|
|
2
2
|
"name": "rust",
|
|
3
3
|
"url": "https://sh.rustup.rs",
|
|
4
4
|
"confirmar": false,
|
|
5
|
+
"bin": {
|
|
6
|
+
"cargo": "bin/cargo",
|
|
7
|
+
"cargo-clippy": "bin/cargo-clippy",
|
|
8
|
+
"cargo-fmt": "bin/cargo-fmt",
|
|
9
|
+
"cargo-miri": "bin/cargo-miri",
|
|
10
|
+
"clippy-driver": "bin/clippy-driver",
|
|
11
|
+
"rls": "bin/rls",
|
|
12
|
+
"rust-analyzer": "bin/rust-analyzer",
|
|
13
|
+
"rust-gdb": "bin/rust-gdb",
|
|
14
|
+
"rust-gdbgui": "bin/rust-gdbgui",
|
|
15
|
+
"rust-lldb": "bin/rust-lldb",
|
|
16
|
+
"rustc": "bin/rustc",
|
|
17
|
+
"rustdoc": "bin/rustdoc",
|
|
18
|
+
"rustfmt": "bin/rustfmt",
|
|
19
|
+
"rustup": "bin/rustup"
|
|
20
|
+
},
|
|
21
|
+
"dir": "cargo",
|
|
5
22
|
"env": {
|
|
6
23
|
"RUSTUP_HOME": "{{ directorio }}/rustup",
|
|
7
24
|
"CARGO_HOME": "{{ directorio }}/cargo"
|
|
8
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"commands": [
|
|
27
|
+
"rustup update",
|
|
28
|
+
"rustup toolchain install stable"
|
|
29
|
+
]
|
|
9
30
|
}
|
package/lib/cli/instalar.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {create, createPalabra} from '../palabra.js';
|
|
2
2
|
import {readPalabra} from './read-palabra.js';
|
|
3
3
|
|
|
4
|
-
export const instalar = async (nombres) => {
|
|
4
|
+
export const instalar = async (nombres, {directorio}) => {
|
|
5
5
|
if (nombres) {
|
|
6
|
-
const palabra = createPalabra(nombres
|
|
6
|
+
const palabra = createPalabra(nombres, {
|
|
7
|
+
directorio,
|
|
8
|
+
});
|
|
7
9
|
return create(palabra);
|
|
8
10
|
}
|
|
9
11
|
|
package/lib/cli/parse-args.js
CHANGED
package/lib/palabra.js
CHANGED
|
@@ -10,7 +10,7 @@ export const create = async (palabras) => {
|
|
|
10
10
|
return commands.join(' && ');
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const createPalabra = (nombres, letras) => {
|
|
13
|
+
export const createPalabra = (nombres, {letras, directorio}) => {
|
|
14
14
|
if (letras)
|
|
15
15
|
return {
|
|
16
16
|
letras,
|
|
@@ -30,6 +30,7 @@ export const createPalabra = (nombres, letras) => {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
return {
|
|
33
|
+
directorio,
|
|
33
34
|
letras: newLetras,
|
|
34
35
|
};
|
|
35
36
|
};
|
package/lib/parser/parser.js
CHANGED