Improve JavaScript#88
Improve JavaScript#88andreasremdt wants to merge 3 commits intoandi34:devfrom andreasremdt:add-build-pipeline
Conversation
Installs Babel and @babel/env to transpile JavaScript into ES5 code Adapts the Gulp pipeline to process JavaScript
Moves source files into the `src` folder Removes async/await and imports
Install version 2.0.1 of simple translator via CDN Improve usage
|
Hey and thanks for your work! Photobooth is installed in most cases as the only webpage inside /var/www/html , via install script it could also be a subpage inside /var/www/html/photobooth, so we should restore the previous setup in that direction. Again thanks a lot for your work! I'll test your changes ASAP :) |
|
|
|
Edit: |
|
Sorry, I forgot to change the path for the ESLint script to the Yeah, I'd recommend adding the ESLint currently fails because the
I'd recommend the first method, since it's a legit global variable. I'll fix that as soon as possible, and I will also look at the |
|
Hey and thanks! I also ignored /resources/js. All changes to your PR Will have to test further later about the translator working. Only looked at the general code parts until now. |
|
Another thing I've seen you added to your simple-translator: There's a way to let GitHub test PRs? Not sure if it can be added to atomatically run eslint and tell if there's an error before a PR get merged. Edit: done |
|
Only quick tested with the PR on top of your branch, everything seems to work. |
|
On ipad2 (Safari 9) simple translator does not work. Waiting for more feedback. |
|
|
Closed by #90 |
Hey Andi! I started to work a little bit in the JavaScript side of things. Don't be surprised by the amount of changes, it's mostly moving files around. I did the following:
gulp-babeland@babel/env. These are used for JavaScript transpilation, meaning that you can use ES6 (likeconst,let, etc.) while having support for older browsers, such as Safari 9.src. When Gulp has ran, it will put the processed (and ready-to-use) files intoresources/(js|css), like they where before. Meaning that from now on, you should edit the Sass in and JavaScript in thesrcdirectory and let Gulp put them intoresources.simple-translatorto version 2.0.1. I released this version yesterday and it now supports more browsers, is already transpiled and can be loaded from a CDN. The API has also slightly changed.i18n-sub.jsand instead set the configfilesLocationto/photobooth/resources/lang, meaning that it will use the absolute path. On my system, the root folder is called "photobooth", but I am not sure how this project is used on other people machine's. If we need to go back to relative paths and having this sub-file, please let me know.Things are still not perfect, I would see this as the first iteration.
If you have any questions or if something is not working, let me know, I'll try to fix it then :)