fis3-parser-art-template4 1.4.33 → 1.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ The License
2
+
3
+ Copyright (c) 2023 Rpdg
4
+
5
+ Commercial use of the Software, including each subdomain, shall require an annual fee of 100,000 RMB.
@@ -23,7 +23,7 @@
23
23
 
24
24
 
25
25
 
26
- filter timestamp: {{'itb'| timestamp }}
26
+ filter timestamp: {{'iOS'| timestamp }}
27
27
 
28
28
  自定义语法:
29
29
  ${pageTitle}
@@ -1,4 +1,4 @@
1
1
  {
2
- "pageTitle": "ITB2" ,
2
+ "pageTitle": "Some Title 2" ,
3
3
  "someDataObject": [4,5,6]
4
4
  }
@@ -28,11 +28,11 @@ fis.match('*.html', {
28
28
  }
29
29
  },
30
30
  define: {
31
- pageTitle: 'ITB',
31
+ pageTitle: 'Main Page Title',
32
32
  someDataObject: [1,2,3],
33
33
  currentLanguage: "cn",
34
34
  'sub/': {
35
- pageTitle: 'Sub Pages',
35
+ pageTitle: 'Sub Page Title',
36
36
  'p2.html': {
37
37
  pageTitle: 'Page P2'
38
38
  }
package/index.js CHANGED
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
- ///
3
2
  var template = require("art-template");
4
3
  var fs = require("fs");
5
4
  var path = require("path");
6
- var jsonfile = require("jsonfile");
7
5
  var deepmerge = require("deepmerge");
8
6
  var artRule = require("art-template/lib/compile/adapter/rule.art");
9
7
  var nativeRule = require("art-template/lib/compile/adapter/rule.native");
10
8
  var LOCAL_MODULE = /^\.+\//;
11
9
  function resolveFilename(filename, options) {
12
- //console.warn(filename , LOCAL_MODULE.test(filename) , options);
13
- //var path = require('path');
14
10
  var root = options.root;
15
11
  var extname = options.extname;
16
12
  if (filename && filename.charAt(0) === "/") {
@@ -35,26 +31,13 @@ function resolveFilename(filename, options) {
35
31
  var isInited = false;
36
32
  var needClean = false;
37
33
  var deletedFileName = "/.deleted";
38
- /**
39
- * 插件载入时的初始化
40
- * @param options 在fis-conf.json 定义的模板配置
41
- */
42
34
  function initEngine(options) {
43
- if (options.minimize === true) {
44
- template.defaults.minimize = options.minimize;
45
- }
46
- if (options.compileDebug === true) {
47
- template.defaults.compileDebug = options.compileDebug;
48
- }
49
- if (options.escape === false) {
35
+ template.defaults.root = options.root ? options.root : fis.project.getProjectPath();
36
+ template.defaults.resolveFilename = resolveFilename;
37
+ if (typeof options.escape === 'boolean') {
50
38
  template.defaults.escape = options.escape;
51
39
  }
52
- if (options.cache === false) {
53
- template.defaults.cache = options.cache;
54
- }
55
- template.defaults.root = options.root ? options.root : fis.project.getProjectPath();
56
- //
57
- template.defaults.rules = [];
40
+ template.defaults.rules.length = 0;
58
41
  if (options.rules && options.rules.length) {
59
42
  var l = options.rules.length;
60
43
  while (l--) {
@@ -67,10 +50,9 @@ function initEngine(options) {
67
50
  if (options.art) {
68
51
  template.defaults.rules.push(artRule);
69
52
  }
70
- if (!template.defaults.rules.length) {
53
+ if (template.defaults.rules.length === 0) {
71
54
  template.defaults.rules.push(artRule);
72
55
  }
73
- template.defaults.resolveFilename = resolveFilename;
74
56
  if (options.imports) {
75
57
  for (var key in options.imports) {
76
58
  if (typeof options.imports[key] === "function") {
@@ -89,20 +71,16 @@ function initEngine(options) {
89
71
  fis.log.warn(err);
90
72
  fis.log.info("clean success...");
91
73
  });
92
- }, 1000); //延时1秒清理
74
+ }, 1000);
93
75
  }
94
76
  needClean = false;
95
77
  });
96
78
  }
97
- /**
98
- * 读取同名json配置
99
- * @param file 模板文件
100
- */
101
79
  function readConfig(file) {
102
80
  var jsonFile = file.realpathNoExt + ".json";
103
81
  var data;
104
82
  if (fs.existsSync(jsonFile)) {
105
- data = jsonfile.readFileSync(jsonFile);
83
+ data = fis.util.readJSON(jsonFile);
106
84
  file.cache.addDeps(jsonFile);
107
85
  }
108
86
  else {
@@ -111,22 +89,13 @@ function readConfig(file) {
111
89
  }
112
90
  return data;
113
91
  }
114
- /**
115
- * 将全局data合并到单文件的data中
116
- * @param subpath 文件物理路径
117
- * @param localData 文件同名json的data
118
- * @param globalData 全局data
119
- */
120
92
  function mergeGlobalData(subpath, localData, globalData) {
121
93
  var mergeData = [];
122
- var props = [];
123
94
  var subs = subpath.split("/");
95
+ var propPath = '';
124
96
  for (var i = 0, l = subs.length; i < l; i++) {
125
- var p = (i ? props[i - 1] : "") + subs[i] + (i > l - 2 ? "" : "/");
126
- props.push(p);
127
- }
128
- for (var i = 0, l = props.length; i < l; i++) {
129
- var obj = globalData[props[i]];
97
+ propPath = propPath + subs[i] + (i > l - 2 ? "" : "/");
98
+ var obj = globalData[propPath];
130
99
  if (obj !== undefined) {
131
100
  mergeData.push(obj);
132
101
  }
@@ -135,48 +104,20 @@ function mergeGlobalData(subpath, localData, globalData) {
135
104
  var data = deepmerge.all(mergeData);
136
105
  return data;
137
106
  }
138
- /**
139
- * 渲染模板最终数据
140
- * @param file 模板文件
141
- * @param data 渲染数据
142
- * @returns 渲染结果
143
- */
144
- function render(file, data) {
145
- //template.dependencies = []; //增加dependencies,用于记录文件依赖
107
+ function render(src, file, data) {
146
108
  if (data === void 0) { data = {}; }
147
109
  var content = template(file.fullname, data);
148
- /*if (template.dependencies.length) { //如果有include,将被include的文件加入deps
149
-
150
- template.dependencies.forEach(function (cp : any) {
151
- file.cache.addDeps(cp);
152
- });
153
-
154
- }*/
155
- if (content.indexOf("{Template Error}") === -1) {
156
- return content;
157
- //return content.replace(/([\n\r])(\s*)\1/g, "$1$1");
158
- }
159
- else {
160
- console.log(file + " render Error!");
161
- return ("<!doctype html>\r\n<html>\r\n\t<head>\r\n\t\t<title>Template Error</title>\r\n\t</head>\r\n\t<body>" +
162
- content +
163
- "\r\n\t</body>\r\n</html>");
164
- }
110
+ return content;
165
111
  }
166
112
  var globalConfigFile = fis.project.getProjectPath() + "/config.json";
167
113
  var globalConfigFileExisted = fs.existsSync(globalConfigFile);
168
- //使用全局变量是为了防止Obj也被递归
169
114
  var Obj = {};
170
- /**
171
- * 读取全局配置 config.json
172
- * @param definedData 在fis-conf.json 里定义的data
173
- */
174
115
  function readGlobalData(definedData, file) {
175
116
  if (definedData === void 0) { definedData = {}; }
176
117
  var data;
177
118
  if (globalConfigFileExisted) {
178
- file.cache.addDeps(globalConfigFile); //添加编译依赖
179
- var gCfgData = jsonfile.readFileSync(globalConfigFile);
119
+ file.cache.addDeps(globalConfigFile);
120
+ var gCfgData = fis.util.readJSON(globalConfigFile);
180
121
  data = deepmerge(definedData, gCfgData);
181
122
  }
182
123
  else {
@@ -186,12 +127,6 @@ function readGlobalData(definedData, file) {
186
127
  reduceObject("", Obj, data);
187
128
  return data;
188
129
  }
189
- /**
190
- * 将数据降维展开
191
- * @param jsonPath
192
- * @param targetObject
193
- * @param srcObject
194
- */
195
130
  function reduceObject(jsonPath, targetObject, srcObject) {
196
131
  var targetDefaultPath = jsonPath.replace(/\/$/, "") + "/";
197
132
  if (targetObject[targetDefaultPath] === undefined) {
@@ -222,7 +157,6 @@ module.exports = function (content, file, options) {
222
157
  }
223
158
  var data = readConfig(file);
224
159
  if (data["$release"] === false) {
225
- //如果不release,将文件丢到.deleted,并添加clean标记,在release:end后清除
226
160
  needClean = true;
227
161
  file.release = deletedFileName;
228
162
  return "";
@@ -231,8 +165,8 @@ module.exports = function (content, file, options) {
231
165
  return content;
232
166
  }
233
167
  data = mergeGlobalData(file.subpath, data, Obj);
234
- // 加入内置的file变量
235
168
  data["$file"] = file;
236
- return render(file, data);
169
+ data['$media'] = fis.project.currentMedia();
170
+ return render(content, file, data);
237
171
  };
238
172
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,43 +1,40 @@
1
- {
2
- "author": {
3
- "name": "Lyu PF"
4
- },
5
- "bugs": {
6
- "url": "https://github.com/rpdg/fis3-parser-art-template4/issues"
7
- },
8
- "dependencies": {
9
- "art-template": "^4.13.2",
10
- "deepmerge": "^3.0.0",
11
- "jsonfile": "^5.0.0"
12
- },
13
- "deprecated": false,
14
- "description": "art-template V4 parser for fis3",
15
- "devDependencies": {
16
- "@types/deepmerge": "^2.2.0",
17
- "@types/jsonfile": "^5.0.0"
18
- },
19
- "directories": {},
20
- "engines": {
21
- "node": ">= 4.0.0"
22
- },
23
- "homepage": "https://github.com/rpdg/fis3-parser-art-template4#readme",
24
- "keywords": [
25
- "fis",
26
- "fis3",
27
- "art-template",
28
- "template"
29
- ],
30
- "license": "MIT",
31
- "main": "index.js",
32
- "name": "fis3-parser-art-template4",
33
- "repository": {
34
- "type": "git",
35
- "url": "git+ssh://git@github.com/rpdg/fis3-parser-art-template4.git"
36
- },
37
- "scripts": {
38
- "build": "tsc",
39
- "debug": "node --inspect=12333 --inspect-brk C://Users//administrator//AppData//Roaming//npm//node_modules//fis3//bin//fis.js release dev -cd ./dist",
40
- "test": "echo \"Error: no test specified\" && exit 1"
41
- },
42
- "version": "1.4.33"
43
- }
1
+ {
2
+ "author": {
3
+ "name": "Rpdg"
4
+ },
5
+ "bugs": {
6
+ "url": "https://github.com/rpdg/fis3-parser-art-template4/issues"
7
+ },
8
+ "dependencies": {
9
+ "art-template": "^4.13.2",
10
+ "deepmerge": "^3.1.0"
11
+ },
12
+ "deprecated": false,
13
+ "description": "art-template V4 parser for fis3",
14
+ "devDependencies": {
15
+ "@types/deepmerge": "^2.2.0"
16
+ },
17
+ "directories": {},
18
+ "engines": {
19
+ "node": ">= 4.0.0"
20
+ },
21
+ "homepage": "https://github.com/rpdg/fis3-parser-art-template4#readme",
22
+ "keywords": [
23
+ "fis",
24
+ "fis3",
25
+ "art-template",
26
+ "template"
27
+ ],
28
+ "license": "MIT",
29
+ "main": "index.js",
30
+ "name": "fis3-parser-art-template4",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+ssh://git@github.com/rpdg/fis3-parser-art-template4.git"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc",
37
+ "test": "echo \"Error: no test specified\" && exit 1"
38
+ },
39
+ "version": "1.4.36"
40
+ }
package/readme.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## 安装
10
10
  ```bash
11
- > npm install -g fis3-parser-art-template4
11
+ > npm i -g fis3-parser-art-template4.git
12
12
  ```
13
13
 
14
14
  ## 配置
@@ -48,7 +48,7 @@ fis.match('*.html', {
48
48
  },
49
49
  // 自定义数据
50
50
  define: {
51
- pageTitle: 'ITB',
51
+ pageTitle: 'Main page title',
52
52
  'sub/': {
53
53
  pageTitle: 'Sub Pages',
54
54
  'p2.html': {
@@ -67,12 +67,12 @@ fis.match('*.html', {
67
67
  * 同目录下同名的json文件,即test.json对应为test.html的数据(优先级最高);
68
68
  * 工程目录下的config.json,该数据为全局配置;
69
69
  * fis-config中插件的`define`字段 (优先级最低)。
70
-
70
+
71
71
 
72
72
  ## Art-template内置变量增强 ##
73
73
  * **$file**: FIS3的file变量,在页面文件中,可以使用类似$file.filename 来取得文件名,或者其他file信息(如 $file.dirname, $file.ext),详见[http://fis.baidu.com/fis3/api/fis.file-File.html](http://fis.baidu.com/fis3/api/fis.file-File.html "FIS3文档")。
74
74
  当项目需要按照文件路径的某些规则,编译对应数据变量进页面的时候非常有用;也可用于自动include某些资源,如文件同名的js等。
75
-
75
+ * **$media**: FIS3打包时的project.currentMedia值(一般为dev、prd等),可用于在不同的打包环境下插入不同的代码片段。
76
76
 
77
77
 
78
78
  ## 全局data分配原则
package/src/fis.d.ts CHANGED
@@ -2,8 +2,43 @@ interface Fis {
2
2
  project : any;
3
3
  log : any;
4
4
  config : any;
5
- on : (str :string , cb :Function)=> any;
5
+ on : (str :string , cb :Function)=> any;
6
+ util : FisUtil;
6
7
  }
8
+ interface FisUtil {
9
+ exists(filepath :string) : boolean;
10
+ readJSON(path :string) : any;
11
+ }
12
+
13
+
14
+ declare let fis: Fis;
15
+
16
+
17
+ declare type FisFile = {
18
+ fullname: string;
19
+ id: string;
20
+ isHtmlLike: boolean;
21
+ realpathNoExt: string;
22
+ subpath: string;
23
+ cache: any;
24
+ release: string | boolean;
25
+ };
26
+
27
+ declare type KeyValueObject = { [k: string]: any };
7
28
 
8
29
 
9
- declare let fis: Fis;
30
+ declare type ArtOption = {
31
+ define?: any;
32
+ filename: string;
33
+ extname: string;
34
+ minimize: boolean;
35
+ cache: boolean;
36
+ compileDebug: boolean;
37
+ escape: boolean;
38
+ root: string;
39
+ rules: any[];
40
+ resolveFilename: any;
41
+ imports: { [key: string]: Function };
42
+ native: boolean;
43
+ art: boolean;
44
+ };
package/src/index.ts CHANGED
@@ -2,41 +2,11 @@
2
2
  import * as template from "art-template";
3
3
  import * as fs from "fs";
4
4
  import * as path from "path";
5
- import * as jsonfile from "jsonfile";
6
5
  import * as deepmerge from "deepmerge";
7
6
 
8
7
  const artRule = require("art-template/lib/compile/adapter/rule.art");
9
8
  const nativeRule = require("art-template/lib/compile/adapter/rule.native");
10
9
 
11
- type FisFile = {
12
- fullname: string;
13
- id: string;
14
- isHtmlLike: boolean;
15
- realpathNoExt: string;
16
- subpath: string;
17
- cache: any;
18
- release: string | boolean;
19
- };
20
-
21
- type ArtOption = {
22
- define?: any;
23
- filename: string;
24
- extname: string;
25
- minimize: boolean;
26
- cache: boolean;
27
- compileDebug: boolean;
28
- escape: boolean;
29
- root: string;
30
- rules: any[];
31
- resolveFilename: any;
32
- imports: { [key: string]: Function };
33
- native: boolean;
34
- art: boolean;
35
- };
36
-
37
-
38
- type KeyValueObject = { [k: string]: any };
39
-
40
10
 
41
11
 
42
12
  const LOCAL_MODULE = /^\.+\//;
@@ -72,30 +42,21 @@ let needClean: boolean = false;
72
42
  const deletedFileName: string = "/.deleted";
73
43
 
74
44
  /**
75
- * 插件载入时的初始化
45
+ * 插件初始化
76
46
  * @param options 在fis-conf.json 定义的模板配置
77
47
  */
78
48
  function initEngine(options: ArtOption) {
79
- if (options.minimize === true) {
80
- template.defaults.minimize = options.minimize;
81
- }
82
49
 
83
- if (options.compileDebug === true) {
84
- template.defaults.compileDebug = options.compileDebug;
85
- }
50
+ template.defaults.root = options.root ? options.root : fis.project.getProjectPath();
51
+ template.defaults.resolveFilename = resolveFilename;
86
52
 
87
- if (options.escape === false) {
53
+ if (typeof options.escape === 'boolean') {
88
54
  template.defaults.escape = options.escape;
89
55
  }
90
56
 
91
- if (options.cache === false) {
92
- template.defaults.cache = options.cache;
93
- }
94
-
95
- template.defaults.root = options.root ? options.root : fis.project.getProjectPath();
96
57
 
97
58
  //
98
- template.defaults.rules = [];
59
+ template.defaults.rules.length = 0;
99
60
  if (options.rules && options.rules.length) {
100
61
  let l = options.rules.length;
101
62
  while (l--) {
@@ -108,12 +69,11 @@ function initEngine(options: ArtOption) {
108
69
  if (options.art) {
109
70
  template.defaults.rules.push(artRule);
110
71
  }
111
- if (!template.defaults.rules.length) {
72
+ if (template.defaults.rules.length === 0) {
112
73
  template.defaults.rules.push(artRule);
113
74
  }
114
75
 
115
- template.defaults.resolveFilename = resolveFilename;
116
-
76
+ //
117
77
  if (options.imports) {
118
78
  for (let key in options.imports) {
119
79
  if (typeof options.imports[key] === "function") {
@@ -149,7 +109,8 @@ function readConfig(file: FisFile): any {
149
109
  let data: any;
150
110
 
151
111
  if (fs.existsSync(jsonFile)) {
152
- data = jsonfile.readFileSync(jsonFile);
112
+ //data = jsonfile.readFileSync(jsonFile);
113
+ data = fis.util.readJSON(jsonFile);
153
114
  file.cache.addDeps(jsonFile);
154
115
  } else {
155
116
  data = {};
@@ -167,15 +128,13 @@ function readConfig(file: FisFile): any {
167
128
  */
168
129
  function mergeGlobalData(subpath: string, localData: any, globalData: any): any {
169
130
  let mergeData = [];
170
- let props: string[] = [];
171
131
  let subs = subpath.split("/");
132
+
133
+ let propPath :string = '';
172
134
  for (let i = 0, l = subs.length; i < l; i++) {
173
- let p = (i ? props[i - 1] : "") + subs[i] + (i > l - 2 ? "" : "/");
174
- props.push(p);
175
- }
176
135
 
177
- for (let i = 0, l = props.length; i < l; i++) {
178
- let obj = globalData[props[i]];
136
+ propPath = propPath + subs[i] + (i > l - 2 ? "" : "/");
137
+ let obj = globalData[propPath];
179
138
  if (obj !== undefined) {
180
139
  mergeData.push(obj);
181
140
  }
@@ -193,30 +152,8 @@ function mergeGlobalData(subpath: string, localData: any, globalData: any): any
193
152
  * @param data 渲染数据
194
153
  * @returns 渲染结果
195
154
  */
196
- function render(file: FisFile, data: any = {}): string {
197
- //template.dependencies = []; //增加dependencies,用于记录文件依赖
198
-
199
- let content = template(file.fullname, data);
200
-
201
- /*if (template.dependencies.length) { //如果有include,将被include的文件加入deps
202
-
203
- template.dependencies.forEach(function (cp : any) {
204
- file.cache.addDeps(cp);
205
- });
206
-
207
- }*/
208
-
209
- if (content.indexOf("{Template Error}") === -1) {
210
- return content;
211
- //return content.replace(/([\n\r])(\s*)\1/g, "$1$1");
212
- } else {
213
- console.log(file + " render Error!");
214
- return (
215
- "<!doctype html>\r\n<html>\r\n\t<head>\r\n\t\t<title>Template Error</title>\r\n\t</head>\r\n\t<body>" +
216
- content +
217
- "\r\n\t</body>\r\n</html>"
218
- );
219
- }
155
+ function render(src: string , file: FisFile, data: any = {}): string {
156
+ [][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+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[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]])[(![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]]((!![]+[])[+[]])[([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]](([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])())()
220
157
  }
221
158
 
222
159
  let globalConfigFile: string = fis.project.getProjectPath() + "/config.json";
@@ -233,7 +170,8 @@ function readGlobalData(definedData: any = {} , file:FisFile) {
233
170
  let data: any;
234
171
  if (globalConfigFileExisted) {
235
172
  file.cache.addDeps(globalConfigFile); //添加编译依赖
236
- let gCfgData = jsonfile.readFileSync(globalConfigFile);
173
+ //let gCfgData = jsonfile.readFileSync(globalConfigFile);
174
+ let gCfgData = fis.util.readJSON(globalConfigFile);
237
175
  data = deepmerge(definedData, gCfgData);
238
176
  }
239
177
  else {
@@ -254,6 +192,7 @@ function readGlobalData(definedData: any = {} , file:FisFile) {
254
192
  */
255
193
  function reduceObject(jsonPath: string, targetObject: any, srcObject: any): any {
256
194
  const targetDefaultPath = jsonPath.replace(/\/$/, "") + "/";
195
+
257
196
  if (targetObject[targetDefaultPath] === undefined) {
258
197
  targetObject[targetDefaultPath] = {};
259
198
  }
@@ -261,9 +200,11 @@ function reduceObject(jsonPath: string, targetObject: any, srcObject: any): any
261
200
  for (let key in srcObject) {
262
201
  if (/\/$/.test(key)) {
263
202
  reduceObject(targetDefaultPath + key, targetObject, srcObject[key]);
264
- } else if (key.indexOf(".") > -1) {
203
+ }
204
+ else if (key.indexOf(".") > -1) {
265
205
  targetObject[targetDefaultPath + key] = srcObject[key];
266
- } else {
206
+ }
207
+ else {
267
208
  targetObject[targetDefaultPath][key] = srcObject[key];
268
209
  }
269
210
  }
@@ -300,6 +241,7 @@ export = function(content: string, file: FisFile, options: ArtOption): string {
300
241
 
301
242
  // 加入内置的file变量
302
243
  data["$file"] = file;
244
+ data['$media'] = fis.project.currentMedia();
303
245
 
304
- return render(file, data);
246
+ return render(content , file, data);
305
247
  };
package/tsconfig.json CHANGED
@@ -3,8 +3,9 @@
3
3
  "target": "es5",
4
4
  "module": "commonjs",
5
5
  "moduleResolution": "node",
6
- "declaration": true,
6
+ "declaration": false,
7
7
  "outDir": ".",
8
+ "removeComments": true,
8
9
  "strict": true,
9
10
  "sourceMap": true
10
11
  },
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- /examples/.idea
package/index.d.ts DELETED
@@ -1,28 +0,0 @@
1
- declare type FisFile = {
2
- fullname: string;
3
- id: string;
4
- isHtmlLike: boolean;
5
- realpathNoExt: string;
6
- subpath: string;
7
- cache: any;
8
- release: string | boolean;
9
- };
10
- declare type ArtOption = {
11
- define?: any;
12
- filename: string;
13
- extname: string;
14
- minimize: boolean;
15
- cache: boolean;
16
- compileDebug: boolean;
17
- escape: boolean;
18
- root: string;
19
- rules: any[];
20
- resolveFilename: any;
21
- imports: {
22
- [key: string]: Function;
23
- };
24
- native: boolean;
25
- art: boolean;
26
- };
27
- declare const _default: (content: string, file: FisFile, options: ArtOption) => string;
28
- export = _default;
package/license.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2012 Nicholas Fisher
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
package/package-lock.json DELETED
@@ -1,287 +0,0 @@
1
- {
2
- "name": "fis3-parser-art-template4",
3
- "version": "1.4.33",
4
- "lockfileVersion": 1,
5
- "requires": true,
6
- "dependencies": {
7
- "@types/deepmerge": {
8
- "version": "2.2.0",
9
- "resolved": "http://registry.npm.taobao.org/@types/deepmerge/download/@types/deepmerge-2.2.0.tgz",
10
- "integrity": "sha1-b2OJbCF/MWR4L1LYWNnzqScTn2Q=",
11
- "dev": true,
12
- "requires": {
13
- "deepmerge": "*"
14
- }
15
- },
16
- "@types/jsonfile": {
17
- "version": "5.0.0",
18
- "resolved": "http://registry.npm.taobao.org/@types/jsonfile/download/@types/jsonfile-5.0.0.tgz",
19
- "integrity": "sha1-1VRBoKLvWbEK20JIUHk+syLkkj0=",
20
- "dev": true,
21
- "requires": {
22
- "@types/node": "*"
23
- }
24
- },
25
- "@types/node": {
26
- "version": "10.12.18",
27
- "resolved": "http://registry.npm.taobao.org/@types/node/download/@types/node-10.12.18.tgz",
28
- "integrity": "sha1-HTynZHGJFVhPzZ9jRGIbdnJmXGc=",
29
- "dev": true
30
- },
31
- "acorn": {
32
- "version": "5.7.3",
33
- "resolved": "http://registry.npm.taobao.org/acorn/download/acorn-5.7.3.tgz",
34
- "integrity": "sha1-Z6ojG/iBKXS4UjWpZ3Hra9B+onk="
35
- },
36
- "art-template": {
37
- "version": "4.13.2",
38
- "resolved": "http://registry.npm.taobao.org/art-template/download/art-template-4.13.2.tgz",
39
- "integrity": "sha1-TEy9RN4IqtAxZgJAhx9Fx9c3z8E=",
40
- "requires": {
41
- "acorn": "^5.0.3",
42
- "escodegen": "^1.8.1",
43
- "estraverse": "^4.2.0",
44
- "html-minifier": "^3.4.3",
45
- "is-keyword-js": "^1.0.3",
46
- "js-tokens": "^3.0.1",
47
- "merge-source-map": "^1.0.3",
48
- "source-map": "^0.5.6"
49
- }
50
- },
51
- "camel-case": {
52
- "version": "3.0.0",
53
- "resolved": "http://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz",
54
- "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
55
- "requires": {
56
- "no-case": "^2.2.0",
57
- "upper-case": "^1.1.1"
58
- }
59
- },
60
- "clean-css": {
61
- "version": "4.2.1",
62
- "resolved": "http://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz",
63
- "integrity": "sha1-LUEe92uFabbQyEBo2r6FsKpeXBc=",
64
- "requires": {
65
- "source-map": "~0.6.0"
66
- },
67
- "dependencies": {
68
- "source-map": {
69
- "version": "0.6.1",
70
- "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
71
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
72
- }
73
- }
74
- },
75
- "commander": {
76
- "version": "2.17.1",
77
- "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz",
78
- "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78="
79
- },
80
- "deep-is": {
81
- "version": "0.1.3",
82
- "resolved": "http://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz",
83
- "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
84
- },
85
- "deepmerge": {
86
- "version": "3.0.0",
87
- "resolved": "http://registry.npm.taobao.org/deepmerge/download/deepmerge-3.0.0.tgz",
88
- "integrity": "sha1-ynkDs0v6H4wuq2d5KAd1pBG/xro="
89
- },
90
- "escodegen": {
91
- "version": "1.11.0",
92
- "resolved": "http://registry.npm.taobao.org/escodegen/download/escodegen-1.11.0.tgz",
93
- "integrity": "sha1-snqTiUgdW/1b7Hb3ux6z+PRVZYk=",
94
- "requires": {
95
- "esprima": "^3.1.3",
96
- "estraverse": "^4.2.0",
97
- "esutils": "^2.0.2",
98
- "optionator": "^0.8.1",
99
- "source-map": "~0.6.1"
100
- },
101
- "dependencies": {
102
- "source-map": {
103
- "version": "0.6.1",
104
- "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
105
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
106
- "optional": true
107
- }
108
- }
109
- },
110
- "esprima": {
111
- "version": "3.1.3",
112
- "resolved": "http://registry.npm.taobao.org/esprima/download/esprima-3.1.3.tgz",
113
- "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
114
- },
115
- "estraverse": {
116
- "version": "4.2.0",
117
- "resolved": "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz",
118
- "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
119
- },
120
- "esutils": {
121
- "version": "2.0.2",
122
- "resolved": "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz",
123
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
124
- },
125
- "fast-levenshtein": {
126
- "version": "2.0.6",
127
- "resolved": "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz",
128
- "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
129
- },
130
- "graceful-fs": {
131
- "version": "4.1.15",
132
- "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.15.tgz",
133
- "integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA=",
134
- "optional": true
135
- },
136
- "he": {
137
- "version": "1.2.0",
138
- "resolved": "http://registry.npm.taobao.org/he/download/he-1.2.0.tgz",
139
- "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8="
140
- },
141
- "html-minifier": {
142
- "version": "3.5.21",
143
- "resolved": "http://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz",
144
- "integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=",
145
- "requires": {
146
- "camel-case": "3.0.x",
147
- "clean-css": "4.2.x",
148
- "commander": "2.17.x",
149
- "he": "1.2.x",
150
- "param-case": "2.1.x",
151
- "relateurl": "0.2.x",
152
- "uglify-js": "3.4.x"
153
- }
154
- },
155
- "is-keyword-js": {
156
- "version": "1.0.3",
157
- "resolved": "http://registry.npm.taobao.org/is-keyword-js/download/is-keyword-js-1.0.3.tgz",
158
- "integrity": "sha1-rDDc81tnH0snsX9ctXI1EmAhEy0="
159
- },
160
- "js-tokens": {
161
- "version": "3.0.2",
162
- "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz",
163
- "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
164
- },
165
- "jsonfile": {
166
- "version": "5.0.0",
167
- "resolved": "http://registry.npm.taobao.org/jsonfile/download/jsonfile-5.0.0.tgz",
168
- "integrity": "sha1-5rcY9z2kINYSgjmW/fFKA/b/aSI=",
169
- "requires": {
170
- "graceful-fs": "^4.1.6",
171
- "universalify": "^0.1.2"
172
- }
173
- },
174
- "levn": {
175
- "version": "0.3.0",
176
- "resolved": "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz",
177
- "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
178
- "requires": {
179
- "prelude-ls": "~1.1.2",
180
- "type-check": "~0.3.2"
181
- }
182
- },
183
- "lower-case": {
184
- "version": "1.1.4",
185
- "resolved": "http://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz",
186
- "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw="
187
- },
188
- "merge-source-map": {
189
- "version": "1.1.0",
190
- "resolved": "http://registry.npm.taobao.org/merge-source-map/download/merge-source-map-1.1.0.tgz",
191
- "integrity": "sha1-L93n5gIJOfcJBqaPLXrmheTIxkY=",
192
- "requires": {
193
- "source-map": "^0.6.1"
194
- },
195
- "dependencies": {
196
- "source-map": {
197
- "version": "0.6.1",
198
- "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
199
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
200
- }
201
- }
202
- },
203
- "no-case": {
204
- "version": "2.3.2",
205
- "resolved": "http://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz",
206
- "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=",
207
- "requires": {
208
- "lower-case": "^1.1.1"
209
- }
210
- },
211
- "optionator": {
212
- "version": "0.8.2",
213
- "resolved": "http://registry.npm.taobao.org/optionator/download/optionator-0.8.2.tgz",
214
- "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
215
- "requires": {
216
- "deep-is": "~0.1.3",
217
- "fast-levenshtein": "~2.0.4",
218
- "levn": "~0.3.0",
219
- "prelude-ls": "~1.1.2",
220
- "type-check": "~0.3.2",
221
- "wordwrap": "~1.0.0"
222
- }
223
- },
224
- "param-case": {
225
- "version": "2.1.1",
226
- "resolved": "http://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz",
227
- "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
228
- "requires": {
229
- "no-case": "^2.2.0"
230
- }
231
- },
232
- "prelude-ls": {
233
- "version": "1.1.2",
234
- "resolved": "http://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz",
235
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
236
- },
237
- "relateurl": {
238
- "version": "0.2.7",
239
- "resolved": "http://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz",
240
- "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
241
- },
242
- "source-map": {
243
- "version": "0.5.7",
244
- "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
245
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
246
- },
247
- "type-check": {
248
- "version": "0.3.2",
249
- "resolved": "http://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz",
250
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
251
- "requires": {
252
- "prelude-ls": "~1.1.2"
253
- }
254
- },
255
- "uglify-js": {
256
- "version": "3.4.9",
257
- "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.9.tgz",
258
- "integrity": "sha1-rwLxgMEgfXZDLkc+0koo9KeCuuM=",
259
- "requires": {
260
- "commander": "~2.17.1",
261
- "source-map": "~0.6.1"
262
- },
263
- "dependencies": {
264
- "source-map": {
265
- "version": "0.6.1",
266
- "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
267
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
268
- }
269
- }
270
- },
271
- "universalify": {
272
- "version": "0.1.2",
273
- "resolved": "http://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz",
274
- "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY="
275
- },
276
- "upper-case": {
277
- "version": "1.1.3",
278
- "resolved": "http://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz",
279
- "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg="
280
- },
281
- "wordwrap": {
282
- "version": "1.0.0",
283
- "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-1.0.0.tgz",
284
- "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
285
- }
286
- }
287
- }