Skip to content

Commit 482b426

Browse files
committed
chore: wip
chore: wip
1 parent 8970f58 commit 482b426

File tree

11 files changed

+42
-58
lines changed

11 files changed

+42
-58
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ Stacks helps you every step along the way—in beginner & expert-friendly ways,
3131
It’s incredibly easy to get started with this framework. Simply run the following command in your terminal:
3232

3333
```bash
34-
sh <(curl stacksjs.org) my-project # wip
35-
34+
curl -Ssf stacksjs.org | sh # wip
3635
# alternatively, if Bun >= v1.0 is installed already,
3736
# you may also get started via:
3837
bunx stacks new my-project

bun.lockb

1.19 KB
Binary file not shown.

docs/guide/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide will help you get started with your first Stacks project. Simply run
66

77
```bash
88
# not working atm
9-
sh <(curl stacksjs.org) my-project
9+
curl -Ssf stacksjs.org | sh # wip
1010

1111
# alternatively, if Bun >= v1.0 is installed already,
1212
# you may also get started via:

storage/framework/core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Develop beautiful, reactive, composable UIs without learning a new set of langua
110110
It's incredibly easy to get started with this framework. Simply run the following command in your terminal:
111111

112112
```bash
113-
sh <(curl stacksjs.org) my-project
113+
curl -Ssf stacksjs.org | sh # wip
114114

115115
# alternatively, if Node.js >= v18.16 is installed already,
116116
# you may also get started via:

storage/framework/core/buddy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Develop beautiful, reactive, composable UIs without learning a new set of langua
114114
It's incredibly easy to get started with this framework. Simply run the following command in your terminal:
115115

116116
```bash
117-
sh <(curl stacksjs.org) my-project
117+
curl -Ssf stacksjs.org | sh # wip
118118

119119
# alternatively, if Bun >= v1.0 is installed already,
120120
# you may also get started via:

storage/framework/core/buddy/src/commands/setup.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ async function initializeProject(options: CliOptions): Promise<void> {
8484
}
8585
else { log.success('.env existed') }
8686

87-
log.info('Generating application key...')
88-
8987
const keyResult = await runCommand('buddy key:generate', {
9088
cwd: options.cwd || p.projectPath(),
9189
})
@@ -95,7 +93,7 @@ async function initializeProject(options: CliOptions): Promise<void> {
9593
process.exit(ExitCode.FatalError)
9694
}
9795

98-
log.success('Generated application key')
96+
// log.success('Generated application key')
9997
log.info('Ensuring AWS is connected...')
10098

10199
// const awsResult = await runCommand('buddy configure:aws', {

storage/framework/core/cli/src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export async function intro(command: string, options?: IntroOptions): Promise<nu
1818
console.log()
1919
}
2020

21-
let msg = `Preparing to run ${bgCyan(italic(bold(` ${command} `)))}`
21+
let msg = `Running ${bgCyan(italic(bold(` ${command} `)))}`
2222
if (command === 'buddy deploy')
23-
msg = `Preparing to run ${bgCyan(italic(bold(` ${command} `)))} for ${bold(`${config.app.name}`)} ${italic(`via ${config.app.url}`)}`
23+
msg = `Running ${bgCyan(italic(bold(` ${command} `)))} for ${bold(`${config.app.name}`)} ${italic(`via ${config.app.url}`)}`
2424

2525
log.info(msg)
2626

storage/framework/core/cloud/src/cloud/lambda/cli-setup/index.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
async function handler() {
22
const setupScriptContents = `if [ -n "$1" ]; then
33
# Check if the directory exists
4-
if [ -d "storage/framework/core" ]; then
4+
if [ -d "storage/framework/core" ]; then # this is our identifier whether it is a Stacks project
55
:
66
else
77
if [ -d "$1" ]; then
8-
echo "Project $1 exists locally. Please use a different name. Bye for now."
8+
echo "Project $1 exists locally. Please use a different name & run again."
99
exit 1
1010
else
1111
git clone https://github.com/stacksjs/stacks.git $1
@@ -21,26 +21,36 @@ async function handler() {
2121
fi
2222
2323
# Get the directory of the current script and go up 3 directories
24-
PROJECT_ROOT="$(cd "$(dirname "$0")/../../../" && pwd)"
24+
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
25+
CLI_PATH="$PROJECT_ROOT/storage/framework/core/buddy/src/cli.ts"
26+
SCRIPT_PATH="$PROJECT_ROOT/storage/framework/scripts/pkgx-install"
27+
LOG_PATH="$PROJECT_ROOT/storage/logs/console.log"
28+
29+
if [[ $* == *--verbose* ]]; then
30+
echo "Project root: $PROJECT_ROOT"
31+
echo "CLI path: $CLI_PATH"
32+
echo "Script path: $SCRIPT_PATH"
33+
echo "Log path: $LOG_PATH"
34+
fi
2535
2636
cd $PROJECT_ROOT
2737
# Run the pkgx-install script
2838
if [[ $* == *--verbose* ]]; then
29-
"./storage/framework/scripts/pkgx-install"
39+
"$SCRIPT_PATH"
3040
# bun --bun ./storage/framework/core/buddy/src/cli.ts setup --verbose
3141
else
32-
"./storage/framework/scripts/pkgx-install" > /dev/null 2>&1
42+
"$SCRIPT_PATH" > /dev/null 2>&1
3343
# bun --bun ./storage/framework/core/buddy/src/cli.ts setup
3444
fi
3545
3646
# Create a named pipe
3747
mkfifo /tmp/mypipe
3848
3949
# Run the command, send output to both the console and the pipe
40-
bun --bun ./storage/framework/core/buddy/src/cli.ts setup | tee /tmp/mypipe &
50+
bun --bun $CLI_PATH setup | tee /tmp/mypipe &
4151
4252
# Read from the pipe, add timestamps, and append to the file
43-
while IFS= read -r line; do echo "$(date '+[%Y-%m-%d %H:%M:%S]') $line"; done < /tmp/mypipe >> ./storage/logs/console.log
53+
while IFS= read -r line; do echo "$(date '+[%Y-%m-%d %H:%M:%S]') $line"; done < /tmp/mypipe >> $LOG_PATH
4454
4555
# Remove the named pipe
4656
rm /tmp/mypipe

storage/framework/scripts/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
script_dir=$(realpath $(dirname "$0"))
55

66
# Get all directories in the core path
7-
dirs=$(find "$script_dir/../core/" -type d -maxdepth 1)
7+
dirs=$(find "$script_dir/../core" -type d -maxdepth 1)
88

99
# Check if no directories found
1010
if [ -z "$dirs" ]; then

storage/framework/scripts/ensure

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)