sirserje / bootcamp-simple Goto Github PK
View Code? Open in Web Editor NEWcollaborate development for studying JS
License: MIT License
collaborate development for studying JS
License: MIT License
Application should have select trip down who is about to reach him to show list of towns and submit button. After pressing submit button, new data should fetch and widget will update
this is current response from server.
Create pure function, which receives this JSON as 1 param and return object (original means, where you can get info from API's response JSON):
{
name: "Kiev",
region: "Ukraine",
time: "2019-03-26 14:01", //original: localtime
temperature: {
real:"30", /original: /temp_c
feels_like: "25", //original: feelslike_c
},
wind: {
"speed":"11", //original: wind_kph
"direction": "SN", //original: wind:dir
},
pressure:"", //original: pressure_mb
visibility:"5", //original: vis_km
precipitation: "23", //original: precip_m m
humidity: "45", //original: humidity
}
Create file for parser /app/responseParser.js
Readme should include:
If application is opened more than 30minutes, make update, which will re-render whole widget.
Functionality from #8 should covered with test
Here is simple example:
// app/render/elementCreator.js :
const createButton = (name='Button Name') => {
// some magical operations
// ...
return button
}
export { createButton }
Необходимо гарантировать что parser при получении неправильных данных вернет что-то вменяемое, решение:
написать функцию которая проверит, валидные ли данные вернул сервер и если невалидные, чтобы парсер вернул предупреждение, но выполнение программы не сломалось
We want to have ability know, what is the display time not only in 12 hour mode.
Create pure function, which will receive string like "06:50 PM" and will return string "18:50"
Create separate file for this in app/util/timeConvert.js
, it will looks like
const twelveToTwenty = function(twelve) {
//your code goes here
return twenty;
}
const twentyToTwelve = function(twenty) {
//your code goes here
return twelve;
}
export twelveToTwenty;
export twentyToTwelve
Before commit, try to run import this in index.js and run some convert.
How to do this?
https://dev.to/johnpaulada/synchronous-fetch-with-asyncawait
Our project has some code style issues. Fix it please (Travis After success fix will show green light)
http://api.apixu.com/v1/current.json?key=XXXXXX&q=Paris
, where XXXXXX
- your API key from https://www.apixu.com/my/app/utils/request.js
and export it by default export default request ...
. Import it into index.jsFinally you will place code into app/utils/request.js
, which imports in app/index.js
. request.js fetch data from endpoint and at index.html you should render response in raw format without any changes. .gitignore file should be updated and apikey.js will present only on your computer
Free available option - Travis CI.
CI task should include : installing dependencies with proper node, testing, linting.
Setup all webpack stuff to properly work with project.
Or any another library, if Jest will not suitable.
Add to scripts in package.json test command, which will run at least 1 dummy test
Nice to have: logging code coverage
Currently, when you run an app, data fetches immediately.
Please, add button and when you press on it, request() function should fetch data each time you press on it. Also, add some message, if request will fail.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.