Skip to content

Commit

Permalink
update(docs): add License info to CodePen demos
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Jan 8, 2016
1 parent a69c20b commit 68cc0bc
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/app/js/codepen.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
// Modifies index.html with necessary changes in order to display correctly in codepen
// See each processor to determine how each modifies the html
function processHtml(demo) {
var index = demo.files.index.contents;

var allContent = demo.files.index.contents;

var processors = [
applyAngularAttributesToParentElement,
Expand All @@ -92,10 +93,19 @@
];

processors.forEach(function(processor) {
index = processor(index, demo);
allContent = processor(allContent, demo);
});

return index;
return allContent + buildLicenseHTML();
}

function buildLicenseHTML() {
return '\n\n'+
'<!--\n'+
'Copyright 2016 Google Inc. All Rights Reserved. \n'+
'Use of this source code is governed by an MIT-style license that can be in '+
'the LICENSE file at http://material.angularjs.org/license.\n'+
'-->';
}

// Applies modifications the javascript prior to sending to codepen.
Expand Down

0 comments on commit 68cc0bc

Please sign in to comment.