diff --git a/.gitignore b/.gitignore index 0a6c392f..ded7b2f9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ dist dist-ssr build built -*.local # Logs logs @@ -47,5 +46,9 @@ xcuserdata/ *.xcuserstate *.dev.xcconfig XCBuildData -xcode/**/build/ -xcode/**/dist/ \ No newline at end of file +xcode/Ext-Safari/Resources/ + +# directories and files +local +*.local +/scripts/*.local.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index be1335e6..5c1a0da1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,7 +6,7 @@ # root /package -/public +/public/**/vendor /etc # dir diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9d6aec0f..c967bcab 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -23,33 +23,86 @@ } }, { - "label": "npm: build", + "label": "npm: dev ext-safari-mac", + "detail": "Run dev server and build dev resource to xcode dist", + "type": "shell", + "command": "npm run dev:ext-safari-mac", + "group": "build", + "options": { + "cwd": "./" + } + }, + { + "label": "npm: dev ext-safari-ios", + "detail": "Run dev server and build dev resource to xcode dist", + "type": "shell", + "command": "npm run dev:ext-safari-ios", + "group": "build", + "options": { + "cwd": "./" + } + }, + { + "label": "npm: build mac", "detail": "Build to xcode dist path", "type": "shell", - "command": "npm run build", + "command": "npm run build:mac", "group": "build", "options": { "cwd": "./" } }, { - "label": "xcode: build", - "detail": "xcodebuild", + "label": "npm: build ios", + "detail": "Build to xcode dist path", "type": "shell", - "command": "xcodebuild -scheme Userscripts build", + "command": "npm run build:ios", + "group": "build", + "options": { + "cwd": "./" + } + }, + { + "label": "xcodebuild: mac-debug", + "detail": "xcodebuild mac debug", + "type": "shell", + "command": "xcodebuild -scheme Mac -configuration Debug", + "group": "build", + "options": { + "cwd": "./xcode/" + } + }, + { + "label": "xcodebuild: mac-vite", + "detail": "xcodebuild mac vite", + "type": "shell", + "command": "xcodebuild -scheme Mac-Vite-Dev -configuration Vite", "group": "build", "options": { "cwd": "./xcode/" } }, { - "label": "build all", - "detail": "npm build + xcodebuild", + "label": "dev: ext-safari-mac", + "detail": "npm: dev ext-safari-mac + xcodebuild: mac-vite", + "presentation": { + "reveal": "silent" + }, + "dependsOrder": "sequence", + "dependsOn": ["npm: dev ext-safari-mac", "xcodebuild: mac-vite"], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "build: mac debug", + "detail": "npm: build mac + xcodebuild: mac-debug", "presentation": { "reveal": "silent" }, "dependsOrder": "sequence", - "dependsOn": ["npm: build", "xcode: build"], + "dependsOn": ["npm: build mac", "xcodebuild: mac-debug"], "group": { "kind": "build", "isDefault": true diff --git a/docs/dev.md b/docs/dev.md index d1e7a7da..85633998 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -25,17 +25,18 @@ Reviewing the template will help you understand the composition of the project. # Dev -- `npm install`[^1] -- `npm run dev`[^1] +- `npm install` [^1] +- `npm run dev` [^1] # Build -- `npm run build`[^1] +- `npm run build:mac` [^1][^2] - `cd ./xcode` -- `xcodebuild`[^1][^2] or build with `Xcode` App +- `xcodebuild -scheme Mac` [^1][^2][^3] or build with `Xcode` App [^1]: These commands can also be executed directly through the vscode tasks. Please refer to: [/.vscode/tasks.json](../.vscode/tasks.json) -[^2]: Local setup may be required. Please refer to: [Building from the Command Line with Xcode FAQ](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) +[^2]: Select the corresponding target and platform to build. Please refer to: [/package.json](../package.json) and [xcode-schemes](../xcode/Userscripts.xcodeproj/xcshareddata/xcschemes/) +[^3]: Local setup may be required. Please refer to: [Building from the Command Line with Xcode FAQ](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) # Xcode diff --git a/entry-ext-background.html b/entry-ext-background.html new file mode 100644 index 00000000..e3ee5d4c --- /dev/null +++ b/entry-ext-background.html @@ -0,0 +1,9 @@ + + +
+