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

Can't find layout inside config #7

Closed
weedgrease opened this issue Nov 15, 2016 · 1 comment
Closed

Can't find layout inside config #7

weedgrease opened this issue Nov 15, 2016 · 1 comment
Labels

Comments

@weedgrease
Copy link

Hey there,
Thanks for your hard work on this project 😄

I've placed the following in my ~/.hyperlayout file:

{
  "name": "example-2",
  "hyperlayout": {
      "start": [
        [[
          "npm run watch",
          ["npm run serve", "http://localhost:3000"]
        ]]
      ],
      "helloworld": {
        "entry": "horizontal",
        "layout": [
          "echo 'Hello'",
          "echo 'World'"
        ]
      }
  }
}

I get the following error: Can't find layout inside config. I looked through the source and it's looking for config.layout. Your examples don't reflect that particular JSON object is necessary. Is my JSON incorrect for leaving inside ~/.hyperlayout? I've tried all of your other basic examples and get the same errors on all of them.

@timolins
Copy link
Owner

Thanks for letting me know!

The problem here is, that you defined it like package.json and not in the correct .hyperlayout style. The same example would look like this:

{
  "start": [
    [[
      "npm run watch",
      ["npm run serve", "http://localhost:3000"]
    ]]
  ],
  "helloworld": {
    "entry": "horizontal",
    "layout": [
      "echo 'Hello'",
      "echo 'World'"
    ]
  }
}

And since the preset default isn't defined, running hyperlayout will do nothing. You have to select which one you want, for example:

$ hyperlayout helloworld

I hope this is a bit more clear now. There is is still documentation missing on that topic, I will close this issue when I explained it a bit further in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants