Skip to content

gpluta/simple-tp-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrustPilot widget

In order to explore the widget you must launch a local Node.js server. Data from the widget are fetched from a file called trust-data.json served via http thanks to the mentioned server. The widget will not work if the server is down (for instance when the index.html is opened but the express.js server is not running.)

Assumptions

The whole widget is rendered with JavaScript, as I have assumed, that the widget might be embedded on a page. Of course it is far from being production-ready, but that was the general idea, hance the usage of JS, loading the json file from a server etc...

Launching the widget

A modern version of Node.js is required to build this project (current v6 LTS would be perfect!). You need to have gulp-cli installed globally.

To build and view the widget, execute:

$ git clone git clone [email protected]:gpluta/trustpilot-widget.git
$ cd trustpilot-widget
$ npm install
$ gulp 

Visit http://localhost:3000 (the page should open automatically after running $ gulp)

Comment

The source code for this widget consists of index.html file located in the root directory of the project and files in src/ folder.

The whole build pipeline is managed with gulp. It includes some simple build steps (JS concat, babel transpilation and uglify, clean-css for CSS, imagemin for image minification and browser-sync for serving the assets)

The project uses SASS for stylesheets, some ES6 syntax (block-scoped variables, arrow functions and template strings) transpiled to ES5 via babel

Releases

No releases published

Packages

No packages published