Skip to content

Commit f71df0a

Browse files
committed
TechDivision Multisite tools
1 parent a73a7ac commit f71df0a

14 files changed

Lines changed: 534 additions & 109 deletions

bin/install.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
cat << "EOF"
4+
_____ _ ____ _ _ _
5+
|_ _|__ ___| |__ | _ \(_)_ _(_)___(_) ___ _ __
6+
| |/ _ \/ __| '_ \| | | | \ \ / / / __| |/ _ \| '_ \
7+
| | __/ (__| | | | |_| | |\ V /| \__ \ | (_) | | | |
8+
|_|\___|\___|_| |_|____/|_| \_/ |_|___/_|\___/|_| |_|
9+
10+
EOF
11+
12+
echo "Installing helix-cli from TechDivision fork..."
13+
echo ""
14+
15+
# Define installation directory (use npm's global lib directory)
16+
NPM_PREFIX=$(npm prefix -g)
17+
INSTALL_DIR="$NPM_PREFIX/lib/helix-cli-source"
18+
19+
# Clone or update repository
20+
if [ -d "$INSTALL_DIR" ]; then
21+
echo "Updating existing installation in $INSTALL_DIR..."
22+
cd "$INSTALL_DIR" || exit 1
23+
git pull origin main
24+
else
25+
echo "Cloning repository to $INSTALL_DIR..."
26+
git clone https://github.com/techdivision/helix-cli.git "$INSTALL_DIR" || exit 1
27+
cd "$INSTALL_DIR" || exit 1
28+
fi
29+
30+
echo ""
31+
echo "Preparing environment..."
32+
npm install -g husky
33+
npm uninstall -g @adobe/aem-cli 2>/dev/null
34+
35+
echo ""
36+
echo "Installing dependencies and linking globally..."
37+
npm install || exit 1
38+
npm link || exit 1
39+
40+
echo ""
41+
echo " Installation complete!"
42+
echo ""
43+
echo "You can now use the following commands:"
44+
echo " - aem"
45+
echo " - hlx"
46+
echo ""

bin/uninstall.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
cat << "EOF"
4+
_____ _ ____ _ _ _
5+
|_ _|__ ___| |__ | _ \(_)_ _(_)___(_) ___ _ __
6+
| |/ _ \/ __| '_ \| | | | \ \ / / / __| |/ _ \| '_ \
7+
| | __/ (__| | | | |_| | |\ V /| \__ \ | (_) | | | |
8+
|_|\___|\___|_| |_|____/|_| \_/ |_|___/_|\___/|_| |_|
9+
10+
EOF
11+
12+
echo "Uninstalling helix-cli from TechDivision fork..."
13+
echo ""
14+
15+
# Define installation directory (use npm's global lib directory)
16+
NPM_PREFIX=$(npm prefix -g)
17+
INSTALL_DIR="$NPM_PREFIX/lib/helix-cli-source"
18+
19+
# Unlink globally
20+
echo "Removing global links..."
21+
npm unlink -g @adobe/aem-cli 2>/dev/null || true
22+
23+
# Remove installation directory
24+
if [ -d "$INSTALL_DIR" ]; then
25+
echo "Removing installation directory $INSTALL_DIR..."
26+
rm -rf "$INSTALL_DIR"
27+
echo "✓ Directory removed"
28+
else
29+
echo "Installation directory not found"
30+
fi
31+
32+
echo ""
33+
echo "✓ Uninstallation complete!"
34+
echo ""

package-lock.json

Lines changed: 1 addition & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"semver": "7.7.3",
7878
"shelljs": "0.10.0",
7979
"unified": "11.0.5",
80+
"yaml": "^2.4.1",
8081
"uuid": "13.0.0",
8182
"xdg-basedir": "5.1.0",
8283
"yargs": "18.0.0"

src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class CLI {
106106
async initCommands() {
107107
if (!this._commands) {
108108
this._commands = {};
109-
for (const cmd of ['up', 'hack', 'import']) {
109+
for (const cmd of ['up', 'hack', 'import', 'multisite', 'open']) {
110110
if (!this._commands[cmd]) {
111111
// eslint-disable-next-line no-await-in-loop
112112
this._commands[cmd] = (await import(`./${cmd}.js`)).default();

src/hack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function hack() {
1818
executor = value;
1919
},
2020
command: 'hack [hackathon]',
21+
description: 'Open hackathon',
2122
aliases: [],
2223
builder: (yargs) => {
2324
yargs

0 commit comments

Comments
 (0)