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

config file syntax proposal #11

Open
mauritslamers opened this issue Apr 30, 2014 · 3 comments
Open

config file syntax proposal #11

mauritslamers opened this issue Apr 30, 2014 · 3 comments

Comments

@mauritslamers
Copy link
Member

Currently, there are two separate syntax models used in the config files:

BT.addFramework(BT.Framework.extend({
  path: "path/to/framework"
})

and

var myApp = BT.AppBuilder.create({
  name: "myApp",
  frameworks: ['myAppFw']
});

I think it would be nice to have a single syntax model, which would not exclude the options mentioned above but add to them:

BT.addFramework({
  ref: 'myframework'
  path: 'frameworks/myframework'
});
BT.addTheme({
  ref: 'mytheme',
  path: 'themes/mytheme'
});
BT.addApp({
  name: 'myApp',
  path: 'apps/my_app',
  theme: 'mytheme'
});

Thoughts?

@topherfangio
Copy link
Contributor

Can you discuss the difference between the ref and name parameters? Unless there is a very good reason not to, I would make those the same.

@topherfangio
Copy link
Contributor

Any more thoughts on this, or any discussion we can have that will help move this forward?

@mauritslamers
Copy link
Member Author

The difference is that a ref translates to a path, and a name to an url.
As an example: sproutcore:runtime refers to a path frameworks/sproutcore/frameworks/runtime, where the name of an app is used only to decide at what url in the dev-server things are going to be served, as well as the directory name the app will be built at.

The reason is that when an app requires a framework, the ref can be used to search for the framework if a class with this ref doesn't yet exist.

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

No branches or pull requests

2 participants