coffee-loader
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -11,3 +11,3 @@ /* | ||
var jsRequest = loaderUtils.getCurrentRequest(this); | ||
var query = loaderUtils.parseQuery(this.query); | ||
var query = loaderUtils.getOptions(this) || {}; | ||
var result; | ||
@@ -44,2 +44,1 @@ try { | ||
} | ||
module.exports.seperable = true; |
{ | ||
"name": "coffee-loader", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "coffee loader module for webpack", | ||
"dependencies": { | ||
"loader-utils": "0.2.x" | ||
"loader-utils": "^1.0.2" | ||
}, | ||
@@ -9,0 +9,0 @@ "peerDependencies": { |
159
README.md
@@ -1,30 +0,151 @@ | ||
# coffee-script loader for webpack | ||
[![npm][npm]][npm-url] | ||
[![node][node]][node-url] | ||
[![deps][deps]][deps-url] | ||
[![tests][tests]][tests-url] | ||
[![coverage][cover]][cover-url] | ||
[![chat][chat]][chat-url] | ||
## Usage | ||
<div align="center"> | ||
<img width="160" height="160" | ||
src="https://cdn.worldvectorlogo.com/logos/coffeescript.svg"> | ||
<a href="https://github.com/webpack/webpack"> | ||
<img width="200" height="200" hspace="20" | ||
src="https://webpack.js.org/assets/icon-square-big.svg"> | ||
</a> | ||
<h1>Coffee Loader</h1> | ||
</div> | ||
``` javascript | ||
var exportsOfFile = require("coffee!./file.coffee"); | ||
// => return exports of executed and compiled file.coffee | ||
<h2 align="center">Install</h2> | ||
var exportsOfFile2 = require("coffee?literate!./file.litcoffee"); | ||
// can also compile literate files. | ||
```bash | ||
npm install --save-dev coffee-loader | ||
``` | ||
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html) | ||
<h2 align="center">Usage</h2> | ||
### Recommended configuration | ||
``` javascript | ||
{ | ||
module: { | ||
loaders: [ | ||
{ test: /\.coffee$/, loader: "coffee-loader" }, | ||
{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" } | ||
] | ||
} | ||
```js | ||
import coffee from 'coffee-loader!./file.coffee'; | ||
``` | ||
### Configuration (recommended) | ||
```js | ||
import coffee from 'file.coffee'; | ||
``` | ||
**webpack.config.js** | ||
```js | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.coffee$/, | ||
use: [ 'coffee-loader' ] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
## License | ||
<h2 align="center">Options</h2> | ||
MIT (http://www.opensource.org/licenses/mit-license.php) | ||
|Name|Default|Description| | ||
|:--:|:-----:|:----------| | ||
|**`literate`**|`false`|Enable CoffeeScript in Markdown (Code Blocks) e.g `file.coffee.md`| | ||
|**`sourceMap`**|`false`|Enable/Disable Sourcemaps| | ||
### [Literate](http://coffeescript.org/#literate) | ||
**webpack.config.js** | ||
```js | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.coffee.md$/, | ||
use: [ | ||
{ | ||
loader: 'coffee-loader', | ||
options: { literate: true } | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
### Sourcemaps | ||
**webpack.config.js** | ||
```js | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.coffee$/, | ||
use: [ | ||
{ | ||
loader: 'coffee-loader', | ||
options: { sourceMap: true } | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
<h2 align="center">Maintainer</h2> | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/166921?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/bebraw">Juho Vepsäläinen</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars2.githubusercontent.com/u/8420490?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/d3viant0ne">Joshua Wiens</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/533616?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/SpaceK33z">Kees Kluskens</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/3408176?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/TheLarkInn">Sean Larkin</a> | ||
</td> | ||
</tr> | ||
<tbody> | ||
</table> | ||
[npm]: https://img.shields.io/npm/v/coffee-loader.svg | ||
[npm-url]: https://npmjs.com/package/coffee-loader | ||
[node]: https://img.shields.io/node/v/coffee-loader.svg | ||
[node-url]: https://nodejs.org | ||
[deps]: https://david-dm.org/webpack/coffee-loader.svg | ||
[deps-url]: https://david-dm.org/webpack/coffee-loader | ||
[tests]: http://img.shields.io/travis/webpack/coffee-loader.svg | ||
[tests-url]: https://travis-ci.org/webpack/coffee-loader | ||
[cover]: https://coveralls.io/repos/github/webpack/coffee-loader/badge.svg | ||
[cover-url]: https://coveralls.io/github/webpack/coffee-loader | ||
[chat]: https://badges.gitter.im/webpack/webpack.svg | ||
[chat-url]: https://gitter.im/webpack/webpack |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6876
5
152
1
+ Addedbig.js@5.2.2(transitive)
+ Addedemojis-list@3.0.0(transitive)
+ Addedjson5@1.0.2(transitive)
+ Addedloader-utils@1.4.2(transitive)
+ Addedminimist@1.2.8(transitive)
- Removedbig.js@3.2.0(transitive)
- Removedemojis-list@2.1.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedloader-utils@0.2.17(transitive)
- Removedobject-assign@4.1.1(transitive)
Updatedloader-utils@^1.0.2