Skip to content

b1zzu/component-library-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ☝

About

Flexible component library generator core.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • HTML 0.2%