Forráskód Böngészése

use commonjs for buildutils

Steven Silvester 6 éve
szülő
commit
92b73faac3

+ 1 - 1
buildutils/src/build.ts

@@ -3,7 +3,7 @@
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
 
-import MiniCssExtractPlugin from 'mini-css-extract-plugin';
+import MiniCssExtractPlugin = require('mini-css-extract-plugin');
 
 import * as webpack from 'webpack';
 import * as fs from 'fs-extra';

+ 1 - 1
buildutils/src/get-dependency.ts

@@ -6,7 +6,7 @@
 
 import * as path from 'path';
 import * as utils from './utils';
-import packageJson from 'package-json';
+import packageJson = require('package-json');
 
 let allDeps: string[] = [];
 let allDevDeps: string[] = [];

+ 6 - 6
buildutils/src/utils.ts

@@ -1,9 +1,9 @@
-import path from 'path';
-import glob from 'glob';
-import fs from 'fs-extra';
-import childProcess from 'child_process';
-import sortPackageJson from 'sort-package-json';
-import coreutils from '@phosphor/coreutils';
+import path = require('path');
+import glob = require('glob');
+import fs = require('fs-extra');
+import childProcess = require('child_process');
+import sortPackageJson = require('sort-package-json');
+import coreutils = require('@phosphor/coreutils');
 
 /**
  * Get all of the lerna package paths.

+ 17 - 2
buildutils/tsconfig.json

@@ -1,8 +1,23 @@
 {
-  "extends": "../tsconfigbase",
   "compilerOptions": {
     "outDir": "lib",
-    "rootDir": "src"
+    "rootDir": "src",
+    "allowSyntheticDefaultImports": true,
+    "composite": true,
+    "declaration": true,
+    "esModuleInterop": true,
+    "incremental": true,
+    "jsx": "react",
+    "lib": ["dom", "es2015"],
+    "module": "commonjs",
+    "moduleResolution": "node",
+    "noEmitOnError": true,
+    "noImplicitAny": true,
+    "noUnusedLocals": true,
+    "preserveWatchOutput": true,
+    "resolveJsonModule": true,
+    "target": "es2015",
+    "types": []
   },
   "include": ["src/*"]
 }