electron-userland / electron-compilers

DEPRECATED: Compiler implementations for electron-compile
35 stars 55 forks source link

Add Elm compiler #82

Closed AsaAyers closed 5 years ago

AsaAyers commented 7 years ago

I haven't figured out how to test this in a real app with electron-forge yet, but the tests in electron-compiler pass.

elm-compile PR: https://github.com/electron/electron-compile/pull/264 elm-compilers PR: https://github.com/electron/electron-compilers/pull/82

AsaAyers commented 7 years ago

Do you have any advice on how to debug these compilers? So far my process has been:

  1. checkout electron-compilers and in its directory:
    1. npm link
    2. run npm run compile -- --watch
  2. checkout electron-compile and in its directory:
    1. npm link electron-compilers
    2. npm run compile -- --watch
    3. npm test

At this point I have the existing tests running with the new compiler. Now I'm trying to use this in a project created with electron-forge init (AsaAyers/media-backup).

  1. In electron-compile
    1. npm link
  2. Checkout media-backup and in its directory:
    1. npm install
    2. npm link electron-compile
    3. ln -sfn $(readlink -e node_modules/electron-compile) node_modules/electron-compile
      • When the packager copies node_modules into /tmp it breaks symlinks. readlink will find the absolute path of the final destination so that when the symlink gets copied it will still work from /tmp
    4. npm start
      • This works exactly as expected
    5. npm run make
      • elmCompiler.compileSync crashes, I'm working on figuring out why. Elm has an elm-stuff folder that needs to be treated like node_modules