From 9cb912cea8af0420831755d5c7622a53dcc9dfd7 Mon Sep 17 00:00:00 2001 From: imconfig Date: Wed, 10 Jan 2018 10:51:03 +0800 Subject: [PATCH 1/7] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index eb766a9..cbd5f5e 100644 --- a/index.js +++ b/index.js @@ -146,7 +146,7 @@ rudePackager.defaultOptions = { css: '', // 打包后 css 的文件路径。 js: '', // 打包后 js 的文件路径。 includeAsyncs: false, // 可以配置成 true 用来包含异步依赖。 - ignore: null // 忽略列表,可以配置部分文件不被 all in one. + ignore: null, // 忽略列表,可以配置部分文件不被 all in one. // attrs: // 打包后 css/js 的自定义属性, // 比如:crossorigin="anonymous"。 From e1a371b85586abea455809eed470a2d539cec63d Mon Sep 17 00:00:00 2001 From: imconfig Date: Wed, 10 Jan 2018 11:03:40 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=A1=A5=E5=85=85allInOne=E9=85=8D?= =?UTF-8?q?=E7=BD=AEattrs=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b8987f3..0123847 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,29 @@ fis 中对依赖的js 加载,尤其是异步 js,需要一个 js loader。 - `includeAsyncs` 默认为 false。all in one 打包,是不包含异步依赖的,不过可以通过把此属性设置成 true,包含异步依赖。 - `ignore` 默认为空。如果不希望部分文件被 all in one 打包,请设置 ignore 清单。 - `sourceMap` 默认为 `false`。是否生成 sourcemap. - - `useTrack` 默认为 `true`. 是否在打包文件中添加track信息 +  - `useTrack` 默认为 `true`。 是否在打包文件中添加track信息 +  - `attrs`     默认为空。自定义打包后script/link的attributes,比如给script添加crossorigin="anonymous"。如: + ```js +    //