Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template for sample .info applications #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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