Skip to content

Conversation

@tejaede
Copy link

@tejaede tejaede commented Feb 27, 2020

The goal of this template is to quickly stub a prototype application for a single component. This template adheres to the standard montage pattern of creating a .info directory as a direct sibling of its associated component.

Example

Component Command Output
ui/list-item.reel minit create:sample -n list-item ui/list-item.info
ui/button/custom-button.reel minit create:sample -n custom-button -d ui/button ui/button/custom-button.info

Structure
The output is based on the app.js template with a few key differences:

  1. test and run-tests.html are removed
  2. The package dependencies are replaced with mappings back to montage and the main package.
{
    "name": "list-item-sample",
    "version": "0.1.0",
    "description": "sample",
    "mappings": {
        "montage": "../../../node_modules/montage",
        "acme-framework": "../../../"
    }
}
  1. The montageVersion component serialized in ui/main.reel is replaced with an instance of the component being prototyped.
        {
            "owner": {
                "values": {
                    "element": {"#": "main"}
                }
            },

            "listItem": {
                "prototype": "acme-framework/ui/list-item.reel",
                "values": {
                    "element": {"#": "listItem"}
                }
            }
        }

@tejaede tejaede requested a review from marchant February 27, 2020 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant