Skip to content

Commit f70ff1a

Browse files
committedJul 9, 2022
Add www and pkg to git
1 parent db6f8fe commit f70ff1a

25 files changed

+2136
-2
lines changed
 

‎.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/target
22
/Cargo.lock
33

4-
pkg
5-
www
4+
node_modules

‎pkg/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

‎pkg/LICENSE-APACHE

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by
13+
the copyright owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all
16+
other entities that control, are controlled by, or are under common
17+
control with that entity. For the purposes of this definition,
18+
"control" means (i) the power, direct or indirect, to cause the
19+
direction or management of such entity, whether by contract or
20+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+
outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+
"You" (or "Your") shall mean an individual or Legal Entity
24+
exercising permissions granted by this License.
25+
26+
"Source" form shall mean the preferred form for making modifications,
27+
including but not limited to software source code, documentation
28+
source, and configuration files.
29+
30+
"Object" form shall mean any form resulting from mechanical
31+
transformation or translation of a Source form, including but
32+
not limited to compiled object code, generated documentation,
33+
and conversions to other media types.
34+
35+
"Work" shall mean the work of authorship, whether in Source or
36+
Object form, made available under the License, as indicated by a
37+
copyright notice that is included in or attached to the work
38+
(an example is provided in the Appendix below).
39+
40+
"Derivative Works" shall mean any work, whether in Source or Object
41+
form, that is based on (or derived from) the Work and for which the
42+
editorial revisions, annotations, elaborations, or other modifications
43+
represent, as a whole, an original work of authorship. For the purposes
44+
of this License, Derivative Works shall not include works that remain
45+
separable from, or merely link (or bind by name) to the interfaces of,
46+
the Work and Derivative Works thereof.
47+
48+
"Contribution" shall mean any work of authorship, including
49+
the original version of the Work and any modifications or additions
50+
to that Work or Derivative Works thereof, that is intentionally
51+
submitted to Licensor for inclusion in the Work by the copyright owner
52+
or by an individual or Legal Entity authorized to submit on behalf of
53+
the copyright owner. For the purposes of this definition, "submitted"
54+
means any form of electronic, verbal, or written communication sent
55+
to the Licensor or its representatives, including but not limited to
56+
communication on electronic mailing lists, source code control systems,
57+
and issue tracking systems that are managed by, or on behalf of, the
58+
Licensor for the purpose of discussing and improving the Work, but
59+
excluding communication that is conspicuously marked or otherwise
60+
designated in writing by the copyright owner as "Not a Contribution."
61+
62+
"Contributor" shall mean Licensor and any individual or Legal Entity
63+
on behalf of whom a Contribution has been received by Licensor and
64+
subsequently incorporated within the Work.
65+
66+
2. Grant of Copyright License. Subject to the terms and conditions of
67+
this License, each Contributor hereby grants to You a perpetual,
68+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+
copyright license to reproduce, prepare Derivative Works of,
70+
publicly display, publicly perform, sublicense, and distribute the
71+
Work and such Derivative Works in Source or Object form.
72+
73+
3. Grant of Patent License. Subject to the terms and conditions of
74+
this License, each Contributor hereby grants to You a perpetual,
75+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+
(except as stated in this section) patent license to make, have made,
77+
use, offer to sell, sell, import, and otherwise transfer the Work,
78+
where such license applies only to those patent claims licensable
79+
by such Contributor that are necessarily infringed by their
80+
Contribution(s) alone or by combination of their Contribution(s)
81+
with the Work to which such Contribution(s) was submitted. If You
82+
institute patent litigation against any entity (including a
83+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84+
or a Contribution incorporated within the Work constitutes direct
85+
or contributory patent infringement, then any patent licenses
86+
granted to You under this License for that Work shall terminate
87+
as of the date such litigation is filed.
88+
89+
4. Redistribution. You may reproduce and distribute copies of the
90+
Work or Derivative Works thereof in any medium, with or without
91+
modifications, and in Source or Object form, provided that You
92+
meet the following conditions:
93+
94+
(a) You must give any other recipients of the Work or
95+
Derivative Works a copy of this License; and
96+
97+
(b) You must cause any modified files to carry prominent notices
98+
stating that You changed the files; and
99+
100+
(c) You must retain, in the Source form of any Derivative Works
101+
that You distribute, all copyright, patent, trademark, and
102+
attribution notices from the Source form of the Work,
103+
excluding those notices that do not pertain to any part of
104+
the Derivative Works; and
105+
106+
(d) If the Work includes a "NOTICE" text file as part of its
107+
distribution, then any Derivative Works that You distribute must
108+
include a readable copy of the attribution notices contained
109+
within such NOTICE file, excluding those notices that do not
110+
pertain to any part of the Derivative Works, in at least one
111+
of the following places: within a NOTICE text file distributed
112+
as part of the Derivative Works; within the Source form or
113+
documentation, if provided along with the Derivative Works; or,
114+
within a display generated by the Derivative Works, if and
115+
wherever such third-party notices normally appear. The contents
116+
of the NOTICE file are for informational purposes only and
117+
do not modify the License. You may add Your own attribution
118+
notices within Derivative Works that You distribute, alongside
119+
or as an addendum to the NOTICE text from the Work, provided
120+
that such additional attribution notices cannot be construed
121+
as modifying the License.
122+
123+
You may add Your own copyright statement to Your modifications and
124+
may provide additional or different license terms and conditions
125+
for use, reproduction, or distribution of Your modifications, or
126+
for any such Derivative Works as a whole, provided Your use,
127+
reproduction, and distribution of the Work otherwise complies with
128+
the conditions stated in this License.
129+
130+
5. Submission of Contributions. Unless You explicitly state otherwise,
131+
any Contribution intentionally submitted for inclusion in the Work
132+
by You to the Licensor shall be under the terms and conditions of
133+
this License, without any additional terms or conditions.
134+
Notwithstanding the above, nothing herein shall supersede or modify
135+
the terms of any separate license agreement you may have executed
136+
with Licensor regarding such Contributions.
137+
138+
6. Trademarks. This License does not grant permission to use the trade
139+
names, trademarks, service marks, or product names of the Licensor,
140+
except as required for reasonable and customary use in describing the
141+
origin of the Work and reproducing the content of the NOTICE file.
142+
143+
7. Disclaimer of Warranty. Unless required by applicable law or
144+
agreed to in writing, Licensor provides the Work (and each
145+
Contributor provides its Contributions) on an "AS IS" BASIS,
146+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+
implied, including, without limitation, any warranties or conditions
148+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+
PARTICULAR PURPOSE. You are solely responsible for determining the
150+
appropriateness of using or redistributing the Work and assume any
151+
risks associated with Your exercise of permissions under this License.
152+
153+
8. Limitation of Liability. In no event and under no legal theory,
154+
whether in tort (including negligence), contract, or otherwise,
155+
unless required by applicable law (such as deliberate and grossly
156+
negligent acts) or agreed to in writing, shall any Contributor be
157+
liable to You for damages, including any direct, indirect, special,
158+
incidental, or consequential damages of any character arising as a
159+
result of this License or out of the use or inability to use the
160+
Work (including but not limited to damages for loss of goodwill,
161+
work stoppage, computer failure or malfunction, or any and all
162+
other commercial damages or losses), even if such Contributor
163+
has been advised of the possibility of such damages.
164+
165+
9. Accepting Warranty or Additional Liability. While redistributing
166+
the Work or Derivative Works thereof, You may choose to offer,
167+
and charge a fee for, acceptance of support, warranty, indemnity,
168+
or other liability obligations and/or rights consistent with this
169+
License. However, in accepting such obligations, You may act only
170+
on Your own behalf and on Your sole responsibility, not on behalf
171+
of any other Contributor, and only if You agree to indemnify,
172+
defend, and hold each Contributor harmless for any liability
173+
incurred by, or claims asserted against, such Contributor by reason
174+
of your accepting any such warranty or additional liability.
175+
176+
END OF TERMS AND CONDITIONS
177+
178+
APPENDIX: How to apply the Apache License to your work.
179+
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
188+
189+
Copyright [yyyy] [name of copyright owner]
190+
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
194+
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.

‎pkg/LICENSE-MIT

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Roman Ponomarev
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 all
13+
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 THE
21+
SOFTWARE.

‎pkg/README.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# text-to-sounds
2+
3+
[![build-svg]][build-url]
4+
[![test-svg]][test-url]
5+
[![codecov-svg]][codecov-url]
6+
[![crates-svg]][crates-url]
7+
[![docs-svg]][docs-url]
8+
[![deps-svg]][deps-url]
9+
10+
[build-svg]: https://github.com/maksugr/text-to-sounds/workflows/build/badge.svg
11+
[build-url]: https://github.com/maksugr/text-to-sounds/actions/workflows/build.yml
12+
[test-svg]: https://github.com/maksugr/text-to-sounds/workflows/test/badge.svg
13+
[test-url]: https://github.com/maksugr/text-to-sounds/actions/workflows/test.yml
14+
[codecov-svg]: https://img.shields.io/codecov/c/github/maksugr/text-to-sounds
15+
[codecov-url]: https://codecov.io/gh/maksugr/text-to-sounds
16+
[crates-svg]: https://img.shields.io/crates/v/text-to-sounds.svg
17+
[crates-url]: https://crates.io/crates/text-to-sounds
18+
[docs-svg]: https://docs.rs/text-to-sounds/badge.svg
19+
[docs-url]: https://docs.rs/text-to-sounds
20+
[deps-svg]: https://deps.rs/repo/github/maksugr/text-to-sounds/status.svg
21+
[deps-url]: https://deps.rs/repo/github/maksugr/text-to-sounds
22+
23+
Text-to-sounds parsing tool.
24+
25+
## Overview
26+
27+
The library has methods (`parse`, `serialize`) to parse text (`AsRef<str>`) to `Vec<Sound>` and serialize `Vec<Sound>` to `String`. `Sound` struct has information about English sound.
28+
29+
```rust
30+
use uuid::Uuid;
31+
32+
// English sound kinds
33+
enum SoundKind {
34+
Ptk,
35+
Th,
36+
W,
37+
V,
38+
Ng,
39+
Ch,
40+
Dj,
41+
Undefined,
42+
}
43+
44+
// Struct of the sound
45+
pub struct Sound {
46+
id: Uuid,
47+
kind: SoundKind,
48+
text: String,
49+
}
50+
```
51+
52+
## Installation
53+
54+
In order to use this crate, you have to add it under `[dependencies]` to your `Cargo.toml`:
55+
56+
```toml
57+
[dependencies]
58+
text-to-sounds = "0.3.1"
59+
```
60+
61+
## Examples
62+
63+
```rust
64+
use text_to_sounds::{parse, serialize, SoundKind, Sound};
65+
66+
let sounds = vec![
67+
Sound::new(SoundKind::Th, String::from("Th")),
68+
Sound::new(SoundKind::Undefined, String::from("e")),
69+
Sound::new(SoundKind::Undefined, String::from(" ")),
70+
Sound::new(SoundKind::Ptk, String::from("t")),
71+
Sound::new(SoundKind::Undefined, String::from("e")),
72+
Sound::new(SoundKind::Undefined, String::from("x")),
73+
Sound::new(SoundKind::Ptk, String::from("t")),
74+
Sound::new(SoundKind::Undefined, String::from(" ")),
75+
Sound::new(SoundKind::Dj, String::from("j")),
76+
Sound::new(SoundKind::Undefined, String::from("u")),
77+
Sound::new(SoundKind::Undefined, String::from("s")),
78+
Sound::new(SoundKind::Ptk, String::from("t")),
79+
Sound::new(SoundKind::Undefined, String::from(" ")),
80+
Sound::new(SoundKind::Undefined, String::from("i")),
81+
Sound::new(SoundKind::Undefined, String::from("n")),
82+
Sound::new(SoundKind::Undefined, String::from(" ")),
83+
Sound::new(SoundKind::Ptk, String::from("c")),
84+
Sound::new(SoundKind::Undefined, String::from("a")),
85+
Sound::new(SoundKind::Undefined, String::from("s")),
86+
Sound::new(SoundKind::Undefined, String::from("e")),
87+
];
88+
89+
// parse
90+
assert_eq!(parse("The text just in case"), sounds);
91+
92+
// serialize
93+
assert_eq!(serialize(sounds), "The text just in case");
94+
```
95+
96+
Also, you can consider tests inside the files.

‎pkg/package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "text-to-sounds",
3+
"collaborators": [
4+
"maksugr <maksugr@gmail.com>"
5+
],
6+
"description": "Text-to-sounds parsing tool.",
7+
"version": "0.3.1",
8+
"license": "MIT OR Apache-2.0",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/maksugr/text-to-sounds"
12+
},
13+
"files": [
14+
"text_to_sounds_bg.wasm",
15+
"text_to_sounds.js",
16+
"text_to_sounds_bg.js",
17+
"text_to_sounds.d.ts",
18+
"LICENSE-APACHE",
19+
"LICENSE-MIT"
20+
],
21+
"module": "text_to_sounds.js",
22+
"homepage": "https://github.com/maksugr/text-to-sounds",
23+
"types": "text_to_sounds.d.ts",
24+
"sideEffects": false,
25+
"keywords": [
26+
"parsing",
27+
"wasm",
28+
"webassembly",
29+
"english",
30+
"grammar"
31+
]
32+
}

‎pkg/text_to_sounds.d.ts

+268
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Parse text to sounds (wasm)
5+
*
6+
* Currently it's not possible to define exact returned type
7+
* And it defined as `any`
8+
* https://github.com/rustwasm/wasm-bindgen/issues/1591
9+
* But the exact type is Array<Sound> (see signature of the `serialize_wasm` function)
10+
* Also consider example below to get more information
11+
*
12+
* ## Example
13+
*
14+
* ```js
15+
* import {parse_wasm} from "text-to-sounds";
16+
*
17+
* const sounds_from_text = parse_wasm("The text just in case");
18+
* const target_sounds = [
19+
* {
20+
* "id": "96286ace-3209-4db5-a4b9-5f59e3aa48db",
21+
* "kind": "Th",
22+
* "text": "Th"
23+
* },
24+
* {
25+
* "id": "581a0df7-b186-4ee0-bc77-87e097a211a4",
26+
* "kind": "Undefined",
27+
* "text": "e"
28+
* },
29+
* {
30+
* "id": "fbe03258-b1a2-4cb1-95ea-d86fc0af15dc",
31+
* "kind": "Undefined",
32+
* "text": " "
33+
* },
34+
* {
35+
* "id": "fe613f4e-d94c-442d-97c7-043861ed1eaa",
36+
* "kind": "Ptk",
37+
* "text": "t"
38+
* },
39+
* {
40+
* "id": "d0955b71-27d9-4db9-9fa6-2d0a9ed382e9",
41+
* "kind": "Undefined",
42+
* "text": "e"
43+
* },
44+
* {
45+
* "id": "a4694dae-992f-4d4b-b8a9-c69cb204b515",
46+
* "kind": "Undefined",
47+
* "text": "x"
48+
* },
49+
* {
50+
* "id": "a856290f-2f98-4235-879b-b73971822873",
51+
* "kind": "Ptk",
52+
* "text": "t"
53+
* },
54+
* {
55+
* "id": "b6c92eae-5d9c-4f82-b7b6-a3ec784d70c6",
56+
* "kind": "Undefined",
57+
* "text": " "
58+
* },
59+
* {
60+
* "id": "c02e3bb9-39f8-478f-8812-bb2aeebffadd",
61+
* "kind": "Dj",
62+
* "text": "j"
63+
* },
64+
* {
65+
* "id": "f28a0cf2-7502-41c2-8605-9572c057ad5c",
66+
* "kind": "Undefined",
67+
* "text": "u"
68+
* },
69+
* {
70+
* "id": "8141c8ee-88fe-47a7-9996-3091932232de",
71+
* "kind": "Undefined",
72+
* "text": "s"
73+
* },
74+
* {
75+
* "id": "f97943fe-4c28-4650-9136-4f88a127e58d",
76+
* "kind": "Ptk",
77+
* "text": "t"
78+
* },
79+
* {
80+
* "id": "c7e1a64f-e69e-4b58-9541-57db30556c48",
81+
* "kind": "Undefined",
82+
* "text": " "
83+
* },
84+
* {
85+
* "id": "76d84df7-871b-483c-b881-3d83aac54712",
86+
* "kind": "Undefined",
87+
* "text": "i"
88+
* },
89+
* {
90+
* "id": "7a04b7fd-93f6-4280-b35c-6ba74860d179",
91+
* "kind": "Undefined",
92+
* "text": "n"
93+
* },
94+
* {
95+
* "id": "6977fd36-9853-4196-ba13-6fc339178a14",
96+
* "kind": "Undefined",
97+
* "text": " "
98+
* },
99+
* {
100+
* "id": "98fe1a9f-1b29-4544-8a39-c411441dbdd5",
101+
* "kind": "Ptk",
102+
* "text": "c"
103+
* },
104+
* {
105+
* "id": "a72ef6d2-eb3c-477c-8d2e-6e73098f1446",
106+
* "kind": "Undefined",
107+
* "text": "a"
108+
* },
109+
* {
110+
* "id": "35ea88ed-a12e-4bc6-b553-1ee45798a157",
111+
* "kind": "Undefined",
112+
* "text": "s"
113+
* },
114+
* {
115+
* "id": "c86762e5-5b39-4f3b-bc25-b009a6025434",
116+
* "kind": "Undefined",
117+
* "text": "e"
118+
* }
119+
* ];
120+
*
121+
* console.log(sounds_from_text.every((sound, index) =>
122+
* sound.kind === target_sounds[index].kind &&
123+
* sound.text === target_sounds[index].text
124+
* )); // true
125+
* ```
126+
* @param {string} text
127+
* @returns {any}
128+
*/
129+
export function parse_wasm(text: string): any;
130+
/**
131+
* Serialize sounds to text (wasm)
132+
*
133+
* ## Example
134+
*
135+
* ```js
136+
* import {serialize_wasm} from "text-to-sounds";
137+
*
138+
* const sounds = [
139+
* {
140+
* "id": "96286ace-3209-4db5-a4b9-5f59e3aa48db",
141+
* "kind": "Th",
142+
* "text": "Th"
143+
* },
144+
* {
145+
* "id": "581a0df7-b186-4ee0-bc77-87e097a211a4",
146+
* "kind": "Undefined",
147+
* "text": "e"
148+
* },
149+
* {
150+
* "id": "fbe03258-b1a2-4cb1-95ea-d86fc0af15dc",
151+
* "kind": "Undefined",
152+
* "text": " "
153+
* },
154+
* {
155+
* "id": "fe613f4e-d94c-442d-97c7-043861ed1eaa",
156+
* "kind": "Ptk",
157+
* "text": "t"
158+
* },
159+
* {
160+
* "id": "d0955b71-27d9-4db9-9fa6-2d0a9ed382e9",
161+
* "kind": "Undefined",
162+
* "text": "e"
163+
* },
164+
* {
165+
* "id": "a4694dae-992f-4d4b-b8a9-c69cb204b515",
166+
* "kind": "Undefined",
167+
* "text": "x"
168+
* },
169+
* {
170+
* "id": "a856290f-2f98-4235-879b-b73971822873",
171+
* "kind": "Ptk",
172+
* "text": "t"
173+
* },
174+
* {
175+
* "id": "b6c92eae-5d9c-4f82-b7b6-a3ec784d70c6",
176+
* "kind": "Undefined",
177+
* "text": " "
178+
* },
179+
* {
180+
* "id": "c02e3bb9-39f8-478f-8812-bb2aeebffadd",
181+
* "kind": "Dj",
182+
* "text": "j"
183+
* },
184+
* {
185+
* "id": "f28a0cf2-7502-41c2-8605-9572c057ad5c",
186+
* "kind": "Undefined",
187+
* "text": "u"
188+
* },
189+
* {
190+
* "id": "8141c8ee-88fe-47a7-9996-3091932232de",
191+
* "kind": "Undefined",
192+
* "text": "s"
193+
* },
194+
* {
195+
* "id": "f97943fe-4c28-4650-9136-4f88a127e58d",
196+
* "kind": "Ptk",
197+
* "text": "t"
198+
* },
199+
* {
200+
* "id": "c7e1a64f-e69e-4b58-9541-57db30556c48",
201+
* "kind": "Undefined",
202+
* "text": " "
203+
* },
204+
* {
205+
* "id": "76d84df7-871b-483c-b881-3d83aac54712",
206+
* "kind": "Undefined",
207+
* "text": "i"
208+
* },
209+
* {
210+
* "id": "7a04b7fd-93f6-4280-b35c-6ba74860d179",
211+
* "kind": "Undefined",
212+
* "text": "n"
213+
* },
214+
* {
215+
* "id": "6977fd36-9853-4196-ba13-6fc339178a14",
216+
* "kind": "Undefined",
217+
* "text": " "
218+
* },
219+
* {
220+
* "id": "98fe1a9f-1b29-4544-8a39-c411441dbdd5",
221+
* "kind": "Ptk",
222+
* "text": "c"
223+
* },
224+
* {
225+
* "id": "a72ef6d2-eb3c-477c-8d2e-6e73098f1446",
226+
* "kind": "Undefined",
227+
* "text": "a"
228+
* },
229+
* {
230+
* "id": "35ea88ed-a12e-4bc6-b553-1ee45798a157",
231+
* "kind": "Undefined",
232+
* "text": "s"
233+
* },
234+
* {
235+
* "id": "c86762e5-5b39-4f3b-bc25-b009a6025434",
236+
* "kind": "Undefined",
237+
* "text": "e"
238+
* }
239+
* ];
240+
* const text_from_sounds = serialize_wasm(sounds);
241+
*
242+
* console.log(text_from_sounds === "The text just in case"); // true
243+
* ```
244+
* @param {Array<ISound>} sounds
245+
* @returns {string}
246+
*/
247+
export function serialize_wasm(sounds: Array<ISound>): string;
248+
249+
export declare enum SoundKindEnum {
250+
PTK = 'Ptk',
251+
TH = 'Th',
252+
W = 'W',
253+
V = 'V',
254+
NG = 'Ng',
255+
CH = 'Ch',
256+
DJ = 'Dj',
257+
UNDEFINED = 'Undefined'
258+
}
259+
260+
261+
262+
export declare interface ISound {
263+
readonly id: string;
264+
readonly kind: SoundKindEnum;
265+
readonly text: string;
266+
}
267+
268+

‎pkg/text_to_sounds.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import * as wasm from "./text_to_sounds_bg.wasm";
2+
export * from "./text_to_sounds_bg.js";

‎pkg/text_to_sounds_bg.js

+549
Large diffs are not rendered by default.

‎pkg/text_to_sounds_bg.wasm

108 KB
Binary file not shown.

‎pkg/text_to_sounds_bg.wasm.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export const memory: WebAssembly.Memory;
4+
export function parse_wasm(a: number, b: number): number;
5+
export function serialize_wasm(a: number, b: number): void;
6+
export function __wbindgen_malloc(a: number): number;
7+
export function __wbindgen_realloc(a: number, b: number, c: number): number;
8+
export function __wbindgen_add_to_stack_pointer(a: number): number;
9+
export function __wbindgen_free(a: number, b: number): void;
10+
export function __wbindgen_exn_store(a: number): void;

‎www/.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 4
10+

‎www/LICENSE-APACHE

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by
13+
the copyright owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all
16+
other entities that control, are controlled by, or are under common
17+
control with that entity. For the purposes of this definition,
18+
"control" means (i) the power, direct or indirect, to cause the
19+
direction or management of such entity, whether by contract or
20+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+
outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+
"You" (or "Your") shall mean an individual or Legal Entity
24+
exercising permissions granted by this License.
25+
26+
"Source" form shall mean the preferred form for making modifications,
27+
including but not limited to software source code, documentation
28+
source, and configuration files.
29+
30+
"Object" form shall mean any form resulting from mechanical
31+
transformation or translation of a Source form, including but
32+
not limited to compiled object code, generated documentation,
33+
and conversions to other media types.
34+
35+
"Work" shall mean the work of authorship, whether in Source or
36+
Object form, made available under the License, as indicated by a
37+
copyright notice that is included in or attached to the work
38+
(an example is provided in the Appendix below).
39+
40+
"Derivative Works" shall mean any work, whether in Source or Object
41+
form, that is based on (or derived from) the Work and for which the
42+
editorial revisions, annotations, elaborations, or other modifications
43+
represent, as a whole, an original work of authorship. For the purposes
44+
of this License, Derivative Works shall not include works that remain
45+
separable from, or merely link (or bind by name) to the interfaces of,
46+
the Work and Derivative Works thereof.
47+
48+
"Contribution" shall mean any work of authorship, including
49+
the original version of the Work and any modifications or additions
50+
to that Work or Derivative Works thereof, that is intentionally
51+
submitted to Licensor for inclusion in the Work by the copyright owner
52+
or by an individual or Legal Entity authorized to submit on behalf of
53+
the copyright owner. For the purposes of this definition, "submitted"
54+
means any form of electronic, verbal, or written communication sent
55+
to the Licensor or its representatives, including but not limited to
56+
communication on electronic mailing lists, source code control systems,
57+
and issue tracking systems that are managed by, or on behalf of, the
58+
Licensor for the purpose of discussing and improving the Work, but
59+
excluding communication that is conspicuously marked or otherwise
60+
designated in writing by the copyright owner as "Not a Contribution."
61+
62+
"Contributor" shall mean Licensor and any individual or Legal Entity
63+
on behalf of whom a Contribution has been received by Licensor and
64+
subsequently incorporated within the Work.
65+
66+
2. Grant of Copyright License. Subject to the terms and conditions of
67+
this License, each Contributor hereby grants to You a perpetual,
68+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+
copyright license to reproduce, prepare Derivative Works of,
70+
publicly display, publicly perform, sublicense, and distribute the
71+
Work and such Derivative Works in Source or Object form.
72+
73+
3. Grant of Patent License. Subject to the terms and conditions of
74+
this License, each Contributor hereby grants to You a perpetual,
75+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+
(except as stated in this section) patent license to make, have made,
77+
use, offer to sell, sell, import, and otherwise transfer the Work,
78+
where such license applies only to those patent claims licensable
79+
by such Contributor that are necessarily infringed by their
80+
Contribution(s) alone or by combination of their Contribution(s)
81+
with the Work to which such Contribution(s) was submitted. If You
82+
institute patent litigation against any entity (including a
83+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84+
or a Contribution incorporated within the Work constitutes direct
85+
or contributory patent infringement, then any patent licenses
86+
granted to You under this License for that Work shall terminate
87+
as of the date such litigation is filed.
88+
89+
4. Redistribution. You may reproduce and distribute copies of the
90+
Work or Derivative Works thereof in any medium, with or without
91+
modifications, and in Source or Object form, provided that You
92+
meet the following conditions:
93+
94+
(a) You must give any other recipients of the Work or
95+
Derivative Works a copy of this License; and
96+
97+
(b) You must cause any modified files to carry prominent notices
98+
stating that You changed the files; and
99+
100+
(c) You must retain, in the Source form of any Derivative Works
101+
that You distribute, all copyright, patent, trademark, and
102+
attribution notices from the Source form of the Work,
103+
excluding those notices that do not pertain to any part of
104+
the Derivative Works; and
105+
106+
(d) If the Work includes a "NOTICE" text file as part of its
107+
distribution, then any Derivative Works that You distribute must
108+
include a readable copy of the attribution notices contained
109+
within such NOTICE file, excluding those notices that do not
110+
pertain to any part of the Derivative Works, in at least one
111+
of the following places: within a NOTICE text file distributed
112+
as part of the Derivative Works; within the Source form or
113+
documentation, if provided along with the Derivative Works; or,
114+
within a display generated by the Derivative Works, if and
115+
wherever such third-party notices normally appear. The contents
116+
of the NOTICE file are for informational purposes only and
117+
do not modify the License. You may add Your own attribution
118+
notices within Derivative Works that You distribute, alongside
119+
or as an addendum to the NOTICE text from the Work, provided
120+
that such additional attribution notices cannot be construed
121+
as modifying the License.
122+
123+
You may add Your own copyright statement to Your modifications and
124+
may provide additional or different license terms and conditions
125+
for use, reproduction, or distribution of Your modifications, or
126+
for any such Derivative Works as a whole, provided Your use,
127+
reproduction, and distribution of the Work otherwise complies with
128+
the conditions stated in this License.
129+
130+
5. Submission of Contributions. Unless You explicitly state otherwise,
131+
any Contribution intentionally submitted for inclusion in the Work
132+
by You to the Licensor shall be under the terms and conditions of
133+
this License, without any additional terms or conditions.
134+
Notwithstanding the above, nothing herein shall supersede or modify
135+
the terms of any separate license agreement you may have executed
136+
with Licensor regarding such Contributions.
137+
138+
6. Trademarks. This License does not grant permission to use the trade
139+
names, trademarks, service marks, or product names of the Licensor,
140+
except as required for reasonable and customary use in describing the
141+
origin of the Work and reproducing the content of the NOTICE file.
142+
143+
7. Disclaimer of Warranty. Unless required by applicable law or
144+
agreed to in writing, Licensor provides the Work (and each
145+
Contributor provides its Contributions) on an "AS IS" BASIS,
146+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+
implied, including, without limitation, any warranties or conditions
148+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+
PARTICULAR PURPOSE. You are solely responsible for determining the
150+
appropriateness of using or redistributing the Work and assume any
151+
risks associated with Your exercise of permissions under this License.
152+
153+
8. Limitation of Liability. In no event and under no legal theory,
154+
whether in tort (including negligence), contract, or otherwise,
155+
unless required by applicable law (such as deliberate and grossly
156+
negligent acts) or agreed to in writing, shall any Contributor be
157+
liable to You for damages, including any direct, indirect, special,
158+
incidental, or consequential damages of any character arising as a
159+
result of this License or out of the use or inability to use the
160+
Work (including but not limited to damages for loss of goodwill,
161+
work stoppage, computer failure or malfunction, or any and all
162+
other commercial damages or losses), even if such Contributor
163+
has been advised of the possibility of such damages.
164+
165+
9. Accepting Warranty or Additional Liability. While redistributing
166+
the Work or Derivative Works thereof, You may choose to offer,
167+
and charge a fee for, acceptance of support, warranty, indemnity,
168+
or other liability obligations and/or rights consistent with this
169+
License. However, in accepting such obligations, You may act only
170+
on Your own behalf and on Your sole responsibility, not on behalf
171+
of any other Contributor, and only if You agree to indemnify,
172+
defend, and hold each Contributor harmless for any liability
173+
incurred by, or claims asserted against, such Contributor by reason
174+
of your accepting any such warranty or additional liability.
175+
176+
END OF TERMS AND CONDITIONS
177+
178+
APPENDIX: How to apply the Apache License to your work.
179+
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
188+
189+
Copyright [yyyy] [name of copyright owner]
190+
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
194+
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.

‎www/LICENSE-MIT

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Roman Ponomarev
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 all
13+
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 THE
21+
SOFTWARE.

‎www/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Spoken Sounds Highlighter

‎www/bootstrap.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// A dependency graph that contains any wasm must all be imported
2+
// asynchronously. This `bootstrap.js` file does the single async import, so
3+
// that no one else needs to worry about it again.
4+
import("./index.js")
5+
.catch(e => console.error("Error importing `index.js`:", e));

‎www/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Spoken Sounds Highlighter</title>
6+
</head>
7+
<body>
8+
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
9+
<script src="./bootstrap.js"></script>
10+
</body>
11+
</html>

‎www/index.js

+217
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
import {parse_wasm, serialize_wasm} from "text-to-sounds";
2+
3+
const sounds_from_text = parse_wasm("The text just in case");
4+
const target_sounds = [
5+
{
6+
"id": "96286ace-3209-4db5-a4b9-5f59e3aa48db",
7+
"kind": "Th",
8+
"text": "Th"
9+
},
10+
{
11+
"id": "581a0df7-b186-4ee0-bc77-87e097a211a4",
12+
"kind": "Undefined",
13+
"text": "e"
14+
},
15+
{
16+
"id": "fbe03258-b1a2-4cb1-95ea-d86fc0af15dc",
17+
"kind": "Undefined",
18+
"text": " "
19+
},
20+
{
21+
"id": "fe613f4e-d94c-442d-97c7-043861ed1eaa",
22+
"kind": "Ptk",
23+
"text": "t"
24+
},
25+
{
26+
"id": "d0955b71-27d9-4db9-9fa6-2d0a9ed382e9",
27+
"kind": "Undefined",
28+
"text": "e"
29+
},
30+
{
31+
"id": "a4694dae-992f-4d4b-b8a9-c69cb204b515",
32+
"kind": "Undefined",
33+
"text": "x"
34+
},
35+
{
36+
"id": "a856290f-2f98-4235-879b-b73971822873",
37+
"kind": "Ptk",
38+
"text": "t"
39+
},
40+
{
41+
"id": "b6c92eae-5d9c-4f82-b7b6-a3ec784d70c6",
42+
"kind": "Undefined",
43+
"text": " "
44+
},
45+
{
46+
"id": "c02e3bb9-39f8-478f-8812-bb2aeebffadd",
47+
"kind": "Dj",
48+
"text": "j"
49+
},
50+
{
51+
"id": "f28a0cf2-7502-41c2-8605-9572c057ad5c",
52+
"kind": "Undefined",
53+
"text": "u"
54+
},
55+
{
56+
"id": "8141c8ee-88fe-47a7-9996-3091932232de",
57+
"kind": "Undefined",
58+
"text": "s"
59+
},
60+
{
61+
"id": "f97943fe-4c28-4650-9136-4f88a127e58d",
62+
"kind": "Ptk",
63+
"text": "t"
64+
},
65+
{
66+
"id": "c7e1a64f-e69e-4b58-9541-57db30556c48",
67+
"kind": "Undefined",
68+
"text": " "
69+
},
70+
{
71+
"id": "76d84df7-871b-483c-b881-3d83aac54712",
72+
"kind": "Undefined",
73+
"text": "i"
74+
},
75+
{
76+
"id": "7a04b7fd-93f6-4280-b35c-6ba74860d179",
77+
"kind": "Undefined",
78+
"text": "n"
79+
},
80+
{
81+
"id": "6977fd36-9853-4196-ba13-6fc339178a14",
82+
"kind": "Undefined",
83+
"text": " "
84+
},
85+
{
86+
"id": "98fe1a9f-1b29-4544-8a39-c411441dbdd5",
87+
"kind": "Ptk",
88+
"text": "c"
89+
},
90+
{
91+
"id": "a72ef6d2-eb3c-477c-8d2e-6e73098f1446",
92+
"kind": "Undefined",
93+
"text": "a"
94+
},
95+
{
96+
"id": "35ea88ed-a12e-4bc6-b553-1ee45798a157",
97+
"kind": "Undefined",
98+
"text": "s"
99+
},
100+
{
101+
"id": "c86762e5-5b39-4f3b-bc25-b009a6025434",
102+
"kind": "Undefined",
103+
"text": "e"
104+
}
105+
];
106+
107+
console.log(sounds_from_text.every((sound, index) =>
108+
sound.kind === target_sounds[index].kind &&
109+
sound.text === target_sounds[index].text
110+
)); // true
111+
112+
const sounds = [
113+
{
114+
"id": "96286ace-3209-4db5-a4b9-5f59e3aa48db",
115+
"kind": "Th",
116+
"text": "Th"
117+
},
118+
{
119+
"id": "581a0df7-b186-4ee0-bc77-87e097a211a4",
120+
"kind": "Undefined",
121+
"text": "e"
122+
},
123+
{
124+
"id": "fbe03258-b1a2-4cb1-95ea-d86fc0af15dc",
125+
"kind": "Undefined",
126+
"text": " "
127+
},
128+
{
129+
"id": "fe613f4e-d94c-442d-97c7-043861ed1eaa",
130+
"kind": "Ptk",
131+
"text": "t"
132+
},
133+
{
134+
"id": "d0955b71-27d9-4db9-9fa6-2d0a9ed382e9",
135+
"kind": "Undefined",
136+
"text": "e"
137+
},
138+
{
139+
"id": "a4694dae-992f-4d4b-b8a9-c69cb204b515",
140+
"kind": "Undefined",
141+
"text": "x"
142+
},
143+
{
144+
"id": "a856290f-2f98-4235-879b-b73971822873",
145+
"kind": "Ptk",
146+
"text": "t"
147+
},
148+
{
149+
"id": "b6c92eae-5d9c-4f82-b7b6-a3ec784d70c6",
150+
"kind": "Undefined",
151+
"text": " "
152+
},
153+
{
154+
"id": "c02e3bb9-39f8-478f-8812-bb2aeebffadd",
155+
"kind": "Dj",
156+
"text": "j"
157+
},
158+
{
159+
"id": "f28a0cf2-7502-41c2-8605-9572c057ad5c",
160+
"kind": "Undefined",
161+
"text": "u"
162+
},
163+
{
164+
"id": "8141c8ee-88fe-47a7-9996-3091932232de",
165+
"kind": "Undefined",
166+
"text": "s"
167+
},
168+
{
169+
"id": "f97943fe-4c28-4650-9136-4f88a127e58d",
170+
"kind": "Ptk",
171+
"text": "t"
172+
},
173+
{
174+
"id": "c7e1a64f-e69e-4b58-9541-57db30556c48",
175+
"kind": "Undefined",
176+
"text": " "
177+
},
178+
{
179+
"id": "76d84df7-871b-483c-b881-3d83aac54712",
180+
"kind": "Undefined",
181+
"text": "i"
182+
},
183+
{
184+
"id": "7a04b7fd-93f6-4280-b35c-6ba74860d179",
185+
"kind": "Undefined",
186+
"text": "n"
187+
},
188+
{
189+
"id": "6977fd36-9853-4196-ba13-6fc339178a14",
190+
"kind": "Undefined",
191+
"text": " "
192+
},
193+
{
194+
"id": "98fe1a9f-1b29-4544-8a39-c411441dbdd5",
195+
"kind": "Ptk",
196+
"text": "c"
197+
},
198+
{
199+
"id": "a72ef6d2-eb3c-477c-8d2e-6e73098f1446",
200+
"kind": "Undefined",
201+
"text": "a"
202+
},
203+
{
204+
"id": "35ea88ed-a12e-4bc6-b553-1ee45798a157",
205+
"kind": "Undefined",
206+
"text": "s"
207+
},
208+
{
209+
"id": "c86762e5-5b39-4f3b-bc25-b009a6025434",
210+
"kind": "Undefined",
211+
"text": "e"
212+
}
213+
];
214+
const text_from_sounds = serialize_wasm(sounds);
215+
216+
console.log(text_from_sounds === "The text just in case");
217+

‎www/package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "spoken-sounds-highlighter",
3+
"description": "Spoken Sounds Highlighter",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "Roman Ponomarev",
7+
"email": "maksugr@gmail.com"
8+
},
9+
"license": "(MIT OR Apache-2.0)",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/maksugr/text-to-sounds.git"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/maksugr/text-to-sounds/issues"
16+
},
17+
"homepage": "https://github.com/maksugr/text-to-sounds#readme",
18+
"engines": {
19+
"node": ">=16",
20+
"npm": ">=8"
21+
},
22+
"scripts": {
23+
"build": "webpack --config webpack.config.js",
24+
"dev": "webpack-dev-server"
25+
},
26+
"dependencies": {
27+
"text-to-sounds": "^0.3.1"
28+
},
29+
"devDependencies": {
30+
"copy-webpack-plugin": "^5.0.0",
31+
"webpack": "^4.29.3",
32+
"webpack-cli": "^3.1.0",
33+
"webpack-dev-server": "^3.1.5"
34+
}
35+
}

‎www/public/0.bootstrap.js

+60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎www/public/1.bootstrap.js

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
108 KB
Binary file not shown.

‎www/public/bootstrap.js

+354
Large diffs are not rendered by default.

‎www/public/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Spoken Sounds Highlighter</title>
6+
</head>
7+
<body>
8+
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
9+
<script src="./bootstrap.js"></script>
10+
</body>
11+
</html>

‎www/webpack.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const CopyWebpackPlugin = require("copy-webpack-plugin");
2+
const path = require('path');
3+
4+
module.exports = {
5+
entry: "./bootstrap.js",
6+
output: {
7+
path: path.resolve(__dirname, "public"),
8+
filename: "bootstrap.js",
9+
},
10+
mode: "development",
11+
plugins: [
12+
new CopyWebpackPlugin(['index.html'])
13+
],
14+
};

0 commit comments

Comments
 (0)
Please sign in to comment.