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
I am having the elm-brunch plugin compile a variety of main apps into a single file, which is output to a brunch watched directory of other javascript, which then all gets compiled into one single javascript file. However brunch does not seem to pick up on Elm changes immediately as it seems to start compiling while Elm does and Elm finishes writing 'after' Brunch has already started compiling the files, so I have to save a file twice with ten seconds or so between them to have it compile twice.
Information
[0.6.0 ] elm-brunch version
[ 2.8.2] brunch version
[] nodejs version
content of brunch-config.js: Huge, but relevant parts are:
plugins: {babel: {presets: ['es2015'],plugins: ["transform-object-rest-spread"],// Do not use ES6 compiler in vendor codeignore: [/web\/static\/vendor/],compact: false},elmBrunch: {elmFolder: '.',mainModules: ['web/elm/MessengerApp.elm','web/elm/ExampleElmApp.elm'],outputFolder: 'web/static/js',outputFile: 'elm.js',makeParameters: ['--warn']}},modules: {autoRequire: {"js/app.js": ["web/static/js/app"]}},paths: {watched: ["web/elm","web/static","test/static"],public: "priv/static"},files: {javascripts: {joinTo: "js/app.js",},templates: {joinTo: "js/app.js"}},
file layout for your elm files relative to root of project: elm-package.json is in the project root, elm files are in web/elm
Operating System - Windows 10 (it could very well be its filesystem at fault, and if so then it should sleep and test until it is finished saving until it lets brunch compile it all together).
The text was updated successfully, but these errors were encountered:
Yes there have been a couple of different issues related to this. I am not sure they will ever be a perfect solution to this, but one way that might work is to wait (async) for the elm to finish, then read the resulting js file and pass it on from the compilation step, instead of relying on brunch reading the output of elm compiler.
Ah, so setting it up as a brunch compiler instead of a pre-processing step, that might work yeah. Just remember that at least on Windows the file it unreadable for up to a few seconds after elm finishes while windows finishes writing it to disk. This might be the main cause of brunch not picking up the new changes properly actually, but if the elm compiler could output to a file and to stdout (or just to stdout and you write the file out) then that should sidestep the issue well.
I am having the elm-brunch plugin compile a variety of main apps into a single file, which is output to a brunch watched directory of other javascript, which then all gets compiled into one single javascript file. However brunch does not seem to pick up on Elm changes immediately as it seems to start compiling while Elm does and Elm finishes writing 'after' Brunch has already started compiling the files, so I have to save a file twice with ten seconds or so between them to have it compile twice.
Information
The text was updated successfully, but these errors were encountered: