Bring https://github.com/sveltejs/template to Sciter.js https://github.com/c-smile/sciter-js-sdk
- Retain compatibility with Web Browsers.
- Detect missing features required by Sciter.js to run this template and polyfill them.
- Provide structure for other polyfills needed by the developers
- Limited Patching for content before it lands into
./public/build/bundle.js
. But keep this focused on some targets. - Livereload
If you're only interested on creating your project and start coding, just keep reading. For others trying to understand the details behind this work, you may read svelte_to_sciterjs_startup_instructions.md
cd $HOME
mkdir devTools && cd devTools
git clone https://github.com/c-smile/sciter-js-sdk
chmod +x ./bin/linux/x64/scapp
cd your_prodjects_directory
git clone https://github.com/jsprog/sciterjs-svelte-template/
cd sciterjs-svelte-template
npm install
// package.json
scripts: {
"scapp": "$HOME/devTools/sciter-js-sdk/bin/linux/x64/scapp",
}
npm run build
npm run scapp-main
npm run dev
npm run scapp-main
Sometimes, you may need to test with standalone examples or even need to recreate a bug by extracting it into a standalone HTML file. If this is the case, you better keep your project clean and instead, write some other HTML files for testing.
mkdir ./examples
touch ./examples/issue-livereload.html
Open the HTML file, put some content there, then
npm run scapp ./examples/issue-livereload.html
Some of the requirements for livereload to work out of the box:
- WebSocket
- Injection of scripts and styles into
<head>
- The livereload script may need to check for the injected tags.
- Alternative to Location.reload() to trigger a full reload. Currently writing
Window.this.reload()
won't work. - Extra Polyfills
There are many other approaches to bring back the livereload. But the best of all of them is to fullfill at least the above requirements.