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

Remove groups, use import statements #30

Open
3rd-Eden opened this issue Jul 5, 2012 · 0 comments
Open

Remove groups, use import statements #30

3rd-Eden opened this issue Jul 5, 2012 · 0 comments

Comments

@3rd-Eden
Copy link
Member

3rd-Eden commented Jul 5, 2012

Groups make the internal square code really complex because you needed to be able to generate different files based on the groups key. So you could re-use your base files in a new file without having to re-specify those.

We came up with an alternate solution to this, that would keep our code base lean. Remove groups, in favor of different square.json files for each distribution. In addition to this we will allow a new set of keys in the square.json file:

{
   "configuration": {
       // if you specify an array in the configuration section we will find those files, and merge the bundle key with this file
       // this way can create one "main" file and import it in every square.json file you want. This can be useful for configuration
       // etc
       "import": ["square.json", "other.json"]
   },
  "bundle": {
       // in addition to configuration option we will now allow strings to be set in the bundle. The key is the filename you want
       // import and the value is an `@import` statement that will get the file definition from the supplied `square.json` file.
       // this allows you to import single files from other square.json files
       "filename.js": "@import square.json"
   }
}

The only downside is that it adds more "files" to your project, but so be it.

3rd-Eden added a commit that referenced this issue Jul 17, 2012
…orting #30 as eson

already supports including of files. A nice addition to this is that it also supports glob
for files, so no need to make that happen for us as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant