Closed leoj3n closed 6 years ago
@m-mujica do you remember why assign is needed here? We don't understand why.
I'm not 100% sure but I think that's just collecting the theme dependencies so the package.json used to create the final build has all dependencies listed?
Each theme/plugin needs to registers its own dependencies so during build time those are installed and loaded correctly through steal.
So it makes sense to me that the error happens if you remove that assign, bit-docs-donejs-theme depends on CanJS.
I bet if you look at t he package.json in the static/{hash} folder when the assign is removed, can
won't be listed as a dependency.
I take that back, it probably is a dependency since steal "knows" its version can@2.3.28#view/stache/system
To fix this issue you need to make sure the stache
file extension is set to load can/view/stache/system
.
In the package.json inside of the static/{hash} folder, the steal object should look like
steal: {
"plugins": [
"steal-less", // when I checked this one is generated fine
"can" // this one needs to be added by bit-docs-generate-html
]
}
Yes thank you very much @m-mujica.
Adding "can"
to html.package.steal.plugins
in donejs/donejs
allows us to use bit-docs-generate-html@0.8.0
in donejs/donejs
:
https://github.com/donejs/donejs/pull/1030
And then that let's us get rid of the overkill assign
:
https://github.com/donejs/bit-docs-donejs-theme/pull/66
Once those are merged this can be closed!
Note: #66 still needs to be merged.
For that assign statement:
https://github.com/donejs/bit-docs-donejs-theme/blob/f3f30e4b7f5bd08542e4f340e3be17272d8ced50/bit-docs.js#L11
If removed before generating the DoneJS website, the following error happens:
Haven't seen any other plugins do this kind of assignment to the dependencies object.
Why is the
assign
necessary here?