An open API service indexing awesome lists of open source software.

https://github.com/rstuven/curlyfy-loader

curlyfy loader module for webpack
https://github.com/rstuven/curlyfy-loader

javascript loader webpack

Last synced: 11 months ago
JSON representation

curlyfy loader module for webpack

Awesome Lists containing this project

README

          

curlyfy-loader
==============

[![dependencies Status](https://david-dm.org/rstuven/curlyfy-loader.svg)](https://david-dm.org/rstuven/curlyfy-loader#info=dependencies)

> Add curly brackets to a whitespace indented module using [curlyfy](https://github.com/rstuven/curlyfy);

EXPERIMENTAL: Use at your own risk!
-----------------------------------

Install
-------

``` shell
npm install --save-dev curlyfy-loader
```

Usage
-----

It should be used in tandem with a curly language loader:

``` javascript
var jsmodule = require("babel!curlyfy!./module.js.noncurly");
var tsmodule = require("typescript!curlyfy!./module.ts.noncurly");
```

Or within the webpack config:

``` javascript
module: {
loaders: [
{ test: /\.js\.noncurly$/, exclude: /node_modules/, loader: 'babel!curlyfy'},
{ test: /\.ts\.noncurly$/, exclude: /node_modules/, loader: 'typescript!curlyfy'}
]
}
```

and then require normally:

``` javascript
var jsmodule = require("./module.js.noncurly");
var tsmodule = require("./module.ts.noncurly");
```

See webpack docs: [Using loaders](http://webpack.github.io/docs/using-loaders.html)

Options
-------

See the [curlyfy options](https://github.com/rstuven/curlyfy#options)

License
-------

MIT (http://www.opensource.org/licenses/mit-license.php)