Skip to content

Commit b655cc4

Browse files
authored
Merge pull request #4 from cdmoro/typescript
Typescript
2 parents b25fa07 + c17017e commit b655cc4

File tree

7,218 files changed

+5362
-1652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,218 files changed

+5362
-1652
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.vscode
1+
.vscode
2+
node_modules
3+
dist

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ At the moment, the clock has seven color themes and four special themes, we expe
103103

104104
### Web
105105

106-
The easiest way to run the clock is to run an HTTP server and open `index.html` and voila!. If you are a VSCode user, you might want to use the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension.
106+
To run the project you need to have Node and NPM installed on your system. Then, clone the project, install the dependencies, execute `npm run dev` and voila! The clock will be automatically opened in your favorite browser.
107107

108-
### Quotes: CSV to JSON
108+
### Generating quotes
109109

110110
I used Python to generate the JSON files (one per time if the time has quotes) with the quotes. The script goes through all the CSV files (one per locale) and puts the files in the appropriate folders. Also, the script generates an additional JSON file with statistics per locale, such as the times with fewer quotes, the author with the most quotes, etc.
111111

112-
To generate the times, simply run python `.\scripts\generate_times.py` in the root folder. By default, the script will generate all the JSON files, if you want to generate the JSON files for a particular locale you can add it as a parameter, i.e. `.\scripts\generate_times.py en-US` and that's it.
112+
To generate the times, simply run `python .\scripts\generate_times.py` in the root folder. By default, the script will generate all the JSON files, if you want to generate the JSON files for a particular locale you can add it as a parameter, i.e. `.\scripts\generate_times.py en-US`.
113113

114114
## Contact
115115

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
/>
5050
<meta name="twitter:site" content="@CarlosBonadeo" />
5151

52-
<link rel="stylesheet" href="styles/styles.css" />
53-
<link rel="stylesheet" href="styles/themes.css" />
54-
<link rel="icon" type="image/x-icon" href="favicon.ico" />
52+
<link rel="stylesheet" href="src/styles/styles.css" />
53+
<link rel="stylesheet" href="src/styles/themes.css" />
54+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
5555
<link rel="preconnect" href="https://fonts.googleapis.com" />
5656
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
5757
<link
@@ -230,6 +230,6 @@
230230
</div>
231231
</div>
232232
</footer>
233-
<script src="js/main.js" type="module"></script>
233+
<script src="/src/main.ts" type="module"></script>
234234
</body>
235235
</html>

js/fonts.js

Lines changed: 0 additions & 75 deletions
This file was deleted.

js/locales.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

js/main.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

js/quotes.js

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)