-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11955f3
commit b8f30d4
Showing
1,183 changed files
with
113,202 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "test1", | ||
"version": "0.0.0", | ||
"authors": [ | ||
"Rich Bradshaw <richard@focalstrategy.com>" | ||
], | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"polymer": "Polymer/polymer#~0.4", | ||
"core-elements": "Polymer/core-elements#~0.4", | ||
"paper-elements": "Polymer/paper-elements#~0.4", | ||
"google-map": "GoogleWebComponents/google-map#~0.3.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "context-free-parser", | ||
"private": true, | ||
"dependencies": {}, | ||
"homepage": "https://github.com/Polymer/context-free-parser", | ||
"version": "0.4.0", | ||
"_release": "0.4.0", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "0.4.0", | ||
"commit": "f15f7d82cad8bebbf1ff7b8d4c98ea8e611b9823" | ||
}, | ||
"_source": "git://github.com/Polymer/context-free-parser.git", | ||
"_target": ">=0.4.0 <1.0.0", | ||
"_originalSource": "Polymer/context-free-parser" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
context-free-parser | ||
=================== | ||
|
||
See the [component landing page](http://polymer.github.io/context-free-parser) for more information. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "context-free-parser", | ||
"private": true, | ||
"dependencies": {} | ||
} |
49 changes: 49 additions & 0 deletions
49
bower_components/context-free-parser/context-free-parser.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
<script src="context-free-parser.js"></script> | ||
<link rel="import" href="../core-ajax/core-ajax.html"> | ||
|
||
<!-- | ||
Scrapes source documentation data from input text or url. | ||
@class context-free-parser | ||
--> | ||
<polymer-element name="context-free-parser" attributes="url text data"> | ||
<template> | ||
|
||
<core-ajax url="{{url}}" response="{{text}}" auto></core-ajax> | ||
|
||
</template> | ||
<script> | ||
|
||
Polymer('context-free-parser', { | ||
|
||
text: null, | ||
|
||
textChanged: function() { | ||
if (this.text) { | ||
var entities = ContextFreeParser.parse(this.text); | ||
if (!entities || entities.length === 0) { | ||
entities = [ | ||
{name: this.url.split('/').pop(), description: '**Undocumented**'} | ||
]; | ||
} | ||
this.data = { classes: entities }; | ||
} | ||
}, | ||
|
||
dataChanged: function() { | ||
this.fire('data-ready'); | ||
} | ||
|
||
}); | ||
|
||
</script> | ||
</polymer-element> |
130 changes: 130 additions & 0 deletions
130
bower_components/context-free-parser/context-free-parser.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/* | ||
* @license | ||
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
* Code distributed by Google as part of the polymer project is also | ||
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
|
||
(function(scope) { | ||
|
||
var ContextFreeParser = { | ||
parse: function(text) { | ||
var top = {}; | ||
var entities = []; | ||
var current = top; | ||
var subCurrent = {}; | ||
|
||
var scriptDocCommentClause = '\\/\\*\\*([\\s\\S]*?)\\*\\/'; | ||
var htmlDocCommentClause = '<!--([\\s\\S]*?)-->'; | ||
|
||
// matches text between /** and */ inclusive and <!-- and --> inclusive | ||
var docCommentRegex = new RegExp(scriptDocCommentClause + '|' + htmlDocCommentClause, 'g'); | ||
|
||
// acquire all script doc comments | ||
var docComments = text.match(docCommentRegex) || []; | ||
|
||
// each match represents a single block of doc comments | ||
docComments.forEach(function(m) { | ||
// unify line ends, remove all comment characters, split into individual lines | ||
var lines = m.replace(/\r\n/g, '\n').replace(/^\s*\/\*\*|^\s*\*\/|^\s*\* ?|^\s*\<\!-\-|^s*\-\-\>/gm, '').split('\n'); | ||
|
||
// pragmas (@-rules) must occur on a line by themselves | ||
var pragmas = []; | ||
// filter lines whose first non-whitespace character is @ into the pragma list | ||
// (and out of the `lines` array) | ||
lines = lines.filter(function(l) { | ||
var m = l.match(/\s*@([\w-]*) (.*)/); | ||
if (!m) { | ||
return true; | ||
} | ||
pragmas.push(m); | ||
}); | ||
|
||
// collect all other text into a single block | ||
var code = lines.join('\n'); | ||
|
||
// process pragmas | ||
pragmas.forEach(function(m) { | ||
var pragma = m[1], content = m[2]; | ||
switch (pragma) { | ||
|
||
// currently all entities are either @class or @element | ||
case 'class': | ||
case 'element': | ||
current = { | ||
name: content, | ||
description: code | ||
}; | ||
entities.push(current); | ||
break; | ||
|
||
// an entity may have these describable sub-features | ||
case 'attribute': | ||
case 'property': | ||
case 'method': | ||
case 'event': | ||
subCurrent = { | ||
name: content, | ||
description: code | ||
}; | ||
var label = pragma == 'property' ? 'properties' : pragma + 's'; | ||
makePragma(current, label, subCurrent); | ||
break; | ||
|
||
// sub-feature pragmas | ||
case 'default': | ||
case 'type': | ||
subCurrent[pragma] = content; | ||
break; | ||
|
||
case 'param': | ||
var eventParmsRe = /\{(.+)\}\s+(\w+[.\w+]+)\s+(.*)$/; | ||
|
||
var params = content.match(eventParmsRe); | ||
if (params) { | ||
var subEventObj = { | ||
type: params[1], | ||
name: params[2], | ||
description: params[3] | ||
}; | ||
makePragma(subCurrent, pragma + 's', subEventObj); | ||
} | ||
|
||
break; | ||
|
||
// everything else | ||
default: | ||
current[pragma] = content; | ||
break; | ||
} | ||
}); | ||
|
||
// utility function, yay hoisting | ||
function makePragma(object, pragma, content) { | ||
var p$ = object; | ||
var p = p$[pragma]; | ||
if (!p) { | ||
p$[pragma] = p = []; | ||
} | ||
p.push(content); | ||
} | ||
|
||
}); | ||
|
||
if (entities.length === 0) { | ||
entities.push({name: 'Entity', description: '**Undocumented**'}); | ||
} | ||
return entities; | ||
} | ||
}; | ||
|
||
if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = ContextFreeParser; | ||
} else { | ||
scope.ContextFreeParser = ContextFreeParser; | ||
} | ||
|
||
})(this); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
|
||
<title>context-free-parser</title> | ||
|
||
<script src="../platform/platform.js"></script> | ||
|
||
<link rel="import" href="context-free-parser.html"> | ||
|
||
</head> | ||
|
||
<body unresolved> | ||
|
||
<context-free-parser url="../core-ajax/core-ajax.html"></context-free-parser> | ||
|
||
<script> | ||
addEventListener('data-ready', function(event) { | ||
console.dir(event.target.data); | ||
}); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<!-- | ||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
--> | ||
<html> | ||
<head> | ||
|
||
<script src="../platform/platform.js"></script> | ||
<link rel="import" href="../core-component-page/core-component-page.html"> | ||
|
||
</head> | ||
<body unresolved> | ||
|
||
<core-component-page></core-component-page> | ||
|
||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "core-ajax", | ||
"private": true, | ||
"dependencies": { | ||
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0" | ||
}, | ||
"homepage": "https://github.com/Polymer/core-ajax", | ||
"version": "0.4.0", | ||
"_release": "0.4.0", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "0.4.0", | ||
"commit": "3b2d12b4d14b0401b3c323bd2d68d025e833b6e0" | ||
}, | ||
"_source": "git://github.com/Polymer/core-ajax.git", | ||
"_target": ">=0.4.0 <1.0.0", | ||
"_originalSource": "Polymer/core-ajax" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
core-ajax | ||
========= | ||
|
||
See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-ajax) for more information. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "core-ajax", | ||
"private": true, | ||
"dependencies": { | ||
"polymer": "Polymer/polymer#>=0.4.0 <1.0.0" | ||
} | ||
} |
Oops, something went wrong.