Socket
Socket
Sign inDemoInstall

grunt-jscrambler

Package Overview
Dependencies
3
Maintainers
7
Versions
130
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.2.6 to 5.2.7

2

package.json
{
"name": "grunt-jscrambler",
"description": "Obfuscate your source files using the JScrambler API.",
"version": "5.2.6",
"version": "5.2.7",
"homepage": "https://github.com/jscrambler/jscrambler",

@@ -6,0 +6,0 @@ "scripts": {

@@ -28,3 +28,3 @@ # ![jscrambler](https://rawgithub.com/jscrambler/grunt-jscrambler/master/media/jscrambler-logo.png)

In your project's Gruntfile, add a section named `jscrambler` to the data object passed into `grunt.initConfig()`.
#### Relative path
```js

@@ -56,3 +56,40 @@ grunt.initConfig({

```
#### Absolute path
```js
grunt.initConfig({
jscrambler: {
main: {
options: {
keys: {
accessKey: '',
secretKey: ''
},
applicationId: '',
params: [
{
name: 'whitespaceRemoval'
},
{
name: 'charToTernaryOperator'
}
]
},
files: [
{
expand: true,
cwd: '/example/src/'
src: ['foo.js', 'bar.js'],
dest: '/destination/'
},
{
expand: true,
cwd: '/otherexample/'
src: ['foo.js', 'bar.js'],
dest: '/otherdestination/'
}
]
}
},
});
```
You will need your credentials and Application ID in order to protect your application.

@@ -59,0 +96,0 @@ Navigate to your [profile](https://app.jscrambler.com/profile) page and grab your `accessKey` and `secretKey` at the _API Credentials_ section.

@@ -26,15 +26,9 @@ /**

elem.src.forEach(function (src) {
if (grunt.file.arePathsEquivalent(src, file)) {
var dest = elem.dest;
var lastDestChar = dest[dest.length - 1];
var destPath;
if (elem.src.length === 1 && lastDestChar !== '/' && lastDestChar !== '\\') {
destPath = dest;
} else {
destPath = path.join(dest, file);
}
grunt.file.write(destPath, buffer);
} else if (elem.dest) {
grunt.file.write(path.join(elem.dest, file), buffer);
if(process.platform !== 'win32' && grunt.file.isPathAbsolute(src)) {
var parsedPath = path.parse(src);
src = src.replace(parsedPath.root, '');
}
if(grunt.file.arePathsEquivalent(src, file)) {
grunt.file.write(elem.dest, buffer);
}
});

@@ -41,0 +35,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc