You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible approach: because scala-js can only compile to one js file (along with a dependency js file), I think the content script and popup window should be different sbt projects - bringing the total to three.
The content script and popup projects can be normal scala-js projects and only require the ScalaJSPlugin.
In the scala-js-chrome project, the build.sbt will specify the the two other projects. The ChromeSbtPlugin will compile the content and popup projects and move their outputted js files to the correct build directory. The manifest.json will have to be modified as well.
I like the general idea of that. Do you think it would be possible instead of referencing the whole project to only reference a task that results in a file and have that potentially from another project? This would still leave the possibility of referencing the same project if someone wants to include everything in one.
It would be great if it could be one project. Though, I have limited knowledge of sbt - are you suggesting that one task that calls chromeBuildOpt on a directory, and two that call fastOptJS/fullOptJS on other directories?
Currently we have something like val fullOptJsLib = TaskKey[Attributed[File]]("fullOptJsLib") which can be set to a task that produces a file. I think it may be possible to also set it to reference a task from another project to pull in that file during building. So i think we could provide additional settings for content scripts and such which the user can set to whatever task he wants including from different projects.
Possible approach: because scala-js can only compile to one js file (along with a dependency js file), I think the content script and popup window should be different sbt projects - bringing the total to three.
The content script and popup projects can be normal scala-js projects and only require the ScalaJSPlugin.
In the scala-js-chrome project, the build.sbt will specify the the two other projects. The ChromeSbtPlugin will compile the content and popup projects and move their outputted js files to the correct build directory. The manifest.json will have to be modified as well.
I made a poc of creating three different projects and manually copying over the necessary files with an ugly shell script https://github.com/kramer425/scala-js-chrome-extension-example
The text was updated successfully, but these errors were encountered: