Giter VIP home page Giter VIP logo

ferdi's People

Contributors

dependabot[bot] avatar gisu avatar martinherweg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gisu

ferdi's Issues

Add correct prefix in SASS/HTML template files according to the flag/type

// Modul
.m-<%= moduleName.replace('-', '_') %>  {
}

The m should be the flag/type of the created module. If i create a atom with -a flag, then it should be named .a-Name etc. The same for the html templates. There should be the flag/type variable available.

Quick-Fix:
<%= pathOptions.key.charAt(0) %>-<%= moduleName.replace('-', '_') %>

Template Variations

Allow Template variations maybe as addition to the flag with --variationName.

Add "flat" option

Add an option that creates a new component in the specified component folder itself and not in an folder named like the component.

ferdi init doesn't work

Installed the script locally in the project.

→ ferdi init
zsh: command not found: ferdi

Register Flags to use Variants

const pkg = require('./package');

module.exports = {
  defaults: {
    config: false,
    scss: true,
    twig: true,
    basicJs: true,
    basicScss: true,
    basicTwig: true,
    basicVue: true,
  },
  fileHeader: {
    author: pkg.author,
    projectName: pkg.name,
  },
  files: {
    twig: {
      name: '_template',
      postfix: '',
      extension: 'twig',
    },
    basicTwig: {
      name: 'variant-basic/_template',
      postfix: '',
      extension: 'twig',
    },
    scss: {
      name: '_style',
      postfix: '',
      extension: 'scss',
    },
    basicScss: {
      name: 'variant-basic/_style',
      postfix: '',
      extension: 'scss',
    },
    basicJs: {
      name: 'variant-basic/_script',
      postfix: '',
      extension: 'js',
    },
    basicVue: {
      name: 'variant-basic/_component',
      postfix: '',
      extension: 'vue',
    },
    config: {
      name: 'config',
      postfix: '',
      extension: 'php',
    },
  },
  paths: {
    templateBase: 'src/ferdi/',
    modulePath: 'src/templates/',
    pathOptions: {
      // the first character of each key works as an alias for the path so you could use `-a` as an alias for atomic
      atoms: '_atoms/',
      molecules: '_molecules/',
      organisms: '_organisms/',
    },
  },
};

das variant-basic müsste dann zu varian-${variant} werden. Ferdi sollte dann so aussehen:

ferdi image -a
erstellt laut config:

atoms/image/variant-basic/_component.vue
atoms/image/variant-basic/_script.js
atoms/image/variant-basic/_style.scss
atoms/image/variant-basic/_template.twig
atoms/image/_style.scss
atoms/image/_template.twig

ferdi image -a --variant=foo sollte dann das hier erstellen:

atoms/image/variant-foo/_component.vue
atoms/image/variant-foo/_script.js
atoms/image/variant-foo/_style.scss
atoms/image/variant-foo/_template.twig

Not working 0.0.6 — 0.0.8

Reinstalled global
Reinstalled within the project

When I do ferdi foo -m nothing happens
image

And Global when I do ferdi --help

# dh at davidhellmann.local in ~ [23:26:50]
→ ferdi --help
assert.js:43
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: missing path
    at Module.require (module.js:515:3)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/dh/.nvm/versions/node/v8.4.0/lib/node_modules/ferdi/src/createModule.js:22:13)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.