francescomari/grunt-sling-content — pull request #9 by bpauli (2013-08-26 16:20:44+00:00)
Title: create normal nodes with sling content import feature

In some situations you have only one json file that represent nested node type definitions. For instance when you define an edit config in CQ

```json
{
"sling:resourceSuperType": "/apps/bpauli/components/global/parbase",
"jcr:primaryType": "cq:Component",
"jcr:title": "Text with Image",
"componentGroup": "Text",

"cq:editConfig": {
"jcr:primaryType": "cq:EditConfig",
"cq:layout": "editbar",
"cq:actions": [
"text:m129_pagebreak",
"-",
"edit","-","copymove","delete","-","insert"
],
"cq:listeners": {
"afterinsert": "bpauli.base.Util.refreshAjaxContentAfterInsert",
"afteredit": "bpauli.base.Util.refreshAjaxContentAfterEdit"
}
},

"dialog": {
"jcr:primaryType": "cq:Dialog",
"xtype": "dialog",
"helpButton": {"xtype": "bpauli.base.dialog.helpbutton"},

"items": {
"jcr:primaryType": "cq:Widget",
"xtype": "panel",

"items": {
"jcr:primaryType": "cq:WidgetCollection",

"include": {
"jcr:primaryType": "cq:Widget",
"xtype": "cqinclude",
"path": "/apps/bpauli/components/global/include/noprops.infinity.json"
}

}

}
}
}
```

To create nested nodes with one json file the content import feature of sling can be used.

Sling-Doc:
http://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#importing-content-structures