Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e13d84d

Browse files
chore: optimize dist files
1 parent f72b9d1 commit e13d84d

File tree

5 files changed

+297
-5
lines changed

5 files changed

+297
-5
lines changed

‎build/move-ts.js‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Created by xujian1 on 2019年08月21日.
3+
*/
4+
5+
const fsExtra = require('fs-extra')
6+
const path = require('path')
7+
const glob = require('glob')
8+
const del = require('del')
9+
10+
del.sync(path.join(__dirname, '../dist/src/*.js'))
11+
12+
const files = glob.GlobSync(path.join(__dirname, '../dist/src/*')).found
13+
files.forEach((f) => {
14+
fsExtra.moveSync(f, path.join(__dirname, '../dist/', path.basename(f)), { overwrite: true })
15+
})
16+
17+
del.sync(path.join(__dirname, '../dist/src'))
18+
del.sync(path.join(__dirname, '../dist/package.json'))
19+
File renamed without changes.

‎package.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"author": "Chris bingyuwuhen@gmail.com",
88
"license": "MIT",
99
"scripts": {
10-
"build-bundle": "rollup --config rollup.config.js",
11-
"build-files": "tsc",
10+
"build-bundle": "rollup --config build/rollup.config.js",
11+
"build-files": "tsc && node build/move-ts.js",
1212
"build": "yarn build-bundle && yarn build-files"
1313
},
1414
"files": [
@@ -17,6 +17,9 @@
1717
"typings": "dist/index.d.ts",
1818
"module": "dist/vue-function-api-extra.esm.js",
1919
"devDependencies": {
20+
"del": "^5.0.0",
21+
"fs-extra": "^8.1.0",
22+
"glob": "^7.1.4",
2023
"rollup": "^1.19.4",
2124
"rollup-plugin-json": "^4.0.0",
2225
"rollup-plugin-typescript": "^1.0.1",

‎tsconfig.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
/* Module Resolution Options */
4242
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
4343
"resolveJsonModule": true,
44-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
44+
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
4545
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4646
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
4747
// "typeRoots": [], /* List of folders to include type definitions from. */
4848
// "types": [], /* Type declaration files to be included in compilation. */
4949
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
50-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
50+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
5151
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
5252
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
5353

‎yarn.lock‎

Lines changed: 271 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,280 @@
22
# yarn lockfile v1
33

44

5+
"@nodelib/fs.scandir@2.1.1":
6+
version "2.1.1"
7+
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.1.tgz#7fa8fed654939e1a39753d286b48b4836d00e0eb"
8+
dependencies:
9+
"@nodelib/fs.stat" "2.0.1"
10+
run-parallel "^1.1.9"
11+
12+
"@nodelib/fs.stat@2.0.1", "@nodelib/fs.stat@^2.0.1":
13+
version "2.0.1"
14+
resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.1.tgz#814f71b1167390cfcb6a6b3d9cdeb0951a192c14"
15+
16+
"@nodelib/fs.walk@^1.2.1":
17+
version "1.2.2"
18+
resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.2.tgz#6a6450c5e17012abd81450eb74949a4d970d2807"
19+
dependencies:
20+
"@nodelib/fs.scandir" "2.1.1"
21+
fastq "^1.6.0"
22+
523
"@types/estree@0.0.39":
624
version "0.0.39"
725
resolved "https://registry.npm.taobao.org/@types/estree/download/@types/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
826

9-
"@types/node@^12.6.9":
27+
"@types/events@*":
28+
version "3.0.0"
29+
resolved "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
30+
31+
"@types/glob@^7.1.1":
32+
version "7.1.1"
33+
resolved "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
34+
dependencies:
35+
"@types/events" "*"
36+
"@types/minimatch" "*"
37+
"@types/node" "*"
38+
39+
"@types/minimatch@*":
40+
version "3.0.3"
41+
resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
42+
43+
"@types/node@*", "@types/node@^12.6.9":
1044
version "12.7.2"
1145
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-12.7.2.tgz#c4e63af5e8823ce9cc3f0b34f7b998c2171f0c44"
1246

1347
acorn@^6.2.1:
1448
version "6.3.0"
1549
resolved "https://registry.npm.taobao.org/acorn/download/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e"
1650

51+
array-union@^2.1.0:
52+
version "2.1.0"
53+
resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
54+
55+
balanced-match@^1.0.0:
56+
version "1.0.0"
57+
resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
58+
59+
brace-expansion@^1.1.7:
60+
version "1.1.11"
61+
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
62+
dependencies:
63+
balanced-match "^1.0.0"
64+
concat-map "0.0.1"
65+
66+
braces@^3.0.1:
67+
version "3.0.2"
68+
resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
69+
dependencies:
70+
fill-range "^7.0.1"
71+
72+
concat-map@0.0.1:
73+
version "0.0.1"
74+
resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
75+
76+
del@^5.0.0:
77+
version "5.0.0"
78+
resolved "https://registry.npmjs.org/del/-/del-5.0.0.tgz#4fa698b7a1ffb4e2ab3e8929ed699799654d6720"
79+
dependencies:
80+
globby "^10.0.0"
81+
is-path-cwd "^2.0.0"
82+
is-path-in-cwd "^2.0.0"
83+
p-map "^2.0.0"
84+
rimraf "^2.6.3"
85+
86+
dir-glob@^3.0.1:
87+
version "3.0.1"
88+
resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
89+
dependencies:
90+
path-type "^4.0.0"
91+
1792
estree-walker@^0.6.1:
1893
version "0.6.1"
1994
resolved "https://registry.npm.taobao.org/estree-walker/download/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362"
2095

96+
fast-glob@^3.0.3:
97+
version "3.0.4"
98+
resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.0.4.tgz#d484a41005cb6faeb399b951fd1bd70ddaebb602"
99+
dependencies:
100+
"@nodelib/fs.stat" "^2.0.1"
101+
"@nodelib/fs.walk" "^1.2.1"
102+
glob-parent "^5.0.0"
103+
is-glob "^4.0.1"
104+
merge2 "^1.2.3"
105+
micromatch "^4.0.2"
106+
107+
fastq@^1.6.0:
108+
version "1.6.0"
109+
resolved "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2"
110+
dependencies:
111+
reusify "^1.0.0"
112+
113+
fill-range@^7.0.1:
114+
version "7.0.1"
115+
resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
116+
dependencies:
117+
to-regex-range "^5.0.1"
118+
119+
fs-extra@^8.1.0:
120+
version "8.1.0"
121+
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
122+
dependencies:
123+
graceful-fs "^4.2.0"
124+
jsonfile "^4.0.0"
125+
universalify "^0.1.0"
126+
127+
fs.realpath@^1.0.0:
128+
version "1.0.0"
129+
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
130+
131+
glob-parent@^5.0.0:
132+
version "5.0.0"
133+
resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954"
134+
dependencies:
135+
is-glob "^4.0.1"
136+
137+
glob@^7.1.3, glob@^7.1.4:
138+
version "7.1.4"
139+
resolved "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
140+
dependencies:
141+
fs.realpath "^1.0.0"
142+
inflight "^1.0.4"
143+
inherits "2"
144+
minimatch "^3.0.4"
145+
once "^1.3.0"
146+
path-is-absolute "^1.0.0"
147+
148+
globby@^10.0.0:
149+
version "10.0.1"
150+
resolved "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
151+
dependencies:
152+
"@types/glob" "^7.1.1"
153+
array-union "^2.1.0"
154+
dir-glob "^3.0.1"
155+
fast-glob "^3.0.3"
156+
glob "^7.1.3"
157+
ignore "^5.1.1"
158+
merge2 "^1.2.3"
159+
slash "^3.0.0"
160+
161+
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
162+
version "4.2.2"
163+
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"
164+
165+
ignore@^5.1.1:
166+
version "5.1.4"
167+
resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
168+
169+
inflight@^1.0.4:
170+
version "1.0.6"
171+
resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
172+
dependencies:
173+
once "^1.3.0"
174+
wrappy "1"
175+
176+
inherits@2:
177+
version "2.0.4"
178+
resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
179+
180+
is-extglob@^2.1.1:
181+
version "2.1.1"
182+
resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
183+
184+
is-glob@^4.0.1:
185+
version "4.0.1"
186+
resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
187+
dependencies:
188+
is-extglob "^2.1.1"
189+
190+
is-number@^7.0.0:
191+
version "7.0.0"
192+
resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
193+
194+
is-path-cwd@^2.0.0:
195+
version "2.2.0"
196+
resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb"
197+
198+
is-path-in-cwd@^2.0.0:
199+
version "2.1.0"
200+
resolved "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb"
201+
dependencies:
202+
is-path-inside "^2.1.0"
203+
204+
is-path-inside@^2.1.0:
205+
version "2.1.0"
206+
resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2"
207+
dependencies:
208+
path-is-inside "^1.0.2"
209+
210+
jsonfile@^4.0.0:
211+
version "4.0.0"
212+
resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
213+
optionalDependencies:
214+
graceful-fs "^4.1.6"
215+
216+
merge2@^1.2.3:
217+
version "1.2.4"
218+
resolved "https://registry.npmjs.org/merge2/-/merge2-1.2.4.tgz#c9269589e6885a60cf80605d9522d4b67ca646e3"
219+
220+
micromatch@^4.0.2:
221+
version "4.0.2"
222+
resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
223+
dependencies:
224+
braces "^3.0.1"
225+
picomatch "^2.0.5"
226+
227+
minimatch@^3.0.4:
228+
version "3.0.4"
229+
resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
230+
dependencies:
231+
brace-expansion "^1.1.7"
232+
233+
once@^1.3.0:
234+
version "1.4.0"
235+
resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
236+
dependencies:
237+
wrappy "1"
238+
239+
p-map@^2.0.0:
240+
version "2.1.0"
241+
resolved "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
242+
243+
path-is-absolute@^1.0.0:
244+
version "1.0.1"
245+
resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
246+
247+
path-is-inside@^1.0.2:
248+
version "1.0.2"
249+
resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
250+
21251
path-parse@^1.0.6:
22252
version "1.0.6"
23253
resolved "https://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
24254

255+
path-type@^4.0.0:
256+
version "4.0.0"
257+
resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
258+
259+
picomatch@^2.0.5:
260+
version "2.0.7"
261+
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
262+
25263
resolve@^1.10.0:
26264
version "1.12.0"
27265
resolved "https://registry.npm.taobao.org/resolve/download/resolve-1.12.0.tgz?cache=0&sync_timestamp=1564641434608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
28266
dependencies:
29267
path-parse "^1.0.6"
30268

269+
reusify@^1.0.0:
270+
version "1.0.4"
271+
resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
272+
273+
rimraf@^2.6.3:
274+
version "2.7.1"
275+
resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
276+
dependencies:
277+
glob "^7.1.3"
278+
31279
rollup-plugin-json@^4.0.0:
32280
version "4.0.0"
33281
resolved "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
@@ -55,6 +303,20 @@ rollup@^1.19.4:
55303
"@types/node" "^12.6.9"
56304
acorn "^6.2.1"
57305

306+
run-parallel@^1.1.9:
307+
version "1.1.9"
308+
resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
309+
310+
slash@^3.0.0:
311+
version "3.0.0"
312+
resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
313+
314+
to-regex-range@^5.0.1:
315+
version "5.0.1"
316+
resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
317+
dependencies:
318+
is-number "^7.0.0"
319+
58320
tslib@^1.9.3:
59321
version "1.10.0"
60322
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
@@ -63,6 +325,10 @@ typescript@^3.5.3:
63325
version "3.5.3"
64326
resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.5.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
65327

328+
universalify@^0.1.0:
329+
version "0.1.2"
330+
resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
331+
66332
vue-function-api@^2.2.0:
67333
version "2.2.0"
68334
resolved "https://registry.npm.taobao.org/vue-function-api/download/vue-function-api-2.2.0.tgz#06aeb76fcbcf27d8591a1f87cee8d3d771d7feed"
@@ -72,3 +338,7 @@ vue-function-api@^2.2.0:
72338
vue@^2.6.10:
73339
version "2.6.10"
74340
resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
341+
342+
wrappy@1:
343+
version "1.0.2"
344+
resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /