Closed
Description
I use config.json
for other settings, it would be nice to have these under a namespace. I've got a local integration I've done where I did the following:
{
"app": {
"directories": {
"scripts": {
"source": "source/scripts",
"target": "public/scripts",
"tasks": ["cp:scripts"]
},
"styles": {
"source": "source/styles",
"target": "public/styles",
"tasks": ["cp:styles"]
},
"images": {
"source": "source/images",
"target": "public/images",
"tasks": ["cp:images"]
},
"fonts": {
"source": "source/fonts",
"target": "public/fonts",
"tasks": ["cp:fonts"]
}
}
},
"lab": {
"patterns" : {
"source" : "source/patterns",
"public" : "public/patterns"
},
"data" : {
"source" : "source/data",
"public" : "public/data"
},
"ignored-extensions" : ["scss", "DS_Store", "less"],
"ignored-directories" : ["scss"],
"debug": false,
"ishControlsVisible": {
"s": true,
"m": true,
"l": true,
"full": true,
"random": true,
"disco": true,
"hay": true,
"mqs": true,
"find": true,
"views-all": true,
"views-annotations": true,
"views-code": true,
"views-new": true,
"tools-all": true,
"tools-sync": true,
"tools-shortcuts": true,
"tools-docs": true
},
"patternStates": {
},
"patternExportKeys": [],
"patternExportDirectory": "./pattern_exports/",
"baseurl" : "patterns"
}
}
I had to modify patternlab.js, but this worked out well since I was able to make the pattern/data directories more variable too (which they didn't actually appear to be before).
I'm potentially thinking about doing a pull request with this, but I wanted to run by whether or not you'd be willing to accept a pull request that changes the config in this manner since it could break BC unless someone went in and namespaced their old config. I could make it so that it look for lab and if not there falls back to the full config.