@unvt/charites 0.4.0 → 0.5.2

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.
@@ -13,12 +13,13 @@ on:
13
13
  schedule:
14
14
  - cron: "0 0 * * *"
15
15
 
16
+ env:
17
+ TX_TOKEN: ${{ secrets.TX_TOKEN }}
18
+
16
19
  jobs:
17
20
  build:
18
21
 
19
22
  runs-on: ubuntu-latest
20
- env:
21
- TX_TOKEN: ${{ secrets.TX_TOKEN }}
22
23
 
23
24
  steps:
24
25
  - uses: actions/checkout@v3
@@ -35,6 +36,15 @@ jobs:
35
36
  pip install pipenv
36
37
  pipenv install --system
37
38
 
39
+ - name: Create temporary directory to store the CLI
40
+ run: mkdir /tmp/tx
41
+ shell: bash
42
+
43
+ - name: Install transifex CLI
44
+ run: curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
45
+ working-directory: /tmp/tx
46
+ shell: bash
47
+
38
48
  - name: Push translations
39
49
  if: ${{ github.ref == 'refs/heads/main' }}
40
50
  run: |
@@ -44,7 +54,7 @@ jobs:
44
54
  if [[ -z "${TX_TOKEN}" ]]; then
45
55
  echo "TX_TOKEN not set, skip tx pull"
46
56
  else
47
- tx push -s
57
+ /tmp/tx/tx --token "${TX_TOKEN}" push -s
48
58
  fi
49
59
  make clean
50
60
 
@@ -55,7 +65,7 @@ jobs:
55
65
  if [[ -z "${TX_TOKEN}" ]]; then
56
66
  echo "TX_TOKEN not set, skip tx pull"
57
67
  else
58
- make transifex_pull
68
+ /tmp/tx/tx --token "${TX_TOKEN}" pull -a
59
69
  fi
60
70
 
61
71
  - name: Build
@@ -17,7 +17,7 @@ jobs:
17
17
  strategy:
18
18
  matrix:
19
19
  node-version: [14.x, 16.x, 18.x]
20
- os: [ubuntu-latest, windows-latest]
20
+ os: [ubuntu-latest]
21
21
  runs-on: ${{ matrix.os }}
22
22
  steps:
23
23
  - uses: actions/checkout@v3
@@ -80,14 +80,18 @@ function buildWatch(source, destination, options) {
80
80
  sourcePath = source;
81
81
  }
82
82
  console.log(path_1.default.dirname(sourcePath));
83
- return (0, node_watch_1.default)(path_1.default.dirname(sourcePath), { recursive: true, filter: /\.yml$/ }, (event, file) => {
83
+ const watchCallback = async (event, file) => {
84
84
  console.log(`${(event || '').toUpperCase()}: ${file}`);
85
85
  try {
86
- build(source, destination, options);
86
+ await build(source, destination, options);
87
87
  }
88
88
  catch (e) {
89
89
  // Nothing to do
90
+ console.warn(`WARN: Ignored error in ${file}:\n${e}\nFix the errors above, and try saving the file again.`);
90
91
  }
91
- });
92
+ };
93
+ // Trigger the watch callback first manually, so the user doesn't need to save the file to create the initial file.
94
+ watchCallback('update', sourcePath);
95
+ return (0, node_watch_1.default)(path_1.default.dirname(sourcePath), { recursive: true, filter: /\.yml$/ }, watchCallback);
92
96
  }
93
97
  exports.buildWatch = buildWatch;
package/docs/.tx/config CHANGED
@@ -1,62 +1,63 @@
1
1
  [main]
2
2
  host = https://www.transifex.com
3
3
 
4
- [charites-docs.index]
5
- file_filter = i18n/<lang>/LC_MESSAGES/index.po
6
- source_file = i18n/pot/index.pot
7
- source_lang = en
8
- type = PO
9
-
10
- [charites-docs.development--index]
4
+ [o:unvt:p:charites-docs:r:development--index]
11
5
  file_filter = i18n/<lang>/LC_MESSAGES/development/index.po
12
6
  source_file = i18n/pot/development/index.pot
13
7
  source_lang = en
14
- type = PO
8
+ type = PO
15
9
 
16
- [charites-docs.install--index]
10
+ [o:unvt:p:charites-docs:r:index]
11
+ file_filter = i18n/<lang>/LC_MESSAGES/index.po
12
+ source_file = i18n/pot/index.pot
13
+ source_lang = en
14
+ type = PO
15
+
16
+ [o:unvt:p:charites-docs:r:install--index]
17
17
  file_filter = i18n/<lang>/LC_MESSAGES/install/index.po
18
18
  source_file = i18n/pot/install/index.pot
19
19
  source_lang = en
20
- type = PO
20
+ type = PO
21
21
 
22
- [charites-docs.install--install]
22
+ [o:unvt:p:charites-docs:r:install--install]
23
23
  file_filter = i18n/<lang>/LC_MESSAGES/install/install.po
24
24
  source_file = i18n/pot/install/install.pot
25
25
  source_lang = en
26
- type = PO
26
+ type = PO
27
27
 
28
- [charites-docs.install--install_on_nanban]
28
+ [o:unvt:p:charites-docs:r:install--install_on_nanban]
29
29
  file_filter = i18n/<lang>/LC_MESSAGES/install/install_on_nanban.po
30
30
  source_file = i18n/pot/install/install_on_nanban.pot
31
31
  source_lang = en
32
- type = PO
32
+ type = PO
33
33
 
34
- [charites-docs.install--recommended_environment]
34
+ [o:unvt:p:charites-docs:r:install--recommended_environment]
35
35
  file_filter = i18n/<lang>/LC_MESSAGES/install/recommended_environment.po
36
36
  source_file = i18n/pot/install/recommended_environment.pot
37
37
  source_lang = en
38
- type = PO
38
+ type = PO
39
39
 
40
- [charites-docs.usage--commandline_interface]
40
+ [o:unvt:p:charites-docs:r:usage--commandline_interface]
41
41
  file_filter = i18n/<lang>/LC_MESSAGES/usage/commandline_interface.po
42
42
  source_file = i18n/pot/usage/commandline_interface.pot
43
43
  source_lang = en
44
- type = PO
44
+ type = PO
45
45
 
46
- [charites-docs.usage--examples]
46
+ [o:unvt:p:charites-docs:r:usage--examples]
47
47
  file_filter = i18n/<lang>/LC_MESSAGES/usage/examples.po
48
48
  source_file = i18n/pot/usage/examples.pot
49
49
  source_lang = en
50
- type = PO
50
+ type = PO
51
51
 
52
- [charites-docs.usage--global_options]
52
+ [o:unvt:p:charites-docs:r:usage--global_options]
53
53
  file_filter = i18n/<lang>/LC_MESSAGES/usage/global_options.po
54
54
  source_file = i18n/pot/usage/global_options.pot
55
55
  source_lang = en
56
- type = PO
56
+ type = PO
57
57
 
58
- [charites-docs.usage--index]
58
+ [o:unvt:p:charites-docs:r:usage--index]
59
59
  file_filter = i18n/<lang>/LC_MESSAGES/usage/index.po
60
60
  source_file = i18n/pot/usage/index.pot
61
61
  source_lang = en
62
- type = PO
62
+ type = PO
63
+
package/docs/Pipfile CHANGED
@@ -7,7 +7,6 @@ name = "pypi"
7
7
  sphinx = "4.3.2"
8
8
  sphinx-autobuild = "2021.3.14"
9
9
  sphinx-rtd-theme = "1.0.0"
10
- transifex-client = "0.14.4"
11
10
  sphinx-intl = "2.0.1"
12
11
 
13
12
  [dev-packages]
package/docs/Pipfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_meta": {
3
3
  "hash": {
4
- "sha256": "9e50564b9aa34ba4c205c9976f7719d5e3896272b4c901e9d8fbf1e4108f1bd9"
4
+ "sha256": "d6702310739286da77e3b1b3640ebb2d4093464a640e36d6fd83edfbc9d493c1"
5
5
  },
6
6
  "pipfile-spec": 6,
7
7
  "requires": {
@@ -18,18 +18,19 @@
18
18
  "default": {
19
19
  "alabaster": {
20
20
  "hashes": [
21
- "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359",
22
- "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"
21
+ "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3",
22
+ "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"
23
23
  ],
24
- "version": "==0.7.12"
24
+ "markers": "python_version >= '3.6'",
25
+ "version": "==0.7.13"
25
26
  },
26
27
  "babel": {
27
28
  "hashes": [
28
- "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe",
29
- "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"
29
+ "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610",
30
+ "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"
30
31
  ],
31
- "markers": "python_version >= '3.6'",
32
- "version": "==2.11.0"
32
+ "markers": "python_version >= '3.7'",
33
+ "version": "==2.12.1"
33
34
  },
34
35
  "certifi": {
35
36
  "hashes": [
@@ -41,11 +42,84 @@
41
42
  },
42
43
  "charset-normalizer": {
43
44
  "hashes": [
44
- "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845",
45
- "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
46
- ],
47
- "markers": "python_full_version >= '3.6.0'",
48
- "version": "==2.1.1"
45
+ "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6",
46
+ "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1",
47
+ "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e",
48
+ "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373",
49
+ "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62",
50
+ "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230",
51
+ "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be",
52
+ "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c",
53
+ "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0",
54
+ "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448",
55
+ "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f",
56
+ "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649",
57
+ "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d",
58
+ "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0",
59
+ "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706",
60
+ "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a",
61
+ "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59",
62
+ "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23",
63
+ "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5",
64
+ "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb",
65
+ "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e",
66
+ "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e",
67
+ "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c",
68
+ "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28",
69
+ "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d",
70
+ "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41",
71
+ "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974",
72
+ "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce",
73
+ "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f",
74
+ "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1",
75
+ "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d",
76
+ "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8",
77
+ "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017",
78
+ "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31",
79
+ "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7",
80
+ "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8",
81
+ "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e",
82
+ "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14",
83
+ "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd",
84
+ "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d",
85
+ "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795",
86
+ "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b",
87
+ "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b",
88
+ "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b",
89
+ "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203",
90
+ "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f",
91
+ "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19",
92
+ "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1",
93
+ "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a",
94
+ "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac",
95
+ "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9",
96
+ "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0",
97
+ "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137",
98
+ "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f",
99
+ "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6",
100
+ "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5",
101
+ "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909",
102
+ "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f",
103
+ "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0",
104
+ "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324",
105
+ "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755",
106
+ "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb",
107
+ "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854",
108
+ "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c",
109
+ "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60",
110
+ "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84",
111
+ "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0",
112
+ "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b",
113
+ "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1",
114
+ "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531",
115
+ "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1",
116
+ "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11",
117
+ "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326",
118
+ "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df",
119
+ "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"
120
+ ],
121
+ "markers": "python_full_version >= '3.7.0'",
122
+ "version": "==3.1.0"
49
123
  },
50
124
  "click": {
51
125
  "hashes": [
@@ -65,11 +139,11 @@
65
139
  },
66
140
  "docutils": {
67
141
  "hashes": [
68
- "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125",
69
- "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"
142
+ "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c",
143
+ "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"
70
144
  ],
71
145
  "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
72
- "version": "==0.17.1"
146
+ "version": "==0.18.1"
73
147
  },
74
148
  "gitdb": {
75
149
  "hashes": [
@@ -105,11 +179,11 @@
105
179
  },
106
180
  "importlib-metadata": {
107
181
  "hashes": [
108
- "sha256:0eafa39ba42bf225fc00e67f701d71f85aead9f878569caf13c3724f704b970f",
109
- "sha256:404d48d62bba0b7a77ff9d405efd91501bef2e67ff4ace0bed40a0cf28c3c7cd"
182
+ "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad",
183
+ "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"
110
184
  ],
111
185
  "markers": "python_version < '3.10'",
112
- "version": "==5.2.0"
186
+ "version": "==6.0.0"
113
187
  },
114
188
  "jinja2": {
115
189
  "hashes": [
@@ -128,65 +202,75 @@
128
202
  },
129
203
  "markupsafe": {
130
204
  "hashes": [
131
- "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003",
132
- "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88",
133
- "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5",
134
- "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7",
135
- "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a",
136
- "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603",
137
- "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1",
138
- "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135",
139
- "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247",
140
- "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6",
141
- "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601",
142
- "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77",
143
- "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02",
144
- "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e",
145
- "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63",
146
- "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f",
147
- "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980",
148
- "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b",
149
- "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812",
150
- "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff",
151
- "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96",
152
- "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1",
153
- "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925",
154
- "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a",
155
- "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6",
156
- "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e",
157
- "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f",
158
- "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4",
159
- "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f",
160
- "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3",
161
- "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c",
162
- "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a",
163
- "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417",
164
- "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a",
165
- "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a",
166
- "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37",
167
- "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452",
168
- "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933",
169
- "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a",
170
- "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"
205
+ "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed",
206
+ "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc",
207
+ "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2",
208
+ "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460",
209
+ "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7",
210
+ "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0",
211
+ "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1",
212
+ "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa",
213
+ "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03",
214
+ "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323",
215
+ "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65",
216
+ "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013",
217
+ "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036",
218
+ "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f",
219
+ "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4",
220
+ "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419",
221
+ "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2",
222
+ "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619",
223
+ "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a",
224
+ "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a",
225
+ "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd",
226
+ "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7",
227
+ "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666",
228
+ "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65",
229
+ "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859",
230
+ "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625",
231
+ "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff",
232
+ "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156",
233
+ "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd",
234
+ "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba",
235
+ "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f",
236
+ "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1",
237
+ "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094",
238
+ "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a",
239
+ "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513",
240
+ "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed",
241
+ "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d",
242
+ "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3",
243
+ "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147",
244
+ "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c",
245
+ "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603",
246
+ "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601",
247
+ "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a",
248
+ "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1",
249
+ "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d",
250
+ "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3",
251
+ "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54",
252
+ "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2",
253
+ "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6",
254
+ "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"
171
255
  ],
172
256
  "markers": "python_version >= '3.7'",
173
- "version": "==2.1.1"
257
+ "version": "==2.1.2"
174
258
  },
175
259
  "packaging": {
176
260
  "hashes": [
177
- "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3",
178
- "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"
261
+ "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2",
262
+ "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"
179
263
  ],
180
264
  "markers": "python_version >= '3.7'",
181
- "version": "==22.0"
265
+ "version": "==23.0"
182
266
  },
183
267
  "pygments": {
184
268
  "hashes": [
185
- "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1",
186
- "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"
269
+ "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297",
270
+ "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"
187
271
  ],
188
272
  "markers": "python_version >= '3.6'",
189
- "version": "==2.13.0"
273
+ "version": "==2.14.0"
190
274
  },
191
275
  "python-slugify": {
192
276
  "hashes": [
@@ -203,19 +287,19 @@
203
287
  },
204
288
  "requests": {
205
289
  "hashes": [
206
- "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983",
207
- "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
290
+ "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa",
291
+ "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"
208
292
  ],
209
293
  "markers": "python_version >= '3.7' and python_version < '4'",
210
- "version": "==2.28.1"
294
+ "version": "==2.28.2"
211
295
  },
212
296
  "setuptools": {
213
297
  "hashes": [
214
- "sha256:57f6f22bde4e042978bcd50176fdb381d7c21a9efa4041202288d3737a0c6a54",
215
- "sha256:a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75"
298
+ "sha256:2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077",
299
+ "sha256:b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2"
216
300
  ],
217
301
  "markers": "python_version >= '3.7'",
218
- "version": "==65.6.3"
302
+ "version": "==67.6.0"
219
303
  },
220
304
  "six": {
221
305
  "hashes": [
@@ -242,11 +326,11 @@
242
326
  },
243
327
  "sphinx": {
244
328
  "hashes": [
245
- "sha256:060ca5c9f7ba57a08a1219e547b269fadf125ae25b06b9fa7f66768efb652d6d",
246
- "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"
329
+ "sha256:0dac3b698538ffef41716cf97ba26c1c7788dba73ce6f150c1ff5b4720786dd2",
330
+ "sha256:807d1cb3d6be87eb78a381c3e70ebd8d346b9a25f3753e9947e866b2786865fc"
247
331
  ],
248
332
  "index": "pypi",
249
- "version": "==5.3.0"
333
+ "version": "==6.1.3"
250
334
  },
251
335
  "sphinx-autobuild": {
252
336
  "hashes": [
@@ -258,27 +342,27 @@
258
342
  },
259
343
  "sphinx-intl": {
260
344
  "hashes": [
261
- "sha256:2ff97cba0e4e43249e339a3c29dd2f5b63c25ce794050aabca320ad95f5c5b55",
262
- "sha256:b25a6ec169347909e8d983eefe2d8adecb3edc2f27760db79b965c69950638b4"
345
+ "sha256:9798946b995989de691387651d70c3fc191275b587e2e519655541edfd7bbd68",
346
+ "sha256:9d9849ae42515b39786824e99f1e30db0404c377b01bb022690fc932b0221c02"
263
347
  ],
264
348
  "index": "pypi",
265
- "version": "==2.0.1"
349
+ "version": "==2.1.0"
266
350
  },
267
351
  "sphinx-rtd-theme": {
268
352
  "hashes": [
269
- "sha256:31faa07d3e97c8955637fc3f1423a5ab2c44b74b8cc558a51498c202ce5cbda7",
270
- "sha256:6146c845f1e1947b3c3dd4432c28998a1693ccc742b4f9ad7c63129f0757c103"
353
+ "sha256:a0d8bd1a2ed52e0b338cbe19c4b2eef3c5e7a048769753dac6a9f059c7b641b8",
354
+ "sha256:f823f7e71890abe0ac6aaa6013361ea2696fc8d3e1fa798f463e82bdb77eeff2"
271
355
  ],
272
356
  "index": "pypi",
273
- "version": "==1.1.1"
357
+ "version": "==1.2.0"
274
358
  },
275
359
  "sphinxcontrib-applehelp": {
276
360
  "hashes": [
277
- "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a",
278
- "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"
361
+ "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228",
362
+ "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"
279
363
  ],
280
- "markers": "python_version >= '3.5'",
281
- "version": "==1.0.2"
364
+ "markers": "python_version >= '3.8'",
365
+ "version": "==1.0.4"
282
366
  },
283
367
  "sphinxcontrib-devhelp": {
284
368
  "hashes": [
@@ -290,10 +374,18 @@
290
374
  },
291
375
  "sphinxcontrib-htmlhelp": {
292
376
  "hashes": [
293
- "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07",
294
- "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"
377
+ "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff",
378
+ "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"
295
379
  ],
296
- "markers": "python_version >= '3.6'",
380
+ "markers": "python_version >= '3.8'",
381
+ "version": "==2.0.1"
382
+ },
383
+ "sphinxcontrib-jquery": {
384
+ "hashes": [
385
+ "sha256:8fb65f6dba84bf7bcd1aea1f02ab3955ac34611d838bcc95d4983b805b234daa",
386
+ "sha256:ed47fa425c338ffebe3c37e1cdb56e30eb806116b85f01055b158c7057fdb995"
387
+ ],
388
+ "markers": "python_version >= '3.1'",
297
389
  "version": "==2.0.0"
298
390
  },
299
391
  "sphinxcontrib-jsmath": {
@@ -344,28 +436,21 @@
344
436
  "markers": "python_version > '2.7'",
345
437
  "version": "==6.2"
346
438
  },
347
- "transifex-client": {
348
- "hashes": [
349
- "sha256:11dc95cefe90ebf0cef3749c8c7d85b9d389c05bd0e3389bf117685df562bd5c"
350
- ],
351
- "index": "pypi",
352
- "version": "==0.14.4"
353
- },
354
439
  "urllib3": {
355
440
  "hashes": [
356
- "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc",
357
- "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"
441
+ "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72",
442
+ "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"
358
443
  ],
359
444
  "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
360
- "version": "==1.26.13"
445
+ "version": "==1.26.14"
361
446
  },
362
447
  "zipp": {
363
448
  "hashes": [
364
- "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa",
365
- "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"
449
+ "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b",
450
+ "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"
366
451
  ],
367
452
  "markers": "python_version >= '3.7'",
368
- "version": "==3.11.0"
453
+ "version": "==3.15.0"
369
454
  }
370
455
  },
371
456
  "develop": {}
package/docs/README.md CHANGED
@@ -28,6 +28,12 @@ open http://127.0.0.1:8000
28
28
 
29
29
  ## for i18n
30
30
 
31
+ Install [transifex CLI](https://developers.transifex.com/docs/cli) in your local machine
32
+
33
+ ```bash
34
+ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
35
+ ```
36
+
31
37
  ```bash
32
38
  # initialise (only first time)
33
39
  $tx init
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unvt/charites",
3
- "version": "0.4.0",
3
+ "version": "0.5.2",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "charites": "dist/cli.js"
@@ -14,7 +14,7 @@
14
14
  map.addControl(new maplibregl.NavigationControl(), 'top-right')
15
15
 
16
16
  map.addControl(
17
- new MaplibreLegendControl(
17
+ new MaplibreLegendControl.MaplibreLegendControl(
18
18
  {},
19
19
  {
20
20
  showDefault: true,
@@ -3,10 +3,11 @@
3
3
  <head>
4
4
  <link rel="stylesheet" href="/app.css" />
5
5
  <link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet' />
6
- <link href='https://watergis.github.io/maplibre-gl-legend/maplibre-gl-legend.css' rel='stylesheet' />
6
+ <link href='https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.css' rel='stylesheet' />
7
7
  <title>Charites Live Preview</title>
8
8
  <script src='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js'></script>
9
- <script src="https://watergis.github.io/maplibre-gl-legend/maplibre-gl-legend.js"></script>
9
+ <script src="https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.umd.js"></script>
10
+ <script src="https://unpkg.com/pmtiles@2.7.0/dist/index.js"></script>
10
11
  </head>
11
12
  <body>
12
13
  <div class="overlay">
@@ -17,6 +18,10 @@
17
18
  <label><input type="checkbox" id="showPadding">show Padding</label>
18
19
  </div>
19
20
  <div id="map"></div>
21
+ <script type="text/javascript">
22
+ let protocol = new pmtiles.Protocol()
23
+ maplibregl.addProtocol('pmtiles', protocol.tile)
24
+ </script>
20
25
  <script type="text/javascript" src="/shared.js"></script>
21
26
  <script type="text/javascript" src="/app.js"></script>
22
27
  </body>
@@ -1,21 +1,23 @@
1
1
  ;(async () => {
2
2
  window._charites = {
3
3
  initializeWebSocket: function (map) {
4
- const socket = new WebSocket(`ws://${window.location.host}`)
4
+ const isHttps = window.location.protocol === 'https:'
5
+ const wsProtocol = isHttps ? 'wss' : 'ws'
6
+ const socket = new WebSocket(`${wsProtocol}://${window.location.host}`)
5
7
 
6
8
  socket.addEventListener('message', (message) => {
7
9
  const data = JSON.parse(message.data)
8
10
  if (data.event === 'styleUpdate') {
9
- map.setStyle(`http://${window.location.host}/style.json`)
11
+ map.setStyle(`//${window.location.host}/style.json`)
10
12
  } else if (data.event === 'spriteUpdate') {
11
- map.setStyle(`http://${window.location.host}/style.json`, {
13
+ map.setStyle(`//${window.location.host}/style.json`, {
12
14
  diff: false,
13
15
  })
14
16
  }
15
17
  })
16
18
  },
17
19
  parseMapStyle: async function () {
18
- const mapStyleUrl = `http://${window.location.host}/style.json`
20
+ const mapStyleUrl = `//${window.location.host}/style.json`
19
21
  const mapStyleRes = await fetch(mapStyleUrl)
20
22
  const mapStyleJson = await mapStyleRes.json()
21
23
 
@@ -12,7 +12,7 @@
12
12
  window._charites.initializeWebSocket(map)
13
13
 
14
14
  map.addControl(
15
- new MaplibreLegendControl(
15
+ new MaplibreLegendControl.MaplibreLegendControl(
16
16
  {},
17
17
  {
18
18
  showDefault: true,
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <link rel="stylesheet" href="/app.css" />
5
5
  <title>Charites Live Preview</title>
6
- <link href='https://watergis.github.io/maplibre-gl-legend/maplibre-gl-legend.css' rel='stylesheet' />
6
+ <link href='https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.css' rel='stylesheet' />
7
7
  </head>
8
8
  <body>
9
9
  <div class="overlay">
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  <div id="map"></div>
17
17
  <script type="text/javascript" src="https://cdn.geolonia.com/v1/embed?geolonia-api-key=YOUR-API-KEY"></script>
18
- <script src="https://watergis.github.io/maplibre-gl-legend/maplibre-gl-legend.js"></script>
18
+ <script src="https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.umd.js"></script>
19
19
  <script type="text/javascript" src="/shared.js"></script>
20
20
  <script type="text/javascript" src="/app.js"></script>
21
21
  </body>
@@ -107,16 +107,25 @@ export function buildWatch(
107
107
  sourcePath = source
108
108
  }
109
109
  console.log(path.dirname(sourcePath))
110
+
111
+ const watchCallback = async (event: 'update' | 'remove', file: string) => {
112
+ console.log(`${(event || '').toUpperCase()}: ${file}`)
113
+ try {
114
+ await build(source, destination, options)
115
+ } catch (e) {
116
+ // Nothing to do
117
+ console.warn(
118
+ `WARN: Ignored error in ${file}:\n${e}\nFix the errors above, and try saving the file again.`,
119
+ )
120
+ }
121
+ }
122
+
123
+ // Trigger the watch callback first manually, so the user doesn't need to save the file to create the initial file.
124
+ watchCallback('update', sourcePath)
125
+
110
126
  return watch(
111
127
  path.dirname(sourcePath),
112
128
  { recursive: true, filter: /\.yml$/ },
113
- (event, file) => {
114
- console.log(`${(event || '').toUpperCase()}: ${file}`)
115
- try {
116
- build(source, destination, options)
117
- } catch (e) {
118
- // Nothing to do
119
- }
120
- },
129
+ watchCallback,
121
130
  )
122
131
  }
package/test/init.spec.ts CHANGED
@@ -45,6 +45,7 @@ describe('Test for the `init.ts`.', () => {
45
45
  )
46
46
  })
47
47
 
48
+ /*
48
49
  it('Should produce composited style.yml without layers if tilejson without vector_layers is specified', async () => {
49
50
  const tempStylePath = path.join(
50
51
  __dirname,
@@ -67,6 +68,7 @@ describe('Test for the `init.ts`.', () => {
67
68
  YAML.load(fs.readFileSync(tempStylePath, 'utf-8')),
68
69
  )
69
70
  })
71
+ */
70
72
 
71
73
  it('Should initialize default decomposited style.yml from tilejson provided', async () => {
72
74
  const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'charites-'))