diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6fe6751..afee525 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,7 +15,7 @@ Incomprehensible / incomplete bug reports will be closed. **Homework** -- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/docs/api.md +- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/API.md - [ ] I checked the [Troubleshooting section of the README](https://github.com/nativefier/nativefier/blob/master/README.md#troubleshooting). - [ ] I searched existing issues, open & closed. Yes, my bug is new. - [ ] I'm using the latest version available at https://github.com/nativefier/nativefier/releases diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 1bfb046..28dc239 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -15,7 +15,7 @@ Incomprehensible / incomplete feature requests will be closed. **Homework** -- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/docs/api.md , no existing option fits my needs. +- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/API.md , no existing option fits my needs. - [ ] I searched existing issues, open & closed. Yes, my feature request is new. - [ ] I'm using the latest version available at https://github.com/nativefier/nativefier/releases diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 7e60850..c7c77b8 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -15,7 +15,7 @@ Incomprehensible / incomplete questions will be closed. **Homework** -- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/docs/api.md +- [ ] I looked at `nativefier --help` and https://github.com/nativefier/nativefier/blob/master/API.md - [ ] I searched existing issues, open & closed. Yes, my question is new. - [ ] I'm using the latest version available at https://github.com/nativefier/nativefier/releases diff --git a/docs/dock.png b/.github/dock-screenshot.png similarity index 100% rename from docs/dock.png rename to .github/dock-screenshot.png diff --git a/docs/generate-changelog b/.github/generate-changelog similarity index 97% rename from docs/generate-changelog rename to .github/generate-changelog index 601842c..960837a 100755 --- a/docs/generate-changelog +++ b/.github/generate-changelog @@ -4,7 +4,7 @@ # Will also create a commit with these changes locally # # Usage: -# ./generate-changelog -- "7.0.0" +# ./.github/generate-changelog -- "7.0.0" # # Prerequisites: # - On master branch diff --git a/docs/manual-test b/.github/manual-test similarity index 100% rename from docs/manual-test rename to .github/manual-test diff --git a/docs/walkthrough.gif b/.github/walkthrough.gif similarity index 100% rename from docs/walkthrough.gif rename to .github/walkthrough.gif diff --git a/docs/api.md b/API.md similarity index 100% rename from docs/api.md rename to API.md diff --git a/CATALOG.md b/CATALOG.md index ae92245..c921792 100644 --- a/CATALOG.md +++ b/CATALOG.md @@ -65,7 +65,7 @@ nativefier 'https://open.spotify.com/' Notes: -- [Inject](https://github.com/nativefier/nativefier/blob/master/docs/api.md#inject) the following javascript as `spotify.js` to prevent "Unsupported Browser" messages. +- [Inject](https://github.com/nativefier/nativefier/blob/master/API.md#inject) the following javascript as `spotify.js` to prevent "Unsupported Browser" messages. ```javascript function dontShowBrowserNoticePage() { const browserNotice = document.getElementById('browser-support-notice'); @@ -114,8 +114,8 @@ if (document.readyState === "interactive") { } ``` -- It is also required to [sign the app](https://github.com/nativefier/nativefier/blob/master/docs/api.md#widevine), or many songs will not play. -- To hide all download links (as if you were in the actual app), [inject](https://github.com/nativefier/nativefier/blob/master/docs/api.md#inject) the following CSS as `spotify.css`: +- It is also required to [sign the app](https://github.com/nativefier/nativefier/blob/master/API.md#widevine), or many songs will not play. +- To hide all download links (as if you were in the actual app), [inject](https://github.com/nativefier/nativefier/blob/master/API.md#inject) the following CSS as `spotify.css`: ```css a[href="/download"] { display: none; } ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 552ea56..b6489fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,10 +37,10 @@ with a special shoutout to @TheCleric for a mountain of awesome work. Features! (nothing breaking) - * Add a [`--upgrade`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#upgrade) option to easily upgrade an existing app (fix #1131) (PR #1138) - * Support defining a custom [`--bookmarks-menu`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#bookmarks-menu) (fix #1065) (PR #1155) - * Support setting apps [`--lang`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#lang)uage (fix #175) (PR #1173) - * Support creating self-contained "[`--portable`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#portable)" apps writing their app data to the app folder (fix #376) (PR #1168) + * Add a [`--upgrade`](https://github.com/nativefier/nativefier/blob/master/API.md#upgrade) option to easily upgrade an existing app (fix #1131) (PR #1138) + * Support defining a custom [`--bookmarks-menu`](https://github.com/nativefier/nativefier/blob/master/API.md#bookmarks-menu) (fix #1065) (PR #1155) + * Support setting apps [`--lang`](https://github.com/nativefier/nativefier/blob/master/API.md#lang)uage (fix #175) (PR #1173) + * Support creating self-contained "[`--portable`](https://github.com/nativefier/nativefier/blob/master/API.md#portable)" apps writing their app data to the app folder (fix #376) (PR #1168) * Support opening URLs passed as arg to Nativefied apps (fix #405) (PR #1154) Bugfixes! @@ -166,7 +166,7 @@ This release includes several contributor patches. Thanks @sorhtyre @mattruzzi ! * **[BREAKING CHANGE] Warn on old Electron/Chrome (fix #556) (PR #1076)** ⚠️ Users packaging kiosk apps running for a long time on internal websites, - see https://github.com/nativefier/nativefier/blob/master/docs/api.md#disable-old-build-warning-yesiknowitisinsecure + see https://github.com/nativefier/nativefier/blob/master/API.md#disable-old-build-warning-yesiknowitisinsecure * Check for improperly-formatted arguments (fix #885) (PR #1080) * Correctly start in tray when both `--maximize` and `--tray start-in-tray` are passed (fix #1015) (PR #1079) * Fix icon path error when passing asar `--conceal` flag (fix #975) (PR #1074) diff --git a/docs/development.md b/HACKING.md similarity index 100% rename from docs/development.md rename to HACKING.md diff --git a/README.md b/README.md index 4015558..6fa32e6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Nativefier -![Example of Nativefier app in the macOS dock](docs/dock.png) +![Example of Nativefier app in the macOS dock](.github/dock-screenshot.png) You want to make a native wrapper for WhatsApp Web (or any web page). @@ -8,7 +8,7 @@ You want to make a native wrapper for WhatsApp Web (or any web page). nativefier 'web.whatsapp.com' ``` -![Walkthrough animation](docs/walkthrough.gif) +![Walkthrough animation](.github/nativefier-walkthrough.gif) You're done. @@ -25,7 +25,7 @@ through the numerous open tabs when I was using [Facebook Messenger](https://mes - Automatically retrieval of app icon / name. - JavaScript and CSS injection. -- Many more, see the [API docs](docs/api.md) or `nativefier --help` +- Many more, see the [API docs](API.md) or `nativefier --help` ## Installation @@ -48,7 +48,7 @@ Nativefier will try to determine the app name, and well as lots of other options If desired, these options can be overwritten. For example, to override the name, `nativefier --name 'My Medium App' 'medium.com'` -**Read the [API documentation](docs/api.md) or run `nativefier --help`** +**Read the [API documentation](API.md) or run `nativefier --help`** to learn about other command-line flags usable to configure the packaged app. To have high-resolution icons used by default for an app/domain, please @@ -83,7 +83,7 @@ docker run --rm -v ~/my-icons-folder/:/src -v $TARGET-PATH:/target nativefier/na Help welcome on [bugs](https://github.com/nativefier/nativefier/issues?q=is%3Aopen+is%3Aissue+label%3Abug) and [feature requests](https://github.com/nativefier/nativefier/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request). -[Developer / build docs](docs/development.md), [API documentation](docs/api.md), +[Developer / build docs](HACKING.md), [API documentation](API.md), [Changelog](CHANGELOG.md). ## License @@ -102,7 +102,7 @@ This issue comes up for sites that do not wish to support an app made with Nativ #### Troubleshooting Steps -1. First try setting the [`--user-agent`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#user-agent) to something different. Try using the value you would get at [https://www.whatismybrowser.com/detect/what-is-my-user-agent] and use your current browser's user agent. +1. First try setting the [`--user-agent`](https://github.com/nativefier/nativefier/blob/master/API.md#user-agent) to something different. Try using the value you would get at [https://www.whatismybrowser.com/detect/what-is-my-user-agent] and use your current browser's user agent. 2. If this doesn't work, the site (such as WhatsApp) may be using a service worker to analyze the app and detect. You can disable the service worker cache by doing the following, which is a known fix for WhatsApp: 1. Create a javascript file containing the following snippet: ```javascript @@ -114,7 +114,7 @@ This issue comes up for sites that do not wish to support an app made with Nativ }); } ``` - 2. Inject the javascript file into your app when generating it with the [`--inject`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#inject) argument. + 2. Inject the javascript file into your app when generating it with the [`--inject`](https://github.com/nativefier/nativefier/blob/master/API.md#inject) argument. ### I am trying to use Nativefier to build an app for a site with video, but the video won't play. @@ -122,7 +122,7 @@ This issue comes up for certain sites like [HBO Max](https://github.com/nativefi #### Troubleshooting Steps -1. First try using the [`--widevine`](https://github.com/nativefier/nativefier/blob/master/docs/api.md#widevine) argument when building the app. This uses the [Castlabs version of Electron](https://github.com/castlabs/electron-releases) which allows the playback of DRM enabled video. +1. First try using the [`--widevine`](https://github.com/nativefier/nativefier/blob/master/API.md#widevine) argument when building the app. This uses the [Castlabs version of Electron](https://github.com/castlabs/electron-releases) which allows the playback of DRM enabled video. 2. If this doesn't work, the site may require your app to be signed for `--widevine` to work. See the [Castlabs documentation](https://github.com/castlabs/electron-releases/wiki/EVS) on using their application signing service to sign the application. ### I am trying different options to Nativefier to experiment with, but noticing that sometimes things cache between rebuilds of my app. diff --git a/package.json b/package.json index 7516d5c..327dcd7 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build-app-static": "ncp app/src/static/ app/lib/static/ && ncp app/dist/preload.js app/lib/preload.js && ncp app/dist/preload.js.map app/lib/preload.js.map", "build": "npm run clean && tsc --build . app && npm run build-app && npm run build-app-static", "build:watch": "tsc --build . app --watch", - "changelog": "./docs/generate-changelog", + "changelog": "./.github/generate-changelog", "ci": "npm run lint && npm test", "clean": "rimraf lib/ app/lib/ app/dist/", "clean:full": "rimraf lib/ app/lib/ app/dist/ app/node_modules/ node_modules/", @@ -45,7 +45,7 @@ "list-outdated-deps": "npm out; cd app && npm out; true", "prepare": "cd app && npm install && cd .. && npm run build", "test:integration": "jest --testRegex '.*integration-test.js'", - "test:manual": "npm run build && ./docs/manual-test", + "test:manual": "npm run build && ./.github/manual-test", "test:unit": "jest", "test:watch": "jest --watch", "test:withlog": "LOGLEVEL=trace npm run test", diff --git a/src/cli.ts b/src/cli.ts index 67f6c42..3c03c21 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -70,7 +70,7 @@ export function initArgs(argv: string[]): yargs.Argv { }) .option('global-shortcuts', { description: - 'define global keyboard shortcuts via a JSON file; See https://github.com/nativefier/nativefier/blob/master/docs/api.md#global-shortcuts', + 'define global keyboard shortcuts via a JSON file; See https://github.com/nativefier/nativefier/blob/master/API.md#global-shortcuts', normalize: true, type: 'string', }) @@ -108,7 +108,7 @@ export function initArgs(argv: string[]): yargs.Argv { .option('portable', { default: false, description: - 'make the app store its user data in the app folder; WARNING: see https://github.com/nativefier/nativefier/blob/master/docs/api.md#portable for security risks', + 'make the app store its user data in the app folder; WARNING: see https://github.com/nativefier/nativefier/blob/master/API.md#portable for security risks', type: 'boolean', }) .option('upgrade', { @@ -152,14 +152,14 @@ export function initArgs(argv: string[]): yargs.Argv { }) .option('bookmarks-menu', { description: - 'create a bookmarks menu (via JSON file); See https://github.com/nativefier/nativefier/blob/master/docs/api.md#bookmarks-menu', + 'create a bookmarks menu (via JSON file); See https://github.com/nativefier/nativefier/blob/master/API.md#bookmarks-menu', normalize: true, type: 'string', }) .option('browserwindow-options', { coerce: parseJson, description: - 'override Electron BrowserWindow options (via JSON string); see https://github.com/nativefier/nativefier/blob/master/docs/api.md#browserwindow-options', + 'override Electron BrowserWindow options (via JSON string); see https://github.com/nativefier/nativefier/blob/master/API.md#browserwindow-options', type: 'string', }) .option('disable-context-menu', { diff --git a/test-resources/iconSample.png b/test-resources/iconSample.png deleted file mode 100644 index c287662..0000000 Binary files a/test-resources/iconSample.png and /dev/null differ diff --git a/test-resources/iconSampleGrey.png b/test-resources/iconSampleGrey.png deleted file mode 100644 index 1730f84..0000000 Binary files a/test-resources/iconSampleGrey.png and /dev/null differ diff --git a/test-resources/test-injection.css b/test-resources/test-injection.css deleted file mode 100644 index 437ddb3..0000000 --- a/test-resources/test-injection.css +++ /dev/null @@ -1,3 +0,0 @@ -* { - color: blue; -} diff --git a/test-resources/test-injection.js b/test-resources/test-injection.js deleted file mode 100644 index b535a98..0000000 --- a/test-resources/test-injection.js +++ /dev/null @@ -1,3 +0,0 @@ -const log = require('loglevel'); // eslint-disable-line @typescript-eslint/no-var-requires - -log.info('This is a test injecton script');