Sfoglia il codice sorgente

Merge pull request #978 from javascript-obfuscator/typings-dir-fix

Fixed directory name for typings
Timofey Kachalov 3 anni fa
parent
commit
0c1aa60d81
4 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  1. 1 1
      .gitignore
  2. 2 0
      README.md
  3. 3 2
      package.json
  4. 1 1
      src/tsconfig.typings.json

+ 1 - 1
.gitignore

@@ -3,7 +3,7 @@
 .nyc_output
 coverage
 /dist
-/types
+/typings
 npm-debug.log
 *.js.map
 /coverage

+ 2 - 0
README.md

@@ -683,6 +683,8 @@ If checked, an interval is used to force the debug mode on the Console tab, maki
 ### `disableConsoleOutput`
 Type: `boolean` Default: `false`
 
+##### :warning: This option disables `console` calls globally for all scripts
+
 Disables the use of `console.log`, `console.info`, `console.error`, `console.warn`, `console.debug`, `console.exception` and `console.trace` by replacing them with empty functions. This makes the use of the debugger harder.
 
 ### `domainLock`

+ 3 - 2
package.json

@@ -19,7 +19,7 @@
   "bin": {
     "javascript-obfuscator": "./bin/javascript-obfuscator"
   },
-  "types": "types/index.d.ts",
+  "types": "typings/index.d.ts",
   "dependencies": {
     "@javascript-obfuscator/escodegen": "2.2.1",
     "@javascript-obfuscator/estraverse": "5.3.0",
@@ -102,6 +102,7 @@
     "start": "yarn run watch",
     "webpack:prod": "webpack --config ./webpack/webpack.node.config.js --config ./webpack/webpack.browser.config.js --mode production",
     "build": "yarn run webpack:prod && yarn run eslint && yarn test",
+    "build:typings": "tsc --project src/tsconfig.typings.json",
     "watch": "webpack --config ./webpack/webpack.node.config.js --mode development --watch",
     "test:dev": "ts-node --type-check test/dev/dev.ts",
     "test:devCompilePerformance": "ts-node test/dev/dev-compile-performance.ts",
@@ -116,7 +117,7 @@
     "git:addFiles": "git add .",
     "postinstall": "opencollective",
     "precommit": "npm run build",
-    "prepublishOnly": "npm run build && tsc --project ./src/tsconfig.declarations.json",
+    "prepublishOnly": "npm run build && npm run build:typings",
     "prepare": "husky install"
   },
   "author": {

+ 1 - 1
src/tsconfig.declarations.json → src/tsconfig.typings.json

@@ -1,7 +1,7 @@
 {
   "extends": "./tsconfig.node.json",
   "compilerOptions": {
-    "outDir": "../types",
+    "outDir": "../typings",
     "declaration": true,
     "emitDeclarationOnly": true,
     "skipLibCheck": true