Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit b5451cdb28045b0b3d8c0fa4e727d04fdf9c67eb @twolfson twolfson committed Jan 8, 2013
@@ -0,0 +1 @@
+/node_modules/
@@ -0,0 +1 @@
+/node_modules/
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Ensighten
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,43 @@
+# Builder
+
+Build chain for client-side MVC views. Render, convert to DOM elements, and bind jQuery plugins in one fell swoop.
+
+## Getting Started
+Download the [production version][min] ([vanilla][min] or [requirejs][min_require]) or the [development version][max] ([vanilla][max] or [requirejs][max_require]).
+
+[min]: https://raw.github.com/Ensighten/Builder/master/dist/Builder.require.min.js
+[max]: https://raw.github.com/Ensighten/Builder/master/dist/Builder.require.js
+[min]: https://raw.github.com/Ensighten/Builder/master/dist/Builder.min.js
+[max]: https://raw.github.com/Ensighten/Builder/master/dist/Builder.js
+
+In your web page:
+
+```html
+<script src="jquery.js"></script>
+<script src="dist/Builder.min.js"></script>
+<script>
+jQuery(function($) {
+ $.awesome(); // "awesome"
+});
+</script>
+```
+
+## Documentation
+_(Coming soon)_
+
+## Examples
+_(Coming soon)_
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](http://gruntjs.com/).
+
+_Also, please don't edit files in the "dist" or "stage" subdirectories as they are generated via grunt. You'll find source code in the "lib" subdirectory!_
+
+### PhantomJS
+While grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers.
+
+See the [Why does grunt complain that PhantomJS isn't installed?](https://github.com/gruntjs/grunt/blob/master/docs/faq.md#why-does-grunt-complain-that-phantomjs-isnt-installed) guide in the [Grunt FAQ](https://github.com/gruntjs/grunt/blob/master/docs/faq.md) for help with installing or troubleshooting PhantomJS.
+
+## License
+Copyright (c) 2013 Ensighten
+Licensed under the MIT license.
@@ -0,0 +1,95 @@
+/*global module:true */
+module.exports = function(grunt) {
+ var read = grunt.file.read;
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: '<json:package.json>',
+ meta: {
+ banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
+ '<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> Ensighten;' +
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
+ },
+ template: {
+ vanilla: {
+ src: 'src/templates/vanilla.mustache',
+ dest: 'stage/Builder.js',
+ variables: {
+ 'Builder': read('src/Builder.js')
+ }
+ },
+ require: {
+ src: 'src/templates/require.mustache',
+ dest: 'stage/Builder.require.js',
+ variables: {
+ 'Builder': read('src/Builder.js')
+ }
+ }
+ },
+ concat: {
+ distVanilla: {
+ src: ['<banner:meta.banner>', '<file_strip_banner:stage/<%= pkg.name %>.js>'],
+ dest: 'dist/<%= pkg.name %>.js'
+ },
+ distRequire: {
+ src: ['<banner:meta.banner>', '<file_strip_banner:stage/<%= pkg.name %>.require.js>'],
+ dest: 'dist/<%= pkg.name %>.require.js'
+ }
+ },
+ min: {
+ distVanilla: {
+ src: ['<banner:meta.banner>', '<config:concat.distVanilla.dest>'],
+ dest: 'dist/<%= pkg.name %>.min.js'
+ },
+ distRequire: {
+ src: ['<banner:meta.banner>', '<config:concat.distRequire.dest>'],
+ dest: 'dist/<%= pkg.name %>.require.min.js'
+ }
+ },
+ qunit: {
+ files: ['test/**/*.html']
+ },
+ lint: {
+ files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
+ },
+ watch: {
+ files: ['<config:lint.files>', '<config:qunit.files>'],
+ tasks: 'default'
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ // newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+
+ browser: true
+ },
+ globals: {
+ '$': true,
+ 'jQuery': true,
+ 'require': true,
+ 'define': true
+ }
+ },
+ uglify: {}
+ });
+
+ // Load in grunt-templater
+ grunt.loadNpmTasks('grunt-templater');
+
+ // Alias test as qunit
+ grunt.registerTask('test', 'qunit');
+
+ // Default task.
+ grunt.registerTask('default', 'lint template concat min test');
+
+};
@@ -0,0 +1,14 @@
+(function() {
+ // Get any jquery=___ param from the query string.
+ var jqversion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/);
+ var path;
+ if (jqversion) {
+ // A version was specified, load that version from code.jquery.com.
+ path = 'http://code.jquery.com/jquery-' + jqversion[1] + '.js';
+ } else {
+ // No version was specified, load the local version.
+ path = '../libs/jquery/jquery.js';
+ }
+ // This is the only time I'll ever use document.write, I promise!
+ document.write('<script src="' + path + '"></script>');
+}());
Oops, something went wrong.

0 comments on commit b5451cd

Please sign in to comment.