@rushstack/loader-raw-script 1.4.8 → 1.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/lib/RawScriptLoader.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# @rushstack/loader-raw-script
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
`npm install @rushstack/loader-raw-script --save-dev`
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
This simple Webpack loader loads a script file's contents directly in a webpack bundle using an `eval(...)`.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
|
|
14
|
-
|
|
15
|
-
``` javascript
|
|
16
|
-
require("@rushstack/loader-raw-script!path/to/script.js");
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Links
|
|
20
|
-
|
|
21
|
-
- [CHANGELOG.md](
|
|
22
|
-
https://github.com/microsoft/rushstack/blob/main/webpack/loader-raw-script/CHANGELOG.md) - Find
|
|
23
|
-
out what's new in the latest version
|
|
24
|
-
|
|
25
|
-
`@rushstack/loader-raw-script` is part of the [Rush Stack](https://rushstack.io/) family of projects.
|
|
1
|
+
# @rushstack/loader-raw-script
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
`npm install @rushstack/loader-raw-script --save-dev`
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This simple Webpack loader loads a script file's contents directly in a webpack bundle using an `eval(...)`.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
|
|
14
|
+
|
|
15
|
+
``` javascript
|
|
16
|
+
require("@rushstack/loader-raw-script!path/to/script.js");
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Links
|
|
20
|
+
|
|
21
|
+
- [CHANGELOG.md](
|
|
22
|
+
https://github.com/microsoft/rushstack/blob/main/webpack/loader-raw-script/CHANGELOG.md) - Find
|
|
23
|
+
out what's new in the latest version
|
|
24
|
+
|
|
25
|
+
`@rushstack/loader-raw-script` is part of the [Rush Stack](https://rushstack.io/) family of projects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawScriptLoader.js","sourceRoot":"","sources":["../src/RawScriptLoader.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,2BAAyB;AAEzB,MAAM,QAAQ,GAAgC,CAAC,OAAe,EAAE,EAAE;IAChE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAExC,MAAM,KAAK,GAAa;QACtB,sBAAsB;QACtB,WAAW,OAAO,KAAK;QACvB,mDAAmD;KACpD,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,QAAG,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,iBAAS,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { EOL } from 'os';\n\nconst loaderFn: (content: string) => string = (content: string) => {\n content = content.replace(/\\\\/g, '\\\\\\\\');\n content = content.replace(/'/g, \"\\\\'\");\n content = content.replace(/\\n/g, '\\\\n');\n content = content.replace(/\\r/g, '\\\\r');\n\n const lines: string[] = [\n '(function (global) {',\n ` eval('${content}');`,\n '}.call(exports, (function() { return this; }())))'\n ];\n\n return lines.join(EOL);\n};\n\nexport = loaderFn;\n"]}
|
|
1
|
+
{"version":3,"file":"RawScriptLoader.js","sourceRoot":"","sources":["../src/RawScriptLoader.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,2BAAyB;AAEzB,MAAM,QAAQ,GAAgC,CAAC,OAAe,EAAE,EAAE;IAChE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACxC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAExC,MAAM,KAAK,GAAa;QACtB,sBAAsB;QACtB,WAAW,OAAO,KAAK;QACvB,mDAAmD;KACpD,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,QAAG,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,iBAAS,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { EOL } from 'os';\r\n\r\nconst loaderFn: (content: string) => string = (content: string) => {\r\n content = content.replace(/\\\\/g, '\\\\\\\\');\r\n content = content.replace(/'/g, \"\\\\'\");\r\n content = content.replace(/\\n/g, '\\\\n');\r\n content = content.replace(/\\r/g, '\\\\r');\r\n\r\n const lines: string[] = [\r\n '(function (global) {',\r\n ` eval('${content}');`,\r\n '}.call(exports, (function() { return this; }())))'\r\n ];\r\n\r\n return lines.join(EOL);\r\n};\r\n\r\nexport = loaderFn;\r\n"]}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,mEAAqD;AAErD,iBAAS,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as RawScriptLoader from './RawScriptLoader';\n\nexport = RawScriptLoader;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,mEAAqD;AAErD,iBAAS,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport * as RawScriptLoader from './RawScriptLoader';\r\n\r\nexport = RawScriptLoader;\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/loader-raw-script",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"loader-utils": "1.4.2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@rushstack/heft": "0.
|
|
17
|
+
"@rushstack/heft": "0.63.0",
|
|
18
18
|
"local-node-rig": "1.0.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|