Skip to content

Make demos self-encapsulated #11

@leoj3n

Description

@leoj3n

If you have a demo like:

https://github.com/canjs/canjs/blob/master/demos/can-stache-bindings/event-args.html

It is using whatever steal is in the root node_modules (two levels up).

I think it would be better if demos with dependencies had their own node_modules and package.json, with locked-down versions.

Kind of like how you can add dependencies to the html hook that bit-docs-generate-html will automatically install (using enpeem under the hood):

https://github.com/canjs/bit-docs-html-canjs/blob/master/make-example.js#L17-L19

So, probably bit-docs-tag-demo could detect an package.json and run enpeem on it.

It would be good to have the versions of the dependencies the demo relies on locked down, to avoid inadvertently breaking demos when upgrading top-level dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions