diff --git a/.gitattributes b/.gitattributes index d85906ec..bad24153 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ +package-lock.json linguist-generated pnpm-lock.yaml linguist-generated -public linguist-generated -xcode/iOS-App/Base.lproj/Main.html linguist-generated \ No newline at end of file +public linguist-generated \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 41bd0485..89f2044d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,6 +9,6 @@ jobs: - name: Install modules run: npm install - name: Run ESLint - run: npm run lint-js + run: npm run lint:js - name: Run Stylelint - run: npm run lint-css + run: npm run lint:css diff --git a/.gitignore b/.gitignore index 73b92ed1..0a6c392f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,20 @@ +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Temp/Dist/Built +temp +dist +dist-ssr +build +built +*.local + # Logs logs *.log @@ -7,11 +24,11 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +# npm node_modules -temp -dist -dist-ssr -*.local +#package-lock.json +yarn.lock +pnpm-lock.yaml # Editor directories and files .vscode/* @@ -25,20 +42,10 @@ dist-ssr *.sln *.sw? -# OS generated files -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db - # xcode xcuserdata/ *.xcuserstate *.dev.xcconfig XCBuildData xcode/**/build/ -xcode/**/dist/ -# xcode/Userscripts-iOS/Base.lproj/Main.html \ No newline at end of file +xcode/**/dist/ \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index d53a574f..080f3fa1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,30 +4,30 @@ "version": "2.0.0", "tasks": [ { - "label": "pnpm: install", + "label": "npm: install", "detail": "Install dev dependencies", "type": "shell", - "command": "pnpm install", + "command": "npm install", "group": "build", "options": { "cwd": "./" } }, { - "label": "pnpm: dev", + "label": "npm: dev", "detail": "Run dev server", "type": "shell", - "command": "pnpm dev", + "command": "npm run dev", "group": "build", "options": { "cwd": "./" } }, { - "label": "pnpm: build", + "label": "npm: build", "detail": "Build to xcode dist path", "type": "shell", - "command": "pnpm build", + "command": "npm run build", "group": "build", "options": { "cwd": "./" @@ -44,14 +44,14 @@ } }, { - "label": "xcode: rebuild", - "detail": "pnpm build + xcodebuild", + "label": "build all", + "detail": "npm build + xcodebuild", "presentation": { "reveal": "silent" }, "dependsOrder": "sequence", "dependsOn": [ - "pnpm: build", + "npm: build", "xcode: build" ], "group": { diff --git a/docs/dev.md b/docs/dev.md index 8a8a331b..85eb1b96 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -5,18 +5,20 @@ The `xcode` directory is the root of the Xcode project where the Safari extensio For other directory structure instructions, please refer to [structure.md](structure.md). # Environment -- [`Node.js`](https://nodejs.dev/en/learn/how-to-install-nodejs/) -- [`pnpm`](https://pnpm.io/installation) (optional) -- [`Xcode`](https://geo.itunes.apple.com/app/xcode/id497799835) +- [`Node.js`](https://nodejs.org/) +- [`Xcode`](https://geo.itunes.apple.com/app/id497799835) # Dev -- `pnpm install` -- `pnpm dev` +- `npm install`[^1] +- `npm run dev`[^1] # Build -- `pnpm build` +- `npm run build`[^1] - `cd ./xcode` -- `xcodebuild` or build with Xcode App +- `xcodebuild`[^1][^2] or build with `Xcode` App + +[^1]: These commands can also be executed directly through the VSCode Run Task. 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) # Xcode @@ -28,9 +30,9 @@ The Xcode project contains two configurations, which have independent `xcconfig` - `Release`: A developer account is required, which means it can be used for distribution as well as running on real iOS/iPadOS devices. You will need to override your developer account information in `xcconfig` to complete the build. ### xcconfig -All `xcconfig` files are in the `./xcode/xcconfig/` directory. Each `.xcconfig` file can be overridden by `.dev.xcconfig` in the same path, they will be ignored by `git`, so you can override any build settings locally. +All `xcconfig` files are in the [`/xcode/xcconfig/`](../xcode/xcconfig) directory. Each `.xcconfig` file can be overridden by `.dev.xcconfig` in the same path, they will be ignored by `git`, so you can override any build settings locally. -For example, you can create an `Userscripts-Release.dev.xcconfig` file to override `Userscripts-Release.xcconfig` and fill in your own developer account information there: +For example, you can create an `Userscripts-Release.dev.xcconfig` file to override [`Userscripts-Release.xcconfig`](../xcode/xcconfig/Userscripts-Release.xcconfig) and fill in your own developer account information there: `Userscripts-Release.dev.xcconfig` ``` diff --git a/docs/structure.md b/docs/structure.md index 5535ea2a..602cadea 100644 --- a/docs/structure.md +++ b/docs/structure.md @@ -11,18 +11,22 @@ Readme references and project history assets Project Static Asset https://vitejs.dev/guide/assets.html#the-public-directory -### `./public/page/jshint.min.js` +### `./public/extension-page/jshint.min.js` CodeMirror 5 `codemirror/addon/lint/javascript-lint.js` depends on `jshint.js` https://codemirror.net/5/doc/manual.html#addon_lint https://github.com/jshint/jshint/blob/main/dist/jshint.js +## `scripts` +Custom build scripts ref in `package.json` +Used to build the source code in `src` below + ## `src` -Project Web App Source Code -Build the project from here to extension resources +Project Web App/Ext Source Code +Build the project from here to xcode resources ## `xcode` -Project Native App Source Code -Build the project from here to extension bundle app +Project Bundled App Source Code +Build the project from here to extension bundled app # About [Userscripts](https://github.com/quoid/userscripts) @ 2018-2023 diff --git a/entry-app-webview.html b/entry-app-webview.html new file mode 100644 index 00000000..10167879 --- /dev/null +++ b/entry-app-webview.html @@ -0,0 +1,14 @@ + + +
+ + + + +