Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aux_links:

nav_external_links:
- title: LearnGitBranching
url: https://nchs-cs.github.io/idp/static/gitbranching/learnGitBranching
url: https://nchs-cs.github.io/static/gitbranching/learnGitBranching/
opens_in_new_tab: true

mermaid:
Expand Down
2 changes: 1 addition & 1 deletion faq_pages/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ search_exclude: true
| Java FX codespaces loading in recovery mode? | See how to disable the sound drivers from loading [here](https://docs.google.com/document/d/1_pbLhVmvnMzIhO-ja_HQkc8UjtaZ4OkBJi2YwU3Vpf0/edit?pli=1&tab=t.ndk4ptepkxmo#heading=h.6c0kfverjd2l). |
| Java FX won't run on codespaces: `Error: JavaFX runtime components are missing, and are required to run this application` | Open up and look at the file: *`.vscode/launch.json`* It's likely you have changed or created a different app that is missing the "linux" section that is needed to find the java fx libraries. Copy that section over to your current configuration so it can find the libraries again. You can usually tell if you see a "projectname" section that is not set to an empty string project name. You can safely delete this launch configuration and use the original one I set up for you instead. **"linux": { "vmArgs": "--module-path ...** |
| Codespaces shows error running the UI port window (x -Failed To Connect To Server) | Try "SHIFT-REFRESH" in your browser window for the VNC UI port. This will delete all cached data in the browser window and seems to fix this problem. |
| I don't know how to use Git/GitHub | There are video tutorials [here](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV) and we also have a set of tutorials hosted at the NCHS website [here](https://nchs-cs.github.io/idp/static/gitbranching/learnGitBranching/) |
| I don't know how to use Git/GitHub | There are video tutorials [here](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV) and you can practice Git branching with [Learn Git Branching](https://learngitbranching.js.org/). |
| I am confused about codespaces | GitHub codespaces directions are [here](https://docs.github.com/en/codespaces/developing-in-a-codespace/developing-in-a-codespace). NCHS specific directions and help are in this doc below [here](https://docs.google.com/document/d/1_pbLhVmvnMzIhO-ja_HQkc8UjtaZ4OkBJi2YwU3Vpf0/edit?pli=1&tab=t.0). |
| Running Java UI from VS Code results in X11 display issue | This results from clicking to open the project directly to VS code with the "Open in VS code" from the classroom. (It's trying to run codespaces remotely but this doesn't work for Swing). Instead clone the repository from VS Code (create a new window and select to clone a repository and use the link for your github repository from GitHub to clone it). This will then run as expected in your local VS code. Alternatively run remotely and follow directions below for running in CodeSpaces. |
| GitHub complains you don't have user.name or user.email | `git config --global user.name "Your name"` <br> `git config --global user.email <id>@apps.nsd.org` |
Expand Down
Binary file added idp/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions idp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: home
title: IDP Website
nav_order: 30
redirect_to: https://nchs-cs.github.io/notes/
---
5 changes: 5 additions & 0 deletions idp/static/gitbranching/learnGitBranching/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true # Top-most editorconfig file

[*]
indent_style = space
indent_size = 2
9 changes: 9 additions & 0 deletions idp/static/gitbranching/learnGitBranching/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ports:
- port: 8000
onOpen: open-preview
tasks:
- init: yarn install
command: >
yarn gulp fastBuild &&
printf "\nWelcome to Learn Git Branching\nTo rebuild the app, simply run 'yarn gulp fastBuild' and reload index.html.\n\n" &&
python3 -m http.server 8000 2>/dev/null
41 changes: 41 additions & 0 deletions idp/static/gitbranching/learnGitBranching/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"esversion": 6,
"curly": true,
"eqeqeq": false,
"regexp": false,
"nonew": false,
"latedef": false,
"forin": false,
"globalstrict": false,
"node": true,
"immed": true,
"newcap": true,
"noarg": true,
"bitwise": true,
"sub": true,
"undef": true,
"unused": true,
"trailing": true,
"devel": true,
"jquery": true,
"nonstandard": true,
"boss": true,
"eqnull": true,
"browser": true,
"debug": true,
"globals": {
"casper": true,
"Raphael": true,
"require": true,
"console": true,
"describe": true,
"expect": true,
"it": true,
"runs": true,
"waitsFor": true,
"exports": true,
"module": true,
"prompt": true,
"process": true
}
}
16 changes: 16 additions & 0 deletions idp/static/gitbranching/learnGitBranching/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
sudo: false
language: node_js
node_js:
- "10"
- "8"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
directories:
- "node_modules"
script:
- ./checkgit.sh "Source files were modified before build; is yarn.lock out of sync with package.json?" || travis_terminate $?
- yarn gulp
- ./checkgit.sh "Source files were modified by the build" || travis_terminate $?
1 change: 1 addition & 0 deletions idp/static/gitbranching/learnGitBranching/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
learnGitBranching.js.org
15 changes: 15 additions & 0 deletions idp/static/gitbranching/learnGitBranching/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Welcome to the Learn Git Branching contributing guide!

We have a pretty relaxed environment in this project so there's no formal template to submit Pull Requests for. Contributions generally fall into two buckets:

### Translations

I welcome all translation improvements or additions! The levels are stored in giant JSON blobs, keyed by locale for each string. This means its somewhat awkward to add new translations, since you have to edit the JSON manually.

### Bug Fixes, New Features, etc

These are great too! If you are adding new functionality to the git engine, I would try to add some tests in the `__tests__` folder. It's pretty simple, you can just input a bunch of git commands and show the expected tree state afterwards.

For bug fixes or CSS/style layout issues, simply attach screenshots of the before and after. For more obscure browsers, targeted CSS rules by browser is a bit more preferred.

Thanks for stopping by!
22 changes: 22 additions & 0 deletions idp/static/gitbranching/learnGitBranching/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:14.20.0-alpine3.16 as build

RUN apk add git --no-cache
WORKDIR "/src"

COPY . /src
RUN yarn install && \
yarn cache clean
RUN yarn gulp build

FROM scratch AS export
WORKDIR /
COPY --from=build /src/index.html .
COPY --from=build /src/build ./build



FROM nginx:stable-alpine
WORKDIR /usr/share/nginx/html/
COPY . .
# Override the local source with the built artifacts
COPY --from=export . .
21 changes: 21 additions & 0 deletions idp/static/gitbranching/learnGitBranching/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## MIT License

Copyright (c) 2012-2025 Peter Cottle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 36 additions & 0 deletions idp/static/gitbranching/learnGitBranching/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ifeq ($(OS),Windows_NT)
SHELL := pwsh.exe
else
SHELL := pwsh
endif

.SHELLFLAGS := -NoProfile -Command

REGISTRY_NAME := ghcr.io/
REPOSITORY_NAME := pcottle/
IMAGE_NAME := learngitbranching
TAG := :latest

.PHONY: all clean test
all: build

getcommitid:
$(eval COMMITID = $(shell git log -1 --pretty=format:'%H'))

getbranchname:
$(eval BRANCH_NAME = $(shell (git branch --show-current ) -replace '/','.'))

build:
docker run --rm -v $${PWD}:/mnt --workdir /mnt node:14.20.0-alpine3.16 yarn install
docker run --rm -v $${PWD}:/mnt --workdir /mnt node:14.20.0-alpine3.16 yarn gulp fastBuild
build_docker: getcommitid getbranchname
docker build -t $(REGISTRY_NAME)$(REPOSITORY_NAME)$(IMAGE_NAME)$(TAG) -t $(REGISTRY_NAME)$(REPOSITORY_NAME)$(IMAGE_NAME):$(BRANCH_NAME) -t $(REGISTRY_NAME)$(REPOSITORY_NAME)$(IMAGE_NAME):$(BRANCH_NAME)_$(COMMITID) .
docker build --target export --output type=local,dest=learnGitBranching_$(BRANCH_NAME)_$(COMMITID) .

run:
docker run -p 8080:80 $(REGISTRY_NAME)$(REPOSITORY_NAME)$(IMAGE_NAME)$(TAG)

clean:
echo 'not implemented'
test:
echo 'not implemented'
Loading
Loading