component-library-core

1.0.11 • Public • Published

Build Status Coverage Status

Component Library Generator core

It does the dirty job. From src folder it takes each .twig template file and by adding

  • description (.md optional),
  • test data (.json optional),
  • style (.scss optional)
  • javascript (.js optional)
  • demo (.demo.twig optional) (thanks to @davbizz ) generates beautiful preview

Component Preview

Usage

This is how it is used in Gulp.

gulp.task('styleguide', function (done) {
  styleguide({
    location: {
      root: '/',
      src: 'src/components/',
      dest: 'dest/components/'
    },
    extensions: {
      template: '.twig'
    }
  })
  done()
})

Develping

  • Clone the github project in a new directory git clone https://github.com/karlisup/component-library-core
  • Install npm dependencies npm install
  • Create a global link to the module npm link
  • Create a new project otside the compnent-library-core project
  • Install compnent-library-core in the new project npm install component-library-core
  • Set te link to the local project npm link component-library-core

TODO

This is work in progress. It lacks

  • real documentation
  • .tt template support (important in ongoing project)
  • option to pass JSON test data width data@
{"sidebar": {
    "title": "Some title",
        "navigation": "data@pathToNavigation.json"
    }
}
  • write 3 more tests ("action not perfection")

Sincerely Yours,

Karlis ☝

Package Sidebar

Install

npm i component-library-core

Weekly Downloads

4

Version

1.0.11

License

MIT

Last publish

Collaborators

  • karlisup