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

Make COMPONENT_CATEGORIES constant a setting #186

Closed
xavez opened this Issue Jan 10, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@xavez
Copy link
Contributor

xavez commented Jan 10, 2018

Use case: say you import a library that is not bootstrap, for instance Foundation, and it is prefixed f-, there is no easy way to define that in the settings file.

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

@xavez does this commit solve this problem? So we don't make it complicated when it doesn't need to be :)

@xavez

This comment has been minimized.

Copy link
Contributor

xavez commented Jan 11, 2018

Not really, the problem is that there are many more namespaces libraries out there than we can hardcode. For instance this one for Flanders: https://overheid.vlaanderen.be/webuniversum/versies/2.4.0

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

I thought about this and it's probably very easy to make this a setting. Cc @thomastuts

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

@xavez I worked on this it turned out to be quite easy.

6ddb6ca

@xavez

This comment has been minimized.

Copy link
Contributor

xavez commented Jan 11, 2018

@Wolfr tested it and works great!

Should we start documenting things on the Wiki when we add features like these? I’d be happy to do so.

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

At this point in time, fixes are documented in the release notes and when big enough on the blog https://bedrock.mono.company/blog/ . The wiki is not used a lot.

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

So when this lands in master, it will just be in the release notes. We can later on add this to the Bedrock documentation.

@Wolfr

This comment has been minimized.

Copy link
Contributor

Wolfr commented Jan 11, 2018

This landed in the core, so you can just run bedrock upgrade to use it.

Here is the default config file.

module.exports = {
  styleguide: {
    snippetLanguage: 'html',
    colors: './content/scss/_settings.colors.scss',
    categoryOrder: [
      'Style guide',
      'Patterns',
      'Overviews',
      'Components',
    ],
    componentCategories: {
      b: 'Bootstrap additions',
      f: 'Foundation additions',
      bc: 'Bootstrap custom components',
      fc: 'Foundation custom components',
      br: 'Bedrock components',
      c: 'Custom components'
    }
  },
  ui: {
    dark: false
  },
  icons: {
    generateIconFont: false,
    hasSvgIcons: true
  },
  pug: {
    pretty: true,
    basedir: "./content"
  },
  prettify: {
    logSuccess: false,
    indentSize: 2,
    unformatted: ['pre', 'textarea'],
    extraLiners: ['body']
  },
};

@xavez xavez closed this Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment