Skip to content

Commit 1833c4f

Browse files
committed
feat($cli): Add alias for package install
Now it's possible to install packages by running elm-app install <package-name>
1 parent 77eb2c8 commit 1833c4f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/elm-app-cli.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ switch (script) {
5050

5151
break;
5252
}
53+
case 'install': {
54+
const executable = executablePaths['elm-package'];
55+
spawn.sync(path.normalize(executable), process.argv.slice(2), {
56+
stdio: 'inherit'
57+
});
58+
break;
59+
}
5360
default:
5461
// Proxy elm-platform cli commands.
5562
if (['package', 'reactor', 'make', 'repl'].indexOf(script) !== -1) {
@@ -74,7 +81,9 @@ switch (script) {
7481
function help(version) {
7582
console.log('\nUsage: elm-app <command>\n');
7683
console.log('where <command> is one of:');
77-
console.log(' create, build, start, package, reactor, make, repl\n');
84+
console.log(
85+
' create, build, start, install, package, reactor, make, repl\n'
86+
);
7887
console.log('\nElm ' + elmPlatformVersion + '\n');
7988
console.log(
8089
'create-elm-app@' + version + ' ' + path.resolve(__dirname, '..')

0 commit comments

Comments
 (0)