0.0.1 • Published 10 years ago

gwm-components v0.0.1

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

gulp-web-modules plugin which will assign individual components from a components directory

Usage

If you include a components directory within any section, all files within that directly will be included as global entries to "Components" with a key matching the file name.

    {project root}
    |-- {section name}
        |-- components
            |-- foo.js
// foo.js
{abc: "def"}
// component access
var component = Components.foo;
console.log(component.def);

This is a silly example and is intended for use with creating individual react.js components

Install

Add this plugin to the gulp-web-module reference in your gulpfile

    var gulpWebModules = require('gulp-web-modules'),
        gwmComponents = require('gwm-components');

    gulpWebModules({
      plugins: [
        gwmComponents(options)
      ]
    }).injectTasks(gulp);