+24
-91
lines changedFilter options
+24
-91
lines changed Original file line number Diff line number Diff line change
@@ -6,13 +6,25 @@ require('shelljs/make');
6
6
config.fatal = true;
7
7
config.verbose = true;
8
8
9
+
target.deps = () => {
10
+
cd('node_modules/unicode-properties');
11
+
exec('yarn');
12
+
exec('yarn make');
13
+
exec('rm -rf node_modules');
14
+
cd('../restructure');
15
+
exec('yarn');
16
+
exec('yarn prepublish');
17
+
exec('rm -rf node_modules');
18
+
cd('../..');
19
+
}
20
+
9
21
target.all = () => {
10
22
target.clean();
11
23
target.generateTrieJson();
12
24
target.rollupESM();
13
-
target.rollupESMMin();
14
-
target.rollupUMD();
15
-
target.rollupUMDMin();
25
+
// target.rollupESMMin();
26
+
// target.rollupUMD();
27
+
// target.rollupUMDMin();
16
28
};
17
29
18
30
target.generateTrieJson = () => {
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
31
31
"dfa": "^1.0.0",
32
32
"iconv-lite": "^0.4.13",
33
33
"pako": "^1.0.6",
34
-
"restructure": "^0.5.3",
34
+
"restructure": "git+https://github.com/Hopding/restructure.git#6f9fd535c3914685a55002ef9b48e08a684b9bec",
35
35
"tiny-inflate": "^1.0.2",
36
36
"unicode-properties": "git+https://github.com/Hopding/unicode-properties.git#51a63d54730b78507206f07d19bd04186e5cffe7",
37
37
"unicode-trie": "^0.3.0"
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ export default {
15
15
output: {
16
16
name: 'fontkit',
17
17
format: MODULE_TYPE,
18
+
strict: false,
18
19
},
19
20
external: MODULE_TYPE === 'esm'
20
21
? ['pako'] // pdf-lib will provide pako for us
Original file line number Diff line number Diff line change
@@ -26,60 +26,3 @@ const fontkit = {
26
26
};
27
27
28
28
export default fontkit;
29
-
30
-
31
-
// import r from 'restructure';
32
-
// const fs = require('fs');
33
-
//
34
-
// var fontkit = {};
35
-
// export default fontkit;
36
-
//
37
-
// fontkit.logErrors = false;
38
-
//
39
-
// let formats = [];
40
-
// fontkit.registerFormat = function(format) {
41
-
// formats.push(format);
42
-
// };
43
-
//
44
-
// fontkit.openSync = function(filename, postscriptName) {
45
-
// let buffer = fs.readFileSync(filename);
46
-
// return fontkit.create(buffer, postscriptName);
47
-
// };
48
-
//
49
-
// fontkit.open = function(filename, postscriptName, callback) {
50
-
// if (typeof postscriptName === 'function') {
51
-
// callback = postscriptName;
52
-
// postscriptName = null;
53
-
// }
54
-
//
55
-
// fs.readFile(filename, function(err, buffer) {
56
-
// if (err) { return callback(err); }
57
-
//
58
-
// try {
59
-
// var font = fontkit.create(buffer, postscriptName);
60
-
// } catch (e) {
61
-
// return callback(e);
62
-
// }
63
-
//
64
-
// return callback(null, font);
65
-
// });
66
-
//
67
-
// return;
68
-
// };
69
-
//
70
-
// fontkit.create = function(buffer, postscriptName) {
71
-
// for (let i = 0; i < formats.length; i++) {
72
-
// let format = formats[i];
73
-
// if (format.probe(buffer)) {
74
-
// let font = new format(new r.DecodeStream(buffer));
75
-
// if (postscriptName) {
76
-
// return font.getFont(postscriptName);
77
-
// }
78
-
//
79
-
// return font;
80
-
// }
81
-
// }
82
-
//
83
-
// throw new Error('Unknown font format');
84
-
// };
85
-
//
Original file line number Diff line number Diff line change
@@ -27,8 +27,7 @@ export default class Path {
27
27
* @return {string}
28
28
*/
29
29
toFunction() {
30
-
let cmds = this.commands.map(c => ` ctx.${c.command}(${c.args.join(', ')});`);
31
-
return new Function('ctx', cmds.join('\n'));
30
+
return (ctx) => this.commands.forEach((c) => ctx[c.command].apply(ctx, c.args));
32
31
}
33
32
34
33
/**
Original file line number Diff line number Diff line change
@@ -1037,9 +1037,9 @@ brorand@^1.0.1:
1037
1037
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
1038
1038
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
1039
1039
1040
-
"brotli@git+https://github.com/Hopding/brotli.js.git#0350970de946950ce47c1948913827931d88fc11":
1040
+
"brotli@git+https://github.com/Hopding/brotli.js.git#2a623817f6bd8d1f7f528f69ac8ce8067b3383fb":
1041
1041
version "1.3.2"
1042
-
resolved "git+https://github.com/Hopding/brotli.js.git#0350970de946950ce47c1948913827931d88fc11"
1042
+
resolved "git+https://github.com/Hopding/brotli.js.git#2a623817f6bd8d1f7f528f69ac8ce8067b3383fb"
1043
1043
dependencies:
1044
1044
base64-js "^1.1.2"
1045
1045
@@ -3825,9 +3825,9 @@ resolve@^1.1.6, resolve@^1.3.2, resolve@^1.8.1:
3825
3825
dependencies:
3826
3826
path-parse "^1.0.6"
3827
3827
3828
-
restructure@^0.5.3:
3828
+
"restructure@git+https://github.com/Hopding/restructure.git#6f9fd535c3914685a55002ef9b48e08a684b9bec":
3829
3829
version "0.5.4"
3830
-
resolved "https://registry.yarnpkg.com/restructure/-/restructure-0.5.4.tgz#f54e7dd563590fb34fd6bf55876109aeccb28de8"
3830
+
resolved "git+https://github.com/Hopding/restructure.git#6f9fd535c3914685a55002ef9b48e08a684b9bec"
3831
3831
dependencies:
3832
3832
browserify-optional "^1.0.0"
3833
3833
@@ -3885,10 +3885,6 @@ rollup-plugin-json@^3.1.0:
3885
3885
dependencies:
3886
3886
rollup-pluginutils "^2.3.1"
3887
3887
3888
-
rollup-plugin-local-resolve@^1.0.7:
3889
-
version "1.0.7"
3890
-
resolved "https://registry.yarnpkg.com/rollup-plugin-local-resolve/-/rollup-plugin-local-resolve-1.0.7.tgz#c486701716c15add2127565c2eaa101123320887"
3891
-
3892
3888
rollup-plugin-node-builtins@^2.1.2:
3893
3889
version "2.1.2"
3894
3890
resolved "https://registry.yarnpkg.com/rollup-plugin-node-builtins/-/rollup-plugin-node-builtins-2.1.2.tgz#24a1fed4a43257b6b64371d8abc6ce1ab14597e9"
@@ -3930,16 +3926,6 @@ rollup-plugin-terser@^3.0.0:
3930
3926
serialize-javascript "^1.5.0"
3931
3927
terser "^3.8.2"
3932
3928
3933
-
rollup-plugin-uglify@^6.0.0:
3934
-
version "6.0.0"
3935
-
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz#15aa8919e5cdc63b7cfc9319c781788b40084ce4"
3936
-
integrity sha512-XtzZd159QuOaXNvcxyBcbUCSoBsv5YYWK+7ZwUyujSmISst8avRfjWlp7cGu8T2O52OJnpEBvl+D4WLV1k1iQQ==
3937
-
dependencies:
3938
-
"@babel/code-frame" "^7.0.0"
3939
-
jest-worker "^23.2.0"
3940
-
serialize-javascript "^1.5.0"
3941
-
uglify-js "^3.4.9"
3942
-
3943
3929
rollup-plugin-visualizer@^0.9.2:
3944
3930
version "0.9.2"
3945
3931
resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-0.9.2.tgz#bbc8e8e67d5aa3e6c188c5ca0fcfa57234fb9f92"
@@ -4428,14 +4414,6 @@ uglify-js@^2.6:
4428
4414
optionalDependencies:
4429
4415
uglify-to-browserify "~1.0.0"
4430
4416
4431
-
uglify-js@^3.4.9:
4432
-
version "3.4.9"
4433
-
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
4434
-
integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==
4435
-
dependencies:
4436
-
commander "~2.17.1"
4437
-
source-map "~0.6.1"
4438
-
4439
4417
uglify-to-browserify@~1.0.0:
4440
4418
version "1.0.2"
4441
4419
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
@@ -4458,9 +4436,9 @@ unicode-match-property-value-ecmascript@^1.0.2:
4458
4436
resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4"
4459
4437
integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==
4460
4438
4461
-
"unicode-properties@git+https://github.com/Hopding/unicode-properties.git#d97bf46ebdcef78f838f0803ec3643e608410add":
4439
+
"unicode-properties@git+https://github.com/Hopding/unicode-properties.git#51a63d54730b78507206f07d19bd04186e5cffe7":
4462
4440
version "1.1.0"
4463
-
resolved "git+https://github.com/Hopding/unicode-properties.git#d97bf46ebdcef78f838f0803ec3643e608410add"
4441
+
resolved "git+https://github.com/Hopding/unicode-properties.git#51a63d54730b78507206f07d19bd04186e5cffe7"
4464
4442
dependencies:
4465
4443
base64-arraybuffer "^0.1.5"
4466
4444
pako "^1.0.6"
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4