Coder Social home page Coder Social logo

storefront's Introduction

The foundations of this solution were created using https://www.npmjs.com/package/generator-angular-es6-webpack, which creates all the base files for an Angular 1.5 app, with ES6, SCSS support.

Angular was chosen first because of my familiarity/knowledge of the framework, but also because:

  • Easy for single-page applications
  • Easy to implement live updates (e.g. update shopping cart dynamically)
  • Easy to unit test
  • Modular architecture

Getting started

  • Make sure you have got node and npm installed. Note: version 7 was used for this. You can change the node version easily by installing nvm (node virtual machine).
  • cd into the folder and run npm install
    • Note: if you installed nvm, then run nvm install 7, and then nvm use 7

Running App

  • Run gulp serve and access http://127.0.0.1:9001/

Running Unit Tests

  • Run gulp karma

Running Protactor Test (Selenium)

  • Run ./node_modules/webdriver-manager/bin/webdriver-manager update to ensure you've got the latest version of the webdriver.
  • Run ./node_modules/webdriver-manager/bin/webdriver-manager start to start the selenium server. Then on another terminal:
  • Run gulp protractor to run the actual tests. Remember that every time you open a new terminal you might need to run nvm use 7.

Notes

If I had given more time to invest in the project, I would have:

  • Unit test everything. I only included one unit test for each kind of angular concept (controller, service, component).
  • More functional tests (E2E) using Protractor (Selenium for AngularJS). Would have added more assertions and tests for the cart page.
  • Although I tried to organize my CSS, it could be improved, e.g. put all animations inside _animation.scss

storefront's People

Contributors

lpschz avatar

Watchers

James Cloos 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.