-
Notifications
You must be signed in to change notification settings - Fork 19
Initialize project structure and setup JavaScript #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,63 @@ | ||
| # Write your code here | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| echo "Creating project..." | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| cd "$SCRIPT_DIR" | ||
|
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? |
||
|
|
||
| mkdir -p project | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
|
||
| cd project | ||
|
|
||
| git init | ||
|
|
||
| touch README.md | ||
| mkdir -p resources | ||
| touch "resources/family picture.jpg" | ||
| touch resources/icon.png | ||
| touch resources/logo.png | ||
| touch settings.conf | ||
|
|
||
| mkdir -p src | ||
| touch src/program.java | ||
| mkdir -p src/profile | ||
| mkdir -p src/database | ||
|
|
||
| git add . | ||
| git commit -m "initial commit" | ||
|
|
||
| sleep 3 | ||
| echo "Setup project..." | ||
|
|
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A single blank line to separate blocks of code is customary. |
||
| echo "Welcome to my project" > README.md | ||
|
|
||
|
|
||
| rm -rf src/profile | ||
| rm -f "resources/family picture.jpg" | ||
|
|
||
|
|
||
| git add . | ||
| git commit -m "Remove profile folder and family picture" | ||
|
|
||
| sleep 3 | ||
|
|
||
|
|
||
| ls resources | ||
|
|
||
| echo "Setup javascript..." | ||
|
|
||
| mv src/program.java src/program.js | ||
| echo "console.log('JavaScript works!');" > src/program.js | ||
|
|
||
|
|
||
| node src/program.js | ||
|
|
||
|
|
||
| git add . | ||
| git commit -m "Setup JavaScript program" | ||
|
|
||
|
|
||
| ls ~ | ||
|
|
||
| echo "All done!" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not asked for in the instructions.