-
Notifications
You must be signed in to change notification settings - Fork 13
/
Notes.txt
185 lines (141 loc) · 4.91 KB
/
Notes.txt
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
===============================================================
84674b82ba66ef10c72996e0eb4ee152
ba2ebc4a964a870cf25302fda5e3bfbd
Hourly By city, count 96 (default)
https://samples.openweathermap.org/data/2.5/forecast/hourly?q=London&appid=b6907d289e10d714a6e88b30761fae22
Daily by city, count 7 (default)
https://samples.openweathermap.org/data/2.5/forecast/daily?q=London&appid=b1b15e88fa797225412429c1c50c122a1
Format weather data:
this.humidity = response.data.main.humidity + '%';
this.wind = response.data.wind.speed + 'm/s';
this.overcast = response.data.weather[0].description;
this.icon = "images/" + response.data.weather[0].icon.slice(0, 2) + ".svg";
this.sunrise = new Date(response.data.sys.sunrise*1000).toLocaleTimeString("en-US").slice(0,4);
===========================
- top functionality
http://api.openweathermap.org/data/2.5/forecast/daily?q=London&appid=84674b82ba66ef10c72996e0eb4ee152
https://samples.openweathermap.org/data/2.5/forecast/hourly?q=London&appid=b6907d289e10d714a6e88b30761fae22&units=metric
http://api.openweathermap.org/data/2.5/forecast/hourly?q=London&?units=metric&APPID=84674b82ba66ef10c72996e0eb4ee152
https://cors-anywhere.herokuapp.com/
============================
http://webwithidp20190619024317.azurewebsites.net
===============================================================
TODO:
DONE - offline status
DONE - axios offline
DONE - get current location (show)
DONE - daily data
DONE - code optimize
DONE - adjust columns
DONE - date formatting
DONE - read me
Nice to have
- add log support
- documentation
- formatting
- graph
- deployment
- clean up
- fav selection notification
- component ui data binding (advanced)
- ui grid alignment
===============================================================
- input / output
- get current location
- show data in offline
- show offline status
- save data in local storage
- get api data
===============================================================
Create project
===============================================================
vanilla - https://vuejs.org/v2/guide/#
- hello world (hosted in IIS)
- modify code
- complete getting started
===============================================================
vue cli (npm)
- install vuejs cli
- npm install -g @vue/cli
- init cli
- npm install -g @vue/cli-init
- boilar project
- https://v1.vuejs.org/guide/installation.html
- vue init webpack my-project
===============================================================
vue cli (yarn)
- install yarn
- via choco
- https://yarnpkg.com/lang/en/docs/install/#windows-stable
- choco install yarn
- via msi installer
- https://yarnpkg.com/latest.msi
- path: C:\Program Files (x86)\Yarn\
- Disable SSL for yarn (due to fiddler)
- yarn config set "strict-ssl" false -g
- install vuejs cli
- https://cli.vuejs.org/
- yarn global add @vue/cli
- install cli services
- yarn add @vue/cli-service
- yarn global add @vue/cli-service-global
- boilar project
- https://cli.vuejs.org/guide/creating-a-project.html#vue-create
- vue create yarn-vuecli-app-1
- run the project
- https://cli.vuejs.org/guide/cli-service.html#using-the-binary
- yarn serve
===============================================================
- install vuetify
- vue add vuetify
===============================================================
- understand .vue
- implement layout
- load data from api (axios)
- save offline data
- show offline status
===============================================================
Tools
===============================================================
DONE vuejs
DONE yarn
DONE vuejs cli
vuetify - api explorer
open weather
axios
===============================================================
Snips
===============================================================
# install vue-cli
$ npm install -g vue-cli
# create a new project using the "webpack" boilerplate
$ vue init webpack my-project
# install dependencies and go!
$ cd my-project
$ npm install
$ npm run dev
yarn add @vue/cli-plugin-pwa
npm install http-server -g
http-server dist
https://crossorigin.me/https://samples.openweathermap.org/data/2.5/forecast/hourly?q=London,us&appid=b6907d289e10d714a6e88b30761fae22
https://cors-anywhere.herokuapp.com/https://samples.openweathermap.org/data/2.5/forecast/hourly?q=London,us&appid=b6907d289e10d714a6e88b30761fae22
===============================================================
npm uninstall -g @vue/cli-init
npm uninstall -g @vue/cli
npm uninstall -g yarn
choco uninstall yarn
choco install choco-cleaner
C:\ProgramData\chocolatey
https://chocolatey.org/docs/installation
npm
choco / yarn
yarn config v1.17.3
error Could not open cafile: ENOENT: no such file or directory, open 'C:\Temp\temp\FiddlerRoot.cer'
===============================================================
# firebase
yarn add firebase
# web server for PWA
vue add pwa
yarn run build
docfx serve ./dist
=========================================