-
Notifications
You must be signed in to change notification settings - Fork 2
/
001_oldSchool..002_npm
73 lines (69 loc) · 2.23 KB
/
001_oldSchool..002_npm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
diff --git a/README.md b/README.md
index db40ed2..70f7d37 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This repository will implement the article and link to the corresponding commits
## Using JavaScript the “old-school” way
-**Branch: oldSchool**
+**Branch: (oldSchool)[https://github.com/scherler/Modern-JavaScript-Explained-For-Dinosaurs/tree/oldSchool]**
Showing how you do things with works with browser only, meaning no need for an httpd style server.
@@ -39,4 +39,10 @@ Some changes I added had been to override console.log to output to a div on the
<script src="index.js"></script>
</body>
</html>
-```
\ No newline at end of file
+```
+
+## Using a JavaScript package manager (npm)
+
+**Branch: (npm)[https://github.com/scherler/Modern-JavaScript-Explained-For-Dinosaurs/tree/npm]**
+
+No special changes besides the names.
\ No newline at end of file
diff --git a/index.html b/index.html
index 381bc5c..2025bf4 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>JavaScript Example</title>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.1/moment.min.js"></script>
+ <script src="node_modules/moment/min/moment.min.js"></script>
</head>
<body>
<h1>Hello from HTML!</h1>
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1447c64
--- /dev/null
+++ b/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "modern-js4dinosaurs",
+ "version": "1.0.0",
+ "description": "based on the article of https://medium.com/@peterxjang/modern-javascript-explained-for-dinosaurs-f695e9747b70",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/scherler/Modern-JavaScript-Explained-For-Dinosaurs.git"
+ },
+ "keywords": [
+ "tutorial",
+ "npm",
+ "javascript"
+ ],
+ "author": "Thorsten Scherler",
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/scherler/Modern-JavaScript-Explained-For-Dinosaurs/issues"
+ },
+ "homepage": "https://github.com/scherler/Modern-JavaScript-Explained-For-Dinosaurs#readme",
+ "dependencies": {
+ "moment": "2.19.1"
+ }
+}