Right now, project.compile() returns an array containing the webpack compiler and a uuid associated with its particular compile run, so it can be associated with the event return if multiple compiles happen quickly. The compile event, however, returns an object like { id: 'xxx', stats: {} }.
The original reason for returning the array was that it could be cleanly destructured, but it's just as easy to destructure an object, and a more clear output when not destructured, so I think we should switch over. This would be a breaking change, but mostly for tests that directly utilize spike-core at this point, the cli could be smoothly upgraded without any notice to users.
Right now,
project.compile()
returns an array containing the webpack compiler and a uuid associated with its particular compile run, so it can be associated with the event return if multiple compiles happen quickly. Thecompile
event, however, returns an object like{ id: 'xxx', stats: {} }
.The original reason for returning the array was that it could be cleanly destructured, but it's just as easy to destructure an object, and a more clear output when not destructured, so I think we should switch over. This would be a breaking change, but mostly for tests that directly utilize spike-core at this point, the cli could be smoothly upgraded without any notice to users.