Socket
Socket
Sign inDemoInstall

script-loader

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

script-loader - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

CHANGELOG.md

15

addScript.js

@@ -6,6 +6,13 @@ /*

module.exports = function(src) {
if (typeof execScript !== "undefined")
execScript(src);
else
eval.call(null, src);
try {
if (typeof eval !== "undefined") {
eval.call(null, src);
} else if (typeof execScript !== "undefined") {
execScript(src);
} else {
console.error("[Script Loader] EvalError: No eval function available");
}
} catch (error) {
console.error("[Script Loader] ", error.message);
}
}

@@ -0,0 +0,0 @@ /*

{
"name": "script-loader",
"version": "0.7.0",
"version": "0.7.1",
"author": "Tobias Koppers @sokra",
"description": "script loader module for webpack",
"license": "MIT",
"scripts": {
"release": "standard-version"
},
"dependencies": {
"raw-loader": "~0.5.1"
},
"devDependencies": {
"standard-version": "^4.2.0"
},
"repository": {
"type": "git",
"url": "git@github.com:webpack/script-loader.git"
"url": "https://github.com/webpack-contrib/script-loader.git"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
]
"bugs": {
"url": "https://github.com/webpack/script-loader/issues"
},
"homepage": "https://github.com/webpack/script-loader"
}

@@ -1,16 +0,96 @@

# script loader for webpack
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![chat][chat]][chat-url]
## Usage
<div align="center">
<a href="https://github.com/webpack/webpack">
<img width="200" height="200"
src="https://webpack.js.org/assets/icon-square-big.svg">
</a>
<h1>Script Loader</h1>
</div>
``` javascript
require("script!./file.js");
// => execute file.js once in global context
<h2 align="center">Install</h2>
```bash
npm install --save-dev script-loader
```
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
<h2 align="center">Usage</h2>
Does nothing in node.js.
Executes JS script once in global context.
## License
> :warning: Doesn't work in NodeJS
MIT (http://www.opensource.org/licenses/mit-license.php)
### Config (recommended)
```js
import exec from 'script.exec.js';
```
**webpack.config.js**
```js
module.exports = {
module: {
rules: [
{
test: /\.exec\.js$/,
use: [ 'script-loader' ]
}
]
}
}
```
### Inline
```js
import exec from 'script-loader!./script.js';
```
<h2 align="center">Maintainers</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/script-loader.svg
[npm-url]: https://npmjs.com/package/script-loader
[node]: https://img.shields.io/node/v/script-loader.svg
[node-url]: https://nodejs.org
[deps]: https://david-dm.org/webpack/script-loader.svg
[deps-url]: https://david-dm.org/webpack/script-loader
[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc