Giter Site home page Giter Site logo

travel-site-test's Introduction

Travel Site

Approach

  • Repo setup
  • Making sure API is available and does not give CORS issues
  • Build first reusable component 'Forecast' that renders 4 results from the API
  • Make 'httpRequest' functionality common, so it can be accessible from all components on the app
  • Add 'common.Helpers' that will hold reusable methods and other helpers user by the templating engine (Underscore), to render the API data in the needed format etc.
  • Style the reusable component
  • Iterate 'Forecast' so instead of rendering the first 4 results, it renders 4 consecutive days
  • Add 'Search-Bar' component that will send a custom event to the DOM when a user introduces a city on the text bar and hits 'Find'
  • Iterate 'Forecast' to listen to custom event and initialise itself once more
  • Add more 'Forecast' components into the index.html page that will render different Weather Forecasts and that won't listen to the custom event ( controller by the data attributes 'data-location' & 'data-updates')
  • Make sure the styling is responsive

Nice to have

  • Using city ids instead of names, provided by OpenWeatherMap ( http://bulk.openweathermap.org/sample/ ), would made an app more consistent
  • Form validation on the Search Bar
  • Lazy Loading
  • JS and SASS linters on the repo
  • Unit testing (not much experience on it)
  • Callbacks on error, not just logs or a simple message on screen
  • Underscore template would work better built on top of the js file by a gulp task
  • Watch tasks
  • Split gulp tasks into multiple files
  • Fix momentjs warning

Build notes

Gulp tasks

gulp Default task that builds the files into the dist folder

gulp clean Removes content from dist folder

gulp webserver Run local server on http://localhost:8080/index.html

gulp html Builds index.html into the dist folder

gulp scripts Builds scripts into the dist folder

gulp mainScripts Builds app initialiser

gulp commonScripts Builds common scripts

gulp componentScripts Builds the components (modules) scripts

gulp styles Builds styles into the dist folder

gulp icons Build svgs into the dist folder

travel-site-test's People

Contributors

sofiapuch avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.