Permalink
Browse files

go generator go

  • Loading branch information...
1 parent ffca173 commit 566feb75116f4756405810791a14f3a3d184ef6d @thanpolas committed Mar 16, 2013
Showing with 208 additions and 10 deletions.
  1. +18 −0 .editorconfig
  2. +0 −3 .gitmodules
  3. +78 −0 .jshintrc
  4. +2 −6 README.md
  5. +0 −1 html/js/closure-library
  6. +68 −0 html/js/example/sample1/configTest.js
  7. +42 −0 package.json
View
@@ -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
View
@@ -1,3 +0,0 @@
-[submodule "html/js/closure-library"]
- path = html/js/closure-library
- url = git@github.com:thanpolas/google-closure-library.git
View
@@ -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"
+ ]
+}
View
@@ -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
@@ -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);
View
@@ -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"
+ }
+ ]
+}

0 comments on commit 566feb7

Please sign in to comment.