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
string googleAnalyticsScript = @"var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', '" + googleAnalyticsKey + @"']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); | |
ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? | |
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[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
module.exports = { | |
authors: | |
[ | |
{ | |
id: 'cory-house', | |
firstName: 'Cory', | |
lastName: 'House' | |
}, | |
{ | |
id: 'scott-allen', |
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"; | |
//This file is mocking a web API by hitting hard coded data. | |
var courses = require('./courseData').courses; | |
var _ = require('lodash'); | |
//This would be performed on the server in a real app. Just stubbing in. | |
var _generateId = function(course) { | |
return course.title.replace(' ', '-'); | |
}; |
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
module.exports = { | |
courses: [ | |
{ | |
id: "clean-code", | |
title: "Clean Code: Writing Code for Humans", | |
watchHref: "http://www.pluralsight.com/courses/writing-clean-code-humans", | |
author: { | |
id: "cory-house", | |
name: "Cory House" | |
}, |
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
{ | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"env": { | |
"browser": true, | |
"node": true, | |
"jquery": true | |
}, | |
"rules": { |
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
{ | |
"name": "npm-scripts-example", | |
"version": "1.0.0", | |
"description": "npm scripts example", | |
"scripts": { | |
"prebuild": "echo I run before the build script", | |
"build": "cross-env NODE_ENV=production webpack", | |
"postbuild": "echo I run after the build script" | |
} | |
} |
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
{ | |
"name": "npm-scripts-example", | |
"version": "1.0.0", | |
"description": "npm scripts example", | |
"scripts": { | |
"clean": "rimraf ./dist && mkdir dist", | |
"prebuild": "npm run clean", | |
"build": "cross-env NODE_ENV=production webpack" | |
} | |
} |
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
{ | |
"name": "npm-scripts-example", | |
"version": "1.0.0", | |
"description": "npm scripts example", | |
"scripts": { | |
"clean-comment": "Clean the dist folder before the build by removing it and recreating it.", | |
"clean": "rm -rf ./dist && mkdir dist" | |
} | |
} |
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
{ | |
"name": "npm-scripts-example", | |
"version": "1.0.0", | |
"description": "npm scripts example", | |
"scripts": { | |
"remove-dist": "rimraf ./dist", | |
"create-dist": "mkdir dist && cd dist && mkdir js && mkdir styles", | |
"prebuild": "npm run remove-dist && npm run create-dist", | |
"build": "webpack" | |
} |