浏览代码

Updated changelog and readme

sanex3339 5 年之前
父节点
当前提交
ce74d437ba
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. 1 0
      CHANGELOG.md
  2. 11 1
      README.md

+ 1 - 0
CHANGELOG.md

@@ -4,6 +4,7 @@ v0.24.0
 ---
 * **Internal refactoring:** completely new mechanism to rename variable names
 * Dynamic import and `import.meta` support. Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/505
+* Now usage of some browser-related options with `target: 'node'` will cause to validation error
 * Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/496
 
 v0.23.2

+ 11 - 1
README.md

@@ -589,6 +589,8 @@ Disables the use of `console.log`, `console.info`, `console.error`, `console.war
 ### `domainLock`
 Type: `string[]` Default: `[]`
 
+##### :warning: This option does not allowed to use with `target: 'node'`
+
 Locks the obfuscated source code so it only runs on specific domains and/or sub-domains. This makes really hard for someone just copy and paste your source code and run elsewhere.
 
 ##### Multiple domains and sub-domains
@@ -703,6 +705,8 @@ Randomly shuffles the `stringArray` array items.
 ### `sourceMap`
 Type: `boolean` Default: `false`
 
+##### :warning: This option does not allowed to use with `target: 'node'`
+
 Enables source map generation for obfuscated code.
 
 Source maps can be useful to help you debug your obfuscated JavaScript source code. If you want or need to debug in production, you can upload the separate source map file to a secret location and then point your browser there. 
@@ -710,6 +714,8 @@ Source maps can be useful to help you debug your obfuscated JavaScript source co
 ### `sourceMapBaseUrl`
 Type: `string` Default: ``
 
+##### :warning: This option does not allowed to use with `target: 'node'`
+
 Sets base url to the source map import url when [`sourceMapMode: 'separate'`](#sourcemapmode).
  
 CLI example:
@@ -725,6 +731,8 @@ Result:
 ### `sourceMapFileName`
 Type: `string` Default: ``
 
+##### :warning: This option does not allowed to use with `target: 'node'`
+
 Sets file name for output source map when `sourceMapMode: 'separate'`.
 
 CLI example:
@@ -740,6 +748,8 @@ Result:
 ### `sourceMapMode`
 Type: `string` Default: `separate`
 
+##### :warning: This option does not allowed to use with `target: 'node'`
+
 Specifies source map generation mode:
 * `inline` - emit a single file with source maps instead of having a separate file;
 * `separate` - generates corresponding '.map' file with source map. In case you run obfuscator through CLI - adds link to source map file to the end of file with obfuscated code `//# sourceMappingUrl=file.js.map`.
@@ -808,7 +818,7 @@ Available values:
 * `browser-no-eval`;
 * `node`.
 
-Currently output code for `browser` and `node` targets is identical.
+Currently output code for `browser` and `node` targets is identical, but some browser-specific options are not allowed to use with `node` target.
 Output code for `browser-no-eval` target is not using `eval`.
 
 ### `transformObjectKeys`