Skip to content

Commit

Permalink
Merge pull request #3 from homer0/homer0_next
Browse files Browse the repository at this point in the history
Update the project
  • Loading branch information
homer0 authored Mar 29, 2024
2 parents 6f48dee + be79ab9 commit db0fe4c
Show file tree
Hide file tree
Showing 25 changed files with 4,480 additions and 16,500 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v2
- name: Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm ci
- run: npm run dev:image:build && ./fix-release.sh && npx semantic-release
env:
HUSKY: 0
run: pnpm install --frozen-lockfile
- run: pnpm run dev:image:build && pnpm exec semantic-release
env:
DOCKER_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
DOCKER_USER: homer0
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
pnpm run lint
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
pnpm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ RUN mkdir -p /home/coder/.codebox/cli
COPY ./src/cli /home/coder/.codebox/cli
COPY ./.nvmrc /home/coder/.codebox/cli/
COPY ./package.json /home/coder/.codebox/cli/
COPY ./package-lock.json /home/coder/.codebox/cli/
COPY ./pnpm-lock.yaml /home/coder/.codebox/cli/
RUN sudo chown -R coder:coder /home/coder/.codebox/cli
RUN echo "export CODEBOX_CLI_PATH=/home/coder/.codebox/cli" >> /home/coder/.zshrc
RUN /home/coder/.codebox/cli/install.sh
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,29 +128,29 @@ Now, if you look at the repository, it seems like a JS app, due to the `package.
### 🤖 Scripts
When the image is created, the `package.json` and the `package-lock.json` are both copied in to the same directory as `src/cli`, but while developing the image, you install the dependencies and use the scripts:
When the image is created, the `package.json` and the `pnpm-lock.yaml` are both copied in to the same directory as `src/cli`, but while developing the image, you install the dependencies and use the scripts:
```bash
# Set the Node version
nvm install
# Install the dependencies
npm install
pnpm install
# -----
# You can manually create the image and run the container...
# Build the image, after deleting the container if it was running, and any previous
# version of the image, if it existed.
npm run dev:image:build
pnpm run dev:image:build
# Run the container, after deleting the previous version of the container if it
# was running.
npm run dev:container:run
pnpm run dev:container:run
# -----
# Or use a single script that does both things...
npm run dev:all
pnpm run dev:all
```

### 🛠 Dev configuration
Expand Down
6 changes: 5 additions & 1 deletion dev/box/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: codebox-test
icon: acid
code-server:
proxy-domain: homer0.com
proxy-domain: home.homer0.dev
# codebox$
hashed-password: 64aad9f2edfd5658acc3929b840bf0dd64c374a2edd85ee71ec78eafb30740b9
vscode:
Expand All @@ -26,6 +26,10 @@ vscode:
- syler.sass-indented
# Svelte for VS Code
- svelte.svelte-vscode
# Prisma
- Prisma.prisma
# Version Lens
- pflannery.vscode-versionlens
git:
username: homer0
email: [email protected]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed dev/box/vscode/extensions/cipchk.cssrem-3.0.0.vsix
Binary file not shown.
Binary file not shown.
104 changes: 54 additions & 50 deletions dev/box/vscode/keybindings.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,99 @@
[
{
"key": "alt+cmd+2",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
"key": "alt+cmd+2",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
{
"key": "cmd+\\",
"command": "-workbench.action.terminal.split",
"when": "terminalFocus"
"key": "cmd+\\",
"command": "-workbench.action.terminal.split",
"when": "terminalFocus"
},
{
"key": "alt+cmd+2",
"command": "workbench.action.splitEditor"
"key": "alt+cmd+2",
"command": "workbench.action.splitEditor"
},
{
"key": "cmd+\\",
"command": "-workbench.action.splitEditor"
"key": "cmd+\\",
"command": "-workbench.action.splitEditor"
},
{
"key": "cmd+\\",
"command": "workbench.action.toggleSidebarVisibility"
"key": "cmd+\\",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
"key": "cmd+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "shift+cmd+\\",
"command": "-editor.action.jumpToBracket",
"when": "editorTextFocus"
"key": "shift+cmd+\\",
"command": "-editor.action.jumpToBracket",
"when": "editorTextFocus"
},
{
"key": "shift+cmd+\\",
"command": "workbench.action.toggleActivityBarVisibility"
"key": "shift+cmd+\\",
"command": "workbench.action.toggleActivityBarVisibility"
},
{
"key": "cmd+2",
"command": "-workbench.action.openEditorAtIndex2"
"key": "cmd+2",
"command": "-workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+1",
"command": "-workbench.action.openEditorAtIndex1"
"key": "cmd+1",
"command": "-workbench.action.openEditorAtIndex1"
},
{
"key": "ctrl+r",
"command": "-workbench.action.openRecent"
"key": "ctrl+r",
"command": "-workbench.action.openRecent"
},
{
"key": "ctrl+r",
"command": "-workbench.action.quickOpenNavigateNextInRecentFilesPicker",
"when": "inQuickOpen && inRecentFilesPicker"
"key": "ctrl+r",
"command": "-workbench.action.quickOpenNavigateNextInRecentFilesPicker",
"when": "inQuickOpen && inRecentFilesPicker"
},
{
"key": "cmd+r",
"command": "workbench.action.gotoSymbol"
"key": "cmd+r",
"command": "workbench.action.gotoSymbol"
},
{
"key": "f5",
"command": "-workbench.action.debug.start",
"when": "!inDebugMode"
{
"key": "f5",
"command": "-workbench.action.debug.start",
"when": "!inDebugMode"
},
{
{
"key": "ctrl+shift+t",
"command": "workbench.action.terminal.focus"
},
{
},
{
"key": "ctrl+shift+cmd+t",
"command": "workbench.action.terminal.kill"
},
{
},
{
"key": "pagedown",
"command": "workbench.action.terminal.scrollDownPage",
"when": "terminalFocus"
},
{
},
{
"key": "pageup",
"command": "workbench.action.terminal.scrollUpPage",
"when": "terminalFocus"
},
{
},
{
"key": "ctrl+r",
"command": "workbench.action.debug.start",
"when": "!inDebugMode && !terminalFocus"
},
{
},
{
"key": "cmd+r",
"command": "-workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "ctrl+shift+.",
"command": "turboConsoleLog.displayLogMessage"
}
},
{
"key": "shift+cmd+g",
"command": "workbench.panel.chat.view.copilot.focus"
},
{
"key": "ctrl+shift+cmd+g",
"command": "workbench.action.openChat.copilot"
}
]
27 changes: 18 additions & 9 deletions dev/box/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"workbench.tips.enabled": false,
"atomKeymap.promptV3Features": true,
"window.newWindowDimensions": "maximized",
"editor.wordWrap": "on",
"editor.scrollBeyondLastLine": false,
"files.trimTrailingWhitespace": true,
"eslint.alwaysShowStatus": true,
"files.hotExit": "onExitAndWindowClose",
"window.restoreWindows": "all",
"editor.tabSize": 2,
"javascript.updateImportsOnFileMove.enabled": "never",
"breadcrumbs.enabled": false,
Expand Down Expand Up @@ -46,25 +46,34 @@
"telemetry.telemetryLevel": "off",
"eslint.run": "onSave",
"explorer.confirmDragAndDrop": false,
"timeline.excludeSources": [],
"files.insertFinalNewline": true,
"eslint.validate": ["javascript", "javascriptreact", "svelte"],
"workbench.sideBar.location": "right",
"svelte.language-server.runtime": "/Users/homer0/.nvm/versions/node/v12.22.11/bin/node",
"svelte.language-server.runtime": "/Users/coder/.nvm/versions/node/v18.20.0/bin/node",
"terminal.integrated.fontSize": 13,
"debug.javascript.codelens.npmScripts": "never",
"javascript.suggest.completeJSDocs": true,
"typescript.preferences.importModuleSpecifier": "relative",
"explorer.confirmDelete": false,
"editor.inlineSuggest.enabled": true,
"github.copilot.enable": {
"*": true,
"yaml": true,
"plaintext": true,
"markdown": true,
"javascript": true
},
"typescript.inlayHints.parameterNames.enabled": "none",
"editor.bracketPairColorization.enabled": false,
"svelte.ask-to-enable-ts-plugin": false,
"turboConsoleLog.includeFileNameAndLineNum": false,
"turboConsoleLog.logMessagePrefix": "🤘",
"turboConsoleLog.delimiterInsideMessage": "|",
"svelte.enable-ts-plugin": true,
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.activityBar.visible": false
"workbench.list.multiSelectModifier": "alt",
"editor.multiCursorModifier": "alt",
"typescript.tsserver.log": "off",
"window.titleBarStyle": "custom",
"svgPreview.autoOpen": false,
"workbench.activityBar.location": "hidden"
}
2 changes: 1 addition & 1 deletion dev/scripts/settings.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

getsetting(){
npm run --silent dev:setting $@
pnpm run --silent dev:setting $@
}
3 changes: 0 additions & 3 deletions fix-release.sh

This file was deleted.

Loading

0 comments on commit db0fe4c

Please sign in to comment.