Skip to content

Conversation

@tburny
Copy link

@tburny tburny commented Feb 24, 2017

Addresses #628 StarterKits should be able to override settings in patternlab-config.json

Summary of changes:

  1. read starterkit-config.json
  2. Deep merge into patternlab-config.json. Existing object keys are overwritten, including array values.
  3. Save result to patternlab-config.json

@bmuenzenmeyer bmuenzenmeyer self-assigned this Feb 27, 2017
@bmuenzenmeyer
Copy link
Member

I fear I may have misdirected your work on this one @tburny

You can see here how this value is used on the frontend: https://github.com/pattern-lab/styleguidekit-assets-default/search?utf8=%E2%9C%93&q=patternExtension

To me, it makes a lot more sense to have the patternengine potentially set this value, if anything. In a user's workflow, it feels like the engine provided more utility over the starterkit in dictating a change to this value, if anything (it's likely a one-time edit).

Are there other keys that you can envision a starterkit needing to overwrite/merge upon installation?

@tburny
Copy link
Author

tburny commented Mar 3, 2017

Are there other keys that you can envision a starterkit needing to overwrite/merge upon installation?

Just to be clear what the vision is: A 10 seconds PL setup. As a user, I first choose a plain PL or Gulp/Grunt edition (Side note: The default PL config differs between the two!). Then I'll choose a starter kit and load it.
Each starter kit could come in different flavours:

  • Different template engine (template extension)
  • Different source paths (e.g. javascript instead of js, img instead of images, etc.)
  • Different pattern group naming ( e.g. dna, cell, organism) resulting in other names for styleguideExcludes
  • Using LESS instead of SASS: ignored-directories: ["less"]

I think the StarterKit should have the flexibility to meet a user's desires, that is to ship with the configuration required to run it :) Also, if you have 3 pattern engines installed, with mustache being already installed as part of PL, how would you determine the patternExtension required for a certain StarterKit?

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

Successfully merging this pull request may close these issues.

3 participants