[Pkg-javascript-commits] [node-raw-loader] 01/02: Import Upstream version 0.5.1

Daniel Ring techwolf-guest at moszumanska.debian.org
Sun Jun 4 00:39:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

techwolf-guest pushed a commit to branch master
in repository node-raw-loader.

commit 1126f323a518c71a436ffdbdc00fe9c60a6b2827
Author: Daniel Ring <dring at wolfishly.me>
Date:   Sat Jun 3 17:18:30 2017 -0700

    Import Upstream version 0.5.1
---
 README.md    | 15 +++++++++++++++
 index.js     | 10 ++++++++++
 package.json | 16 ++++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..40ef895
--- /dev/null
+++ b/README.md
@@ -0,0 +1,15 @@
+# raw loader for webpack
+
+## Usage
+
+``` javascript
+var fileContent = require("raw!./file.txt");
+// => returns file.txt content as string
+```
+
+Don't forget to polyfill `require` if you want to use it in node.
+See `webpack` documentation.
+
+## License
+
+MIT (http://www.opensource.org/licenses/mit-license.php)
\ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..572a7a8
--- /dev/null
+++ b/index.js
@@ -0,0 +1,10 @@
+/*
+	MIT License http://www.opensource.org/licenses/mit-license.php
+	Author Tobias Koppers @sokra
+*/
+module.exports = function(content) {
+	this.cacheable && this.cacheable();
+	this.value = content;
+	return "module.exports = " + JSON.stringify(content);
+}
+module.exports.seperable = true;
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1b92fad
--- /dev/null
+++ b/package.json
@@ -0,0 +1,16 @@
+{
+	"name": "raw-loader",
+	"version": "0.5.1",
+	"author": "Tobias Koppers @sokra",
+	"description": "raw loader module for webpack",
+	"repository": {
+		"type": "git",
+		"url": "git at github.com:webpack/raw-loader.git"
+	},
+	"licenses": [
+		{
+			"type": "MIT",
+			"url": "http://www.opensource.org/licenses/mit-license.php"
+		}
+	]
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-raw-loader.git



More information about the Pkg-javascript-commits mailing list