Skip to content

Commit

Permalink
require support, simplify instalation/usage, update readme, browserif…
Browse files Browse the repository at this point in the history
…y todomvc
  • Loading branch information
mateusmaso committed May 23, 2016
1 parent e8b7c6b commit 4ff339d
Show file tree
Hide file tree
Showing 218 changed files with 11,635 additions and 1,926 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
node_modules/
tmp/
spec/tmp/
examples/todomvc/tmp/
npm-debug.log
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- "0.10"
- "5.9.0"
before_install:
- npm install -g grunt-cli
33 changes: 18 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,33 @@ module.exports = function(grunt) {
expand: true,
cwd: 'spec',
src: ['**/*.coffee'],
dest: 'spec/tmp/',
dest: 'tmp/spec',
ext: '.js'
},
{
expand: true,
cwd: 'src',
src: ['**/*.coffee'],
dest: 'tmp/',
dest: 'lib/',
ext: '.js'
}
]
}
},
browserify: {
options: {
banner: '<%= meta.banner %>'
banner: '<%= meta.banner %>',
exclude: ["underscore", "jquery", "handlebars"],
alias: {
'jquery': './shims/jquery.js',
'underscore': './shims/underscore.js',
'handlebars': './shims/handlebars.js'
}
},
dist: {
files: {
'dist/<%= pkg.name %>.js': ['tmp/**/*.js'],
'spec/index.js': ['spec/tmp/**/*.js']
'dist/<%= pkg.name %>.js': ['shim/**/*.js', 'lib/index.js'],
'spec/index.js': ['tmp/spec/index.js'],
}
}
},
Expand All @@ -54,32 +60,29 @@ module.exports = function(grunt) {
dest: 'dist/<%= pkg.name %>.min.js'
}
},
mocha: {
mocha_phantomjs: {
options: {
run: true
reporter: 'spec'
},
test: {
src: ['spec/**/*.html']
}
all: ['spec/**/*.html']
},
watch: {
coffee: {
files: ['src/**/*.coffee', 'spec/**/*.coffee'],
tasks: 'coffee'
},
browserify: {
files: ['tmp/**/*.js'],
files: ['lib/**/*.js'],
tasks: ['browserify', 'uglify']
}
},
clean: ['dist']
}
});

grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-mocha-phantomjs');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default', ['coffee', 'browserify', 'uglify', 'mocha']);
grunt.registerTask('default', ['coffee', 'browserify', 'uglify', 'mocha_phantomjs']);
};
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2015 Mateus Maso
Copyright (c) 2012 Mateus Maso

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
67 changes: 37 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
hipbone [![Build Status](https://travis-ci.org/mateusmaso/hipbone.svg?branch=master)](https://travis-ci.org/mateusmaso/hipbone)
==============

Hipbone is a framework for building Single Page Applications on top of Backbone.

## Features

* ```Backbone.Model``` & ```Backbone.Collection``` boost (relationship mapping & polymorphism & computed attributes).
* Rails-like app architecture (initializers & i18n & identity map & module include/extend & reflection).
* React-like view components + handlebars templating (one-way data binding & custom elements syntax).
* Ember-like routing system (fast back & reusable routes & url helpers & auto in-app href pushstate)
* And more!

## Dependencies

* observe.js (>= 0.5.7)
* jsondiffpatch.js (>= 0.1.41)
* jquery.js (>= 2.1.0)
* jquery.lifecycle.js (>= 0.1.2)
* handlebars.js (>= 4.0.5)
* handlebars.element.js (>= 0.1.3)
* handlebars.binding.js (>= 0.3.1)
* underscore.js (>= 1.8.3)
* underscore.path.js (>= 0.1.4)
* underscore.pathextend.js (>= 0.1.2)
* underscore.parse.js (>= 0.1.1)
* underscore.string.js (>= 3.3.4)
* underscore.string.js (>= 0.2.0)
* underscore.prefilter.js (>= 0.1.2)
* underscore.catenate.js (>= 0.1.1)
* underscore.deepclone.js (>= 0.1.1)
* backbone.js (>= 1.3.3)
Hipbone is a Backbone based framework for building Single Page Applications.

<img src="https://upload.wikimedia.org/wikipedia/commons/5/50/Hip_bone.png" width=100 />

## Install

```
$ npm install --save hipbone
```

## Folder Structure

```
.
|-- models
|-- collections
|-- views
|-- templates
|-- locales
| `-- en.coffee
|-- initializers
| `-- match_routes.coffee
`-- app.coffee
```

## Usage

```javascript
var App = require("./app");
var app = new App();
app.run();
```

## Examples

#### [TodoMVC](https://www.github.com/mateusmaso/hipbone/tree/master/examples/todomvc)

## License

Copyright (c) 2012-2016 Mateus Maso. Released under an MIT license.
MIT © [Mateus Maso](http://www.mateusmaso.com)
Loading

0 comments on commit 4ff339d

Please sign in to comment.