NOTE: The API is currently still in flux, stay aware of changes before updating.
Marbles is a JavaScript framework inspired by Backbone.js and React.
There is no view component, it's recomended you use React.
Reference this repo in your compiler:
package main
import (
"log"
matrix "github.com/jvatic/asset-matrix-go"
)
func main() {
m := matrix.New(&matrix.Config{
Paths: []*matrix.AssetRoot{
{
GitRepo: "git://github.com/jvatic/marbles-js.git",
GitBranch: "master",
GitRef: "6d5491bbc51f4454e0c605af6e7faa4e0539441a",
Path: "src",
},
},
})
if err := m.Build(); err != nil {
log.Fatal(err)
}
m.RemoveOldAssets()
}
then import the modules you need:
import { extend } from 'marbles/utils';
import HTTP from 'marbles/http':
// ...
npm install marbles
var Router = require('marbles/router');
var extend = require('marbles/utils').extend;
// ...
# Gemfile
gem 'marbles-js', :git => 'https://github.com/jvatic/marbles-js.git'
gem 'es6-module-mapper', :git => 'https://github.com/jvatic/es6-module-mapper.git';
require 'sprockets'
require 'es6-module-mapper' # or some other means of ES6 module support
require 'marbles-js'
::Sprockets::Environment.new do |env|
# we're not using the directive processor, so unregister it
env.unregister_preprocessor(
'application/javascript', ::Sprockets::DirectiveProcessor)
::MarblesJS::Sprockets.setup(env)
end
cd docs
python -m SimpleHTTPServer
and open localhost:8000 in your browser.
npm install
bundle
bundle exec rake compile
- Finalize API / work out inconsistencies
- Move away from callbacks and use Dispatcher events and promises instead
- Write tests (API is nearing completion and is no longer likely to drastically change).
- Write more in-depth usage examples
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request