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
import Astro from 'widget/astro'; | |
/** | |
* Provides Astro widget definition | |
* | |
* @class Invodo.Src.Widget.Astro | |
* @param {Object| Parameters object | |
*/ | |
(function(namespace){ |
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
'use strict'; | |
// Get all of lodash functions for convenience | |
var _ = require('lodash'); | |
// Get the built-in path module | |
var path = require('path'); | |
// Add project root as require-able directory | |
require('app-module-path').addPath(path.resolve(__dirname, '../../..')); | |
// Create a Map to hold each test descibe block |
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
grunt.registerTask('serve', 'start the server and preview your app', function (target) { | |
if (target === 'dist') { | |
return grunt.task.run(['build', 'browserSync:dist']); | |
} | |
// Get the karma unit task | |
var base = grunt.config.get('karma.unit'); | |
// Create a single use task based off karma unit but | |
// this task will only run once, and will run in every browser |
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
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// If you want to recursively match all subfolders, use: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { |
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
// Reconfigure tasks | |
Array.prototype.map.call([ | |
// Unit tests should run in the background | |
['karma.unit.background', true], | |
// Unit tests should run on every JS change | |
['karma.unit.singleRun', false] | |
], function(args) { | |
return grunt.config.set(args[0], args[1]) | |
}); |
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
// Position config for GoPro Cards | |
"position": { | |
"x": '-50%', | |
"y": '6%', | |
}, | |
// Animation config for Cards | |
"animate": { | |
"duration": { | |
"start": .3, | |
"end": .3 |
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
<!-- <head> --> | |
<!-- Include GoPro Shoppable Video styles in the document HEAD --> | |
<link rel="stylesheet" href="//ixd.invodo.com/ivp-experiences/gopro/theme.min.css"> | |
<!-- </head> --> | |
<!-- <body> --> | |
<!-- The experience requires a DOM element --> | |
<div id="gopro-ivp-widget"></div> | |
<!-- Include Invodo.js on the page --> |
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 Carousel = (function(){ | |
// faux jquery object | |
// mostly based on http://youmightnotneedjquery.com/ | |
var jq = function (el) { | |
var self = {0: el, el: el}; | |
self.findChild = function (selector) { | |
var results = el.querySelectorAll(selector); |
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
// Import lo-dash lang category | |
import lang from 'lodash/lang'; | |
// Import lo-dash template string function | |
import stringTemplate from 'lodash/string/template'; | |
// import assign from 'lodash/object/assign'; | |
import forEach from 'lodash/collection/foreach'; | |
// Loop through configs stored and return the matching config (value) element (key) | |
function reverseMapFind(id, map) { |
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
<!-- The experience requires a DOM element --> | |
<div id="gopro-ivp-example-widget"></div> | |
<!-- Include Shoppable Video styles on the page --> | |
<link rel="stylesheet" href="//ixd.invodo.com/ivp/2.1.0/ivp.min.css"> | |
<!-- Include Invodo.js on the page --> | |
<script src="//e.invodo.com/4.0/s/ixd.invodo.com.js"></script> | |
<!-- Include Shoppable Video library on the page --> | |
<script src="//ixd.invodo.com/ivp/2.1.0/ivp.min.js"></script> |