diff --git a/.eslintrc.js b/.eslintrc.js index a31438b..1736bef 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,46 +1,26 @@ module.exports = { - 'env': { - 'browser': true, - 'es2021': true + env: { + browser: true, + es2021: true }, - 'extends': [ - 'eslint:recommended', - 'preact', + extends: [ + 'standard', + 'standard-preact' ], - 'overrides': [ + overrides: [ { - files: ['*.js', '*.jsx'], - }, + files: ['*.jsx', '*.js'] + } ], - 'parserOptions': { - 'ecmaVersion': 'latest', - 'sourceType': 'module' + parserOptions: { + ecmaVersion: 12, + sourceType: 'module' }, - 'rules': { - 'jest/no-deprecated-functions': 0, - - 'arrow-parens': ['error', 'always'], - 'comma-dangle': ['error', 'always-multiline'], - - 'indent': [ - 'error', - 2 - ], - 'linebreak-style': [ - 'error', - 'unix' - ], - 'object-curly-spacing': [ - 'error', - 'always' - ], - 'quotes': [ - 'error', - 'single' - ], - 'semi': [ - 'error', - 'never' - ], + rules: { + }, + settings: { + react: { + version: 'latest' + } } } diff --git a/.gitignore b/.gitignore index f0a8aba..11f90a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ dist/ -.parcel-cache/ +.cache/ diff --git a/.parcelrc b/.parcelrc deleted file mode 100644 index 1f3df89..0000000 --- a/.parcelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@parcel/config-default"], - "reporters": ["...", "parcel-reporter-static-files-copy"] -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 32d8aa2..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# 0.2.0 - -## Breaking Changes - -- Changed direct links format -- Changed savefiles format - -## Changes - -- Added over 150 new interface themes -- Added themes preview page -- Implemented smooth scrolling when a new message appears -- Added an in-game menu -- Improved mobile user experience -- Upgraded Emglken to version 0.5.2 -- Upgraded cheap-glkote to version 0.5.1 -- Added support for ADRIFT 4 -- Fixed broken links -- Enhanced error handling -- Refactored styles for improved code structure - -# 0.1.0 - -- Added support for multiple output buffers - -# 0.0.0 - -- Initial release diff --git a/README.md b/README.md index 5c5711c..b32f86c 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,18 @@ -# ElseIFPlayer +# ifplayer -ElseIFPlayer is an interactive fiction player for the web. -It's powered by [cheap-glkote](https://github.com/He4eT/cheap-glkote) and [Emglken](https://github.com/curiousdannii/emglken). +Interactive Fiction player for the web. +Powered by [cheap-glkote](https://github.com/He4eT/cheap-glkote) and [Emglken](https://github.com/curiousdannii/emglken). -Player available here: [https://he4et.github.io/elseifplayer/](https://he4et.github.io/elseifplayer/). - -## Getting Started - -- Ensure that you have Node.js and NPM installed on your system. -- Install the required packages by running the command `npm install` in your project directory. -- Launch the local development server using `npm run dev`. - -## Build - -To create a production build, use the following command: -``` -npm run build -``` - -- If you intend to host the player on `https://your.domain/`, use: - ``` - npm run build / - ``` -- For hosting it in a specific directory like `https://your.domain/some-directory/`, use: - ``` - npm run build /some-directory - ``` - -The finalized production bundle will be generated and stored in the `/docs` directory. +To see a live demo, check out [https://he4et.github.io/ifplayer/](https://he4et.github.io/ifplayer/). ## Direct links -You can provide a direct link to a specific game using the following URL format: -``` -/#///[theme]/ -``` +You can provide the direct link to your game: -- `mode` specifies the player interface mode: - - `play`: the default multi-window mode - - `focus`: the single-window mode without additional windows, such as the status bar -- `encodedURL` represents the location of the storyfile encoded with `encodeURIComponent`. -- `theme` is optional and allows you to choose a specific UI theme. +`/#/play/encodedURL/[theme]/` +- `encodedURL` - storyfile location encoded with `encodeURIComponent`; +- `theme` - [UI theme](https://github.com/He4eT/ifplayer/blob/master/src/themes/themes.js), optional; -### CORS - -If the player and your storyfile are located on different domains, -you need to use appropriate [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings. - -If you cannot modify the server settings, you can use the [Parchment Proxy](https://iplayif.com/proxy/) as an alternative. - -### Direct Link Examples - -- [Play "Lost Pig" with default or last used theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/) -- [Play "Lost Pig" without statusbar with default or last used theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/) -- [Play "Lost Pig" with Nord theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/nord/) -- [Play "Lost Pig" without statusbar with Dim theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/dim/) -- [Play "Lost Pig" loaded with Parchment Proxy](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fiplayif.com%2Fproxy%2F%3Furl%3Dhttps%3A%2F%2Fifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8) - -## License - -ElseIFPlayer is distributed under the MIT License. -However, please remember to respect the licenses of the interpreters -listed on the -[Emglken page](https://github.com/curiousdannii/emglken#included-projects). +### Examples +- [Play "Lost Pig" with default or last used theme](https://he4et.github.io/ifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/); +- [Play "Lost Pig" with Nord theme](https://he4et.github.io/ifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/nord/); diff --git a/gh.release.sh b/gh.release.sh index f827697..e17ab7a 100755 --- a/gh.release.sh +++ b/gh.release.sh @@ -2,7 +2,7 @@ CURRENT_TIMESTAMP=`date +"%Y-%m-%d-%H%M%S"` -GH_REPO_NAME='elseifplayer' +GH_REPO_NAME='ifplayer' RELEASE_BRANCH='release' BUILD_DIR='docs' diff --git a/index.html b/index.html index e6068e0..ea48db3 100644 --- a/index.html +++ b/index.html @@ -4,25 +4,33 @@ + content="width=device-width, initial-scale=1.0"> - ElseIFPlayer + IFPlayer + content="Interactive Fiction player for the web."> -
+
- +
+
+
+
Loading
+
+
+
+ +
+ +