Skip to content

Commit eede0c2

Browse files
authored
Added bundling
1 parent 72b4dcc commit eede0c2

13 files changed

+1099
-22
lines changed

dist/bundle.esm.js

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

dist/bundle.esm.js.map

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

dist/bundle.umd.js

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

dist/bundle.umd.js.map

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

dist/types/index.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare class Sentence {
2+
private _strings;
3+
constructor(strings: string);
4+
/**
5+
* Returns a string with the first letter capitalized
6+
* @param {Sentence} strings - Local variable used to slice and capitalize the first letter
7+
* @returns {Sentence} - string with the first letter capitalized
8+
*/
9+
capitalize(strings: string): string;
10+
/**
11+
* Returns a string with all letters capitalized
12+
* @param {Sentence} string - Local variable used to capitalize all letters
13+
* @returns {Sentence} - string with all letters capitalized
14+
*/
15+
allCaps(strings: string): string;
16+
}

index.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Strings</title>
7+
</head>
8+
<body>
9+
<script src="./dist/bundle.umd.js"></script>
10+
<script>
11+
console.log(MyStrings)
12+
const string = new MyStrings.Strings();
13+
string.capitalize()
14+
</script>
15+
<script type="module">
16+
import { Strings } from "./dist/bundle.esm.js"
17+
const string2 = new Strings()
18+
string.allCaps()
19+
</script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)