Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 1.83 KB

README.md

File metadata and controls

59 lines (50 loc) · 1.83 KB

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": "[email protected]"
	}
}
  • write 3 more tests ("action not perfection")

Sincerely Yours,

Karlis ☝