scalacenter / scalajs-bundler

https://scalacenter.github.io/scalajs-bundler
Other
237 stars 101 forks source link

Updating cookbook on how to use list of assets to build a zip file. #262

Closed atooni closed 6 years ago

atooni commented 6 years ago

I had to search through a few docs to get this information into my build.sbt. It might be nice to have an example all in one place.,

Also the mappings must be added to Universal/packageBin, not Compile/packageBin.

cquiroz commented 6 years ago

Thanks for updating the documentation. This seems very useful

@julienrf WDYT?

atooni commented 6 years ago

Hi Julien, thanks for your comments. The code snippets I have used in the docs are actually coming from my own project where I have used the solution I contributed to package up my ScalaJS application. Are you asking to create an example in scalajs-bundler itself and use the example from there ? I could have a look if that can be achieved easily and then also extend the text a bit.

julienrf commented 6 years ago

Are you asking to create an example in scalajs-bundler itself and use the example from there ?

Yes, that’s the idea. You can see how it is achieved in the other sections of the cookbook: you can create empty code snippets having an src attribute pointing to a relative path:

~~~ scala src=../../../sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing/build.sbt#relevant-settings
~~~
atooni commented 6 years ago

I can have a look, it's a bit more involved than what I had in mind originally by just adding a few lines to the docs.

atooni commented 6 years ago

Hi, I have now added an example for my cookbook update to the testcases and also updated the cookbook with the relevant information.

julienrf commented 6 years ago

Thanks for your patience @atooni!

atooni commented 6 years ago

Thanks for merging