瀏覽代碼

Migration to ESTree

sanex3339 8 年之前
父節點
當前提交
1a4f753b8d
共有 2 個文件被更改,包括 4 次插入7 次删除
  1. 1 0
      package.json
  2. 3 7
      webpack.config.js

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "@types/escodegen": "^0.0.5",
     "@types/esprima": "^2.1.31",
     "@types/estraverse": "^0.0.5",
+    "@types/estree": "^0.0.32",
     "@types/format-unicorn": "^0.0.28",
     "@types/joi": "^9.0.31",
     "@types/mkdirp": "^0.3.28",

+ 3 - 7
webpack.config.js

@@ -1,15 +1,11 @@
 'use strict';
 
-let fs = require("fs"),
+var fs = require("fs"),
     nodeExternals = require('webpack-node-externals'),
     webpack = require('webpack');
 
 function getLicenseText () {
-    return `/*
-Copyright (C) 2016 Timofey Kachalov <[email protected]>
-
-${fs.readFileSync('./LICENSE.BSD', 'utf8')}
-*/`;
+    return "/*\nCopyright (C) 2016 Timofey Kachalov <[email protected]>\n\n" + fs.readFileSync('./LICENSE.BSD', 'utf8') + "\n*/";
 }
 
 module.exports = {
@@ -31,7 +27,7 @@ module.exports = {
     plugins: [
         new webpack.BannerPlugin(
             {
-                banner: `${getLicenseText()}\n\nrequire("source-map-support").install();\n`,
+                banner: getLicenseText() + '\n\nrequire("source-map-support").install();\n',
                 raw: true,
                 entryOnly: false
             }