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

NamingConvention and defaultLayer #304

Open
5 tasks
qfox opened this issue Apr 11, 2018 · 0 comments
Open
5 tasks

NamingConvention and defaultLayer #304

qfox opened this issue Apr 11, 2018 · 0 comments

Comments

@qfox
Copy link
Member

qfox commented Apr 11, 2018

Knowledge of defaultLayer should not be a part of "naming.cell.match" package.
Can we write some sort of convention normalizer?

Feels like it can be a container with normalization functions like Cell, EntityName, etc.

This container should check and resolve fields for naming, fs delims, and anything else we use in naming presets:

  • fsDelims:
    const dElem = 'elem' in dd ? dd.elem : (delims.elem || '__');
    const dMod = 'mod' in dd ? dd.mod : (Object(delims.mod).name || (typeof delims.mod === 
    'string' && delims.mod) || '_');
  • asserts:
    assert(conv.fs && typeof conv.fs.pattern === 'string',
  • knowledge about defaultLayer and common (?)
    const layer = conv.fs.defaultLayer || 'common';
          pathStringify({
              layer: cell.layer || 'common',
              tech: cell.tech,
              entity: schemeStringify(cell.entity) + entityStringify(cell.entity)
          }));
  • defaults in cell.match:
    const buildPathParseMethod = ({ fs: { pattern, delims: dd = {}, scheme = 'nested' }, delims, wordPattern: wp = ALPHANUM_RE }) => {
  • Pull in path parsers and builders for schemes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment