Skip to content

Commit 913ced7

Browse files
committed
Fix merge conflicts
2 parents 9d3df83 + 7e0cdf7 commit 913ced7

31 files changed

+347
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
![progress-banner](https://codecrafters.io/landing/images/default_progress_banners/shell.png)
2+
3+
This is a starting point for TypeScript solutions to the
4+
["Build Your Own Shell" Challenge](https://app.codecrafters.io/courses/shell/overview).
5+
6+
In this challenge, you'll build your own POSIX compliant shell that's capable of
7+
interpreting shell commands, running external programs and builtin commands like
8+
cd, pwd, echo and more. Along the way, you'll learn about shell command parsing,
9+
REPLs, builtin commands, and more.
10+
11+
**Note**: If you're viewing this repo on GitHub, head over to
12+
[codecrafters.io](https://codecrafters.io) to try the challenge.
13+
14+
# Passing the first stage
15+
16+
The entry point for your `shell` implementation is in `app/main.ts`. Study and
17+
uncomment the relevant code, and push your changes to pass the first stage:
18+
19+
```sh
20+
git add .
21+
git commit -m "pass 1st stage" # any msg
22+
git push origin master
23+
```
24+
25+
Time to move on to the next stage!
26+
27+
# Stage 2 & beyond
28+
29+
Note: This section is for stages 2 and beyond.
30+
31+
1. Ensure you have `bun (1.1)` installed locally
32+
1. Run `./your_shell.sh` to run your program, which is implemented in
33+
`app/main.ts`.
34+
1. Commit your changes and run `git push origin master` to submit your solution
35+
to CodeCrafters. Test output will be streamed to your terminal.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Uncomment this block to pass the first stage
2+
// import { createInterface } from 'readline';
3+
4+
// You can use print statements as follows for debugging, they'll be visible when running tests.
5+
console.log("Logs from your program will appear here!");
6+
7+
// Uncomment this block to pass the first stage
8+
// const rl = createInterface({
9+
// input: process.stdin,
10+
// output: process.stdout
11+
// });
12+
//
13+
// rl.question('$ ', (answer) => {
14+
// rl.close();
15+
// });
1.6 KB
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Set this to true if you want debug logs.
2+
#
3+
# These can be VERY verbose, so we suggest turning them off
4+
# unless you really need them.
5+
debug: false
6+
7+
# Use this to change the TypeScript version used to run your code
8+
# on Codecrafters.
9+
#
10+
# Available versions: bun-1.1
11+
language_pack: bun-1.1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@codecrafters/build-your-own-shell",
3+
"description": "Build your own Shell challenge, from Codecrafters",
4+
"type": "module",
5+
"scripts": {
6+
"dev": "bun run app/main.ts"
7+
},
8+
"devDependencies": {
9+
"@types/node": "^20.14.2"
10+
}
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ES2022",
5+
"moduleResolution": "node",
6+
"esModuleInterop": true,
7+
"strict": true,
8+
"skipLibCheck": true
9+
},
10+
"ts-node": {
11+
"esm": true
12+
}
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
#
3+
# DON'T EDIT THIS!
4+
#
5+
# CodeCrafters uses this file to test your code. Don't make any changes here!
6+
#
7+
# DON'T EDIT THIS!
8+
exec bun run app/main.ts "$@"

course-definition.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ languages:
2323
- slug: "javascript"
2424
- slug: "c"
2525
- slug: "cpp"
26+
- slug: "typescript"
2627

2728
marketing:
2829
difficulty: medium

0 commit comments

Comments
 (0)