-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
7 changed files
with
208 additions
and
10 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,18 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file was deleted.
Oops, something went wrong.
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,78 @@ | ||
/** | ||
* Project specific jshint linting options. | ||
* | ||
* Forked of Airbnb JSHint settings. | ||
* | ||
* @version 0.3.1 | ||
* @see http://www.jshint.com/docs/ | ||
*/ | ||
{ | ||
/* | ||
* ENVIRONMENTS | ||
* ================= | ||
*/ | ||
|
||
// Define globals exposed by modern browsers. | ||
"browser": true, | ||
|
||
// Define globals exposed by jQuery. | ||
"jquery": true, | ||
|
||
// Define globals exposed by Node.js. | ||
"node": true, | ||
|
||
/* | ||
* ENFORCING OPTIONS | ||
* ================= | ||
*/ | ||
|
||
// Force all variable names to use either camelCase style or UPPER_CASE | ||
// with underscores. | ||
"camelcase": true, | ||
|
||
// Prohibit use of == and != in favor of === and !==. | ||
"eqeqeq": true, | ||
|
||
// Suppress warnings about == null comparisons. | ||
"eqnull": true, | ||
|
||
// Enforce tab width of 2 spaces. | ||
"indent": 2, | ||
|
||
// Prohibit use of a variable before it is defined. | ||
"latedef": true, | ||
|
||
// Require capitalized names for constructor functions. | ||
"newcap": true, | ||
|
||
// Enforce use of single quotation marks for strings. | ||
"quotmark": "single", | ||
|
||
// Prohibit trailing whitespace. | ||
"trailing": true, | ||
|
||
// Prohibit use of explicitly undeclared variables. | ||
"undef": true, | ||
|
||
// Warn when variables are defined but never used. | ||
"unused": true, | ||
|
||
// do not complain for lack of 'use strict'; | ||
"globalstrict": false, | ||
"strict": false, | ||
|
||
"es5": false, | ||
|
||
// suppress object dot notation warnings, we know what we're doing | ||
"sub": true, | ||
|
||
|
||
/** | ||
* PROJECT GLOBALS | ||
* ================ | ||
* | ||
*/ | ||
"predef": [ | ||
"goog" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# Closure Library Yeoman Generator | ||
|
||
# Not Maintained | ||
|
||
This repo is now maintained as a yeoman generator. | ||
|
||
|
||
[Find it here https://github.com/thanpolas/generator-closure](https://github.com/thanpolas/generator-closure) | ||
Hello World! |
Submodule closure-library
deleted from
c7fdf4
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,68 @@ | ||
goog.provide('example.ct'); | ||
|
||
goog.require('goog.object'); | ||
goog.require('goog.structs.Map'); | ||
|
||
/** | ||
* A sample object | ||
* | ||
* @type {Object} | ||
*/ | ||
example.ct.aDeepObject = { | ||
'one': 1, | ||
'two': 2, | ||
'three': { | ||
'tone': 'one', | ||
'ttwo': 'two', | ||
'tthree': { | ||
'ttone': 'tone', | ||
'tttwo': true, | ||
'ttthree': [1, 2, 3, 4, 5, 6] | ||
} | ||
} | ||
}; | ||
|
||
/** @lends {example.ct.aDeepObject} */ | ||
example.ct.useObject = {}; | ||
|
||
/** @type {goog.structs.Map} */ | ||
example.ct.map = new goog.structs.Map(); | ||
|
||
/** | ||
* Export our deep object | ||
*/ | ||
example.ct.init = function() | ||
{ | ||
example.ct.useObject = goog.object.unsafeClone(example.ct.aDeepObject); | ||
example.ct.map.addAll(example.ct.aDeepObject); | ||
example.ct.paint('Original values'); | ||
|
||
example.ct.map.set('two', 3); | ||
example.ct.paint('key "two" was changed in map to 3'); | ||
|
||
example.ct.useObject = example.ct.map.toObject(); | ||
example.ct.paint('useObject was assigned from map'); | ||
|
||
goog.global['conf']['two'] = 4; | ||
example.ct.paint('Globalized conf.two was changed to 4'); | ||
|
||
}; | ||
|
||
example.ct.paint = function(opt_words) | ||
{ | ||
var el = example.sample1.getElement('objects'); | ||
var ret = ''; | ||
if (opt_words) { | ||
ret += '<h4 style="margin:0">' + opt_words + '</h4>'; | ||
} | ||
ret += 'useObject.two:<b>' + example.ct.useObject['two'] + '</b>'; | ||
ret += ' aDeepObject.two:<b>' + example.ct.aDeepObject['two'] + '</b>'; | ||
ret += '<br /><br />'; | ||
example.sample1.elementHTML(el, ret, true); | ||
|
||
}; | ||
|
||
|
||
goog.exportSymbol('app.paint', example.ct.paint); | ||
goog.exportSymbol('app.map', example.ct.map); | ||
goog.exportSymbol('conf', example.ct.aDeepObject); |
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,42 @@ | ||
{ | ||
"name": "generator-closure", | ||
"version": "0.0.1", | ||
"description": "Yeoman generator for Closure Library", | ||
"keywords": [ | ||
"yeoman-generator", | ||
"yeoman", | ||
"generator", | ||
"framework", | ||
"component", | ||
"front-end", | ||
"app", | ||
"closure", | ||
"closure library" | ||
], | ||
"homepage": "https://github.com/thanpolas/generator-closure", | ||
"bugs": "https://github.com/thanpolas/generator-closure/issues", | ||
"author": { | ||
"name": "Thanasis Polychronakis", | ||
"email": "thanpolas@gmail.com", | ||
"url": "http://thanpol.as" | ||
}, | ||
"main": "app/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/thanpolas/generator-closure.git" | ||
}, | ||
"dependencies": { | ||
"yeoman-generator": "~0.10.2" | ||
}, | ||
"devDependencies": { | ||
}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://en.wikipedia.org/wiki/MIT_License" | ||
} | ||
] | ||
} |