Skip to content

bryanspears/kraken-devtools-browserify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kraken-devtools-browserify

Browserify plugin for kraken-devtools

Usage

Install:

$ npm install --save-dev kraken-devtools-browserify

Add:

"browserify": {
    "module": "kraken-devtools-browserify",
    "files": "/js/**/*.js"
}

to your kraken development configuration (config/development.json) under middleware.devtools.module[name=kraken-devtools].arguments.

Should look like this:

"middleware": {
    ...

    "devtools": {
        ...

        "module": {
            "name": "kraken-devtools",
            "arguments": [
                ...
                {
                    ...
                    "css": {
                        "module": "kraken-devtools/plugins/less",
                        "files": "/css/**/*.css"
                    },

                    "browserify": {
                        "module": "kraken-devtools-browserify",
                        "files": "/js/**/*.js"
                    },

                    "copier": {
                        "module": "kraken-devtools/plugins/copier",
                        "files": "**/*"
                    }
                }
            ]
        }
    }
}

option transform

Type: [String] or [[String, Object]]

Specifies a pipeline of modules through which the browserified bundle will be run. The transform is a string referring to a NPM module. The browserify docs themselves explain transform well, but below is an example of transform used with kraken-devtools-browserify to automatically compile coffeescript files for use in a bundle:

"browserify": {
    "module": "kraken-devtools-browserify",
    "files": "/js/**/*.js",
    "transform": ["coffeeify"]
}

Transforms can also be provided with an options hash; in this case, the transform should be specified as an array of [transformStringOrFn, optionsHash].

About

Browserify plugin for kraken-devtools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%