eerotal / LibreSignage

A free and open source digital signage solution.
BSD 3-Clause "New" or "Revised" License
673 stars 126 forks source link

[Code Quality] Fix Javascript to work on older devices & "smart" TVs #89

Open unquietwiki opened 5 years ago

unquietwiki commented 5 years ago

Per discussion on #39 , we know "smart" TVs are rather dumb. I think this can be fixed by adding BabelJS ; initial attempts so far have had mixed results, but this seems worth further exploration.

Process

make realclean / make clean
npm install && npm install --save-dev @babel/core @babel/cli @babel/preset-env @babel/preset-react babelify
npm install --save @babel/polyfill
(create babel.config.js, if haven't already)
(update makefile, if haven't already)
make configure TARGET=apache2-debian && make
make install

Example babel.config.js

const presets = [
  [
    "@babel/env",
    {
      targets: {
        ie: "7"
      },
    },
    "@babel/preset-react",
    {
    }
  ],
];

module.exports = { presets };
eerotal commented 4 years ago

This is definitely something I should experiment with. It'd be great to get LibreSignage working on various smart-TVs aswell. I don't think it should be too difficult to get Babel working with LibreSignage either, although I haven't really used Babel before.