This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
main: './public/js/main.js' | |
}, | |
output: { | |
path: __dirname + '/public/js/', | |
filename: '[name].bundle.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Render HTML code for an order summary | |
function order_summary(order_object) { | |
var price = 0, | |
tax = 0, | |
subtotal = '', | |
html = ''; | |
switch (order_object.price_level) { | |
case 'free': | |
// Do nothing, default is 0! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Salman Tariq Mirza | |
node/JavaScript solution to the Shopify Internship Coding Challenge | |
Assumptions: | |
- No duplicates, a flat list of the variants of all the products maintains uniqueness. | |
- For each computer there should be a keyboard. | |
- However if all computers/keyboards are purchased and there is still money left, | |
then spares need to be purchased of the remaining type. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating a new angular module | |
var app = angular.module("GeocodeApp", []); | |
// Angular Service | |
// Assuming the variable $GoogleAPI represents the Google API to geocode data | |
app.service("GecodeDataService", function($GoogleAPI) { | |
var that = this; | |
this.listings = {}; | |
// Set some sample listing |