coffee-loader
Advanced tools
+20
| Copyright JS Foundation and other contributors | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of this software and associated documentation files (the | ||
| 'Software'), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, | ||
| distribute, sublicense, and/or sell copies of the Software, and to | ||
| permit persons to whom the Software is furnished to do so, subject to | ||
| the following conditions: | ||
| The above copyright notice and this permission notice shall be | ||
| included in all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
+1
-2
@@ -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; |
+2
-2
| { | ||
| "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": { |
+140
-19
@@ -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 |
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
6876
128.59%5
25%152
390.32%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated