Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 9, 2014
2 parents 276c0e2 + 45e521f commit 69cc280
Show file tree
Hide file tree
Showing 422 changed files with 69,177 additions and 47,169 deletions.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.DS_Store
node_modules/
sandbox/
tmp/
sandbox/*
!sandbox/_base.html
!sandbox/_sandbox.css
!sandbox/require.js
!sandbox/sample/
tmp/
FIX.js
build/*
!build/README.md
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
language: node_js
python:
node_js:
- '0.10'
before_script:
- npm install -g grunt-cli
- npm install -g grunt-cli; chmod u+x scripts/deploy-edge-to-cdn.sh; grunt
script: ./scripts/deploy-edge-to-cdn.sh
env:
global:
- GH_REF: github.com/ractivejs/cdn.ractivejs.org.git
- secure: "dnPSiJmQuKhMh8skVLUjFegc+resP5wZV9scVxrSzkJNOzqLPE9Z8nm4c95gh6MzfHEz6YWz3gKfUfJeyHgpp1zfo+1EfOmit78GxZf+aj7GW1lBpPXFpobpTE1ZVTizu3/M6AojRXB7eIqSGJsUQvZAY8t1dldUDbocwveXqA0="
branches:
only:
- master
- 0.4.0
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,43 @@
Changelog
---------

* 0.4.0
* BREAKING: Filenames are now lowercase. May affect you if you use Browserify etc.
* BREAKING: `set()`, `update()`, `teardown()`, `animate()`, `merge()`, `add()`, `subtract()`, and `toggle()` methods return a Promise that fulfils asynchronously when any resulting transitions have completed
* BREAKING: Elements are detached when *all* transitions are complete for a given instance, not just transitions on descendant nodes
* BREAKING: Default options are placed on `Ractive.defaults` (and `Component.defaults`, where `Component = Ractive.extend(...)`)
* BREAKING: The `adaptors` option is now `adapt`. It can be a string rather than an array if you're only using one adaptor
* Reactive computed properties
* Two-way binding works with 'keypath expressions' such as `{{foo[bar]}}`
* Support for single-file component imports via loader plugins such as http://ractivejs.github.io/ractive-load/
* A global runloop handles change propagation and other batchable operations, resulting in performance improvements across the board
* Promises are used internally, and exposed as `Ractive.Promise` (Promises/A+ compliant, a la ES6 Promises)
* Components can have encapsulated styles, passed in as the `css` option (disable with `noCssTransform: true`)
* `ractive.reset()` method allows you to replace an instance's `data` object
* Decorators are updated when their arguments change (with specified `update()` method if possible, otherwise by tearing down and reinitialising)
* Inline components inherit surrounding data context, unless defined with `isolated: true`
* Transitions will use JavaScript timers if CSS transitions are unavailable
* A global variable (`window.Ractive`) is always exported, but `Ractive.noConflict()` is provided to prevent clobbering existing `Ractive` variable
* Inline component `init()` methods are only called once the component has entered the DOM
* Any section can be closed with `{{/...}}`, where `...` can be any string other than the closing delimiter
* Evaluators that throw exceptions will print an error to the console in debug mode
* `ractive.observe(callback)` - i.e. with no keypath - observes everything
* `ractive.observe('foo bar baz', callback)` will observe all three keypaths (passed to callback as third argument)
* Better whitespace preservation and indenting when using `ractive.toHTML()`
* Calling `ractive.off()` with no arguments removes all event listeners
* Triples work inside SVG elements
* `<option>{{foo}}</option>` works the same as `<option value='{{foo}}'>{{foo}}</option>`
* More robust data/event propagation between components
* More robust magic mode
* Fixed a host of edge case bugs relating to array mutations
* Many minor fixes and tweaks: #349, #351, #353, #369, #370, #376, #377, #390, #391, #393, #398, #401, #406, #412, #425, #433, #434, #439, #441, #442, #446, #451, #460, #462, #464, #465, #467, #479, #480, #483, #486, #520, #530, #536, #553, #556
* 0.3.9
* `ractive.findComponent()` and `ractive.findAllComponents()` methods, for getting references to components
* Expression results are wrapped if necessary (e.g. `{{getJSON(url)}}` wrapped by [@lluchs](https://github.com/lluchs)' [Promise adaptor](lluchs.github.io/Ractive-adaptors-Promise/))
* Mustaches referring to wrapped values render the facade, not the value
* Directive arguments are parsed more reliably
* Components inherit adaptors from their parents
* Adaptors can be set on subclasses defined with `Ractive.extend()`
* Adapto
* Changes to [transitions API](http://docs.ractivejs.org/latest/transitions)
* SVG support is detected and exposed as `Ractive.svg`
* If subclass has data, it is used as prototype for instance data
Expand Down
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ Of course, if you've encountered a bug, then the best course of action is to rai
Raising issues
--------------

Before submitting an issue, please make sure you're using the [latest released version](https://raw.github.com/RactiveJS/Ractive/master/Ractive.js).
Before submitting an issue, please make sure you're using the latest released version - http://cdn.ractivejs.org/latest/Ractive.js.

If the bug persists, it may have been fixed in the latest development version. New versions are developed in branches, named for the version number (e.g. at the time of writing, the development branch is [0.3.9](https://github.com/RactiveJS/Ractive/tree/0.3.9)). You can get the most recent builds from the `build` folder of this branch.
If the bug persists, it may have been fixed in the latest development version. You can always get the most recent successful build from http://cdn.ractivejs.org/edge/Ractive.js.

See the [branches page](https://github.com/RactiveJS/Ractive/branches) to find the newest development branch.

The best issues contain a reproducible demonstration of the bug in the form of a [JSFiddle](http://jsfiddle.net/VGaLu/) or similar. A good tip when using these tools is to import Ractive via [rawgithub.com](https://rawgithub.com/), e.g. https://rawgithub.com/RactiveJS/Ractive/master/Ractive.js.
The best issues contain a reproducible demonstration of the bug in the form of a JSFiddle or similar. [This JSFiddle](http://jsfiddle.net/rich_harris/va6jU/) has a basic setup to get started with.


Pull requests
Expand All @@ -34,7 +32,7 @@ Pull requests

**Pull requests against the master branch will not be merged!**

All pull requests are welcome. You should create a new branch, based on the newest development branch (see above), and submit the PR against the dev branch.
All pull requests are welcome. You should create a new branch, based on the newest development branch (currently [0.4.0](https://github.com/RactiveJS/Ractive/tree/0.4.0)), and submit the PR against that dev branch.

*Caveat for what follows: If in doubt, submit the request - a PR that needs tweaking is infinitely more valuable than a request that wasn't made because you were worrying about meeting these requirements.*

Expand Down
219 changes: 25 additions & 194 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,204 +1,35 @@
/*global module:false*/
module.exports = function(grunt) {
module.exports = function ( grunt ) {

// Project configuration.
grunt.initConfig({
'use strict';

pkg: grunt.file.readJSON( 'package.json' ),

watch: {
js: {
files: [ 'src/**/*.js', 'wrapper/**/*.js' ],
tasks: [ 'clean:tmp', 'requirejs' ],
options: {
interrupt: true,
force: true
}
}
},

nodeunit: {
basic: [ 'test/node/basic.js' ],
parse: [ 'test/node/parse.js' ],
toHTML: [ 'test/node/toHTML.js' ]
},

qunit: {
parse: [ 'test/build/parse.html' ],
render: [ 'test/build/render.html' ],
mustache: [ 'test/build/mustache.html' ],
events: [ 'test/build/events.html' ],
misc: [ 'test/build/misc.html' ],
components: [ 'test/build/components.html' ],
merge: [ 'test/build/merge.html' ],
observe: [ 'test/build/observe.html' ],
options: {
timeout: 30000
}
},

requirejs: {
full: {
options: {
baseUrl: 'src/',
name: 'Ractive',
out: 'tmp/Ractive.js',
optimize: 'none',
findNestedDependencies: true,
onBuildWrite: function( name, path, contents ) {
return require( 'amdclean' ).clean( contents );
},

wrap: {
startFile: 'wrapper/intro.js',
endFile: 'wrapper/outro.js'
}
}
},
runtime: {
options: {
baseUrl: 'src/',
name: 'Ractive',
out: 'tmp/Ractive.runtime.js',
optimize: 'none',
findNestedDependencies: true,
onBuildWrite: function( name, path, contents ) {
return require( 'amdclean' ).clean( contents );
},

paths: {
'parse/_parse': 'empty:'
},

wrap: {
startFile: 'wrapper/intro.js',
endFile: 'wrapper/outro.js'
}
}
}
},
var config, dependency;

concat: {
options: {
banner: grunt.file.read( 'wrapper/banner.js' ),
process: {
data: { version: '<%= pkg.version %>' }
}
},
full: {
src: [ 'tmp/Ractive.js' ],
dest: 'build/Ractive.js'
},
runtime: {
src: [ 'tmp/Ractive.runtime.js' ],
dest: 'build/Ractive.runtime.js'
},
full_legacy: {
src: [ 'src/legacy.js', 'tmp/Ractive.js' ],
dest: 'build/Ractive-legacy.js'
},
runtime_legacy: {
src: [ 'src/legacy.js', 'tmp/Ractive.runtime.js' ],
dest: 'build/Ractive-legacy.runtime.js'
}
},

clean: {
tmp: [ 'tmp/' ],
build: [ 'build/' ]
},

jshint: {
files: [ 'src/**/*.js' ],
options: {
proto: true,
smarttabs: true,
boss: true,
evil: true,
laxbreak: true,
undef: true,
unused: true,
'-W018': true,
'-W041': false,
eqnull: true,
strict: true,
globals: {
define: true,
require: true,
Element: true,
window: true,
setTimeout: true,
setInterval: true,
clearInterval: true,
module: true,
document: true,
loadCircularDependency: true
}
}
},

uglify: {
runtime: {
src: ['<%= concat.runtime.dest %>'],
dest: 'build/Ractive.runtime.min.js'
},
full: {
src: ['<%= concat.full.dest %>'],
dest: 'build/Ractive.min.js'
},
runtime_legacy: {
src: ['<%= concat.runtime_legacy.dest %>'],
dest: 'build/Ractive-legacy.runtime.min.js'
},
full_legacy: {
src: ['<%= concat.full_legacy.dest %>'],
dest: 'build/Ractive-legacy.min.js'
}
},

copy: {
release: {
files: [{
expand: true,
cwd: 'build/',
src: [ '**/*' ],
dest: 'release/<%= pkg.version %>/'
}]
},
link: {
files: {
'Ractive.js': 'build/Ractive.js'
}
}
}
config = {
pkg: grunt.file.readJSON( 'package.json' ),
intro: grunt.file.read( 'wrapper/intro.js' ),
outro: grunt.file.read( 'wrapper/outro.js' ),
banner: grunt.file.read( 'wrapper/banner.js' )
};

// Read config files from the `grunt/config/` folder
grunt.file.expand( 'grunt/config/*.js' ).forEach( function ( path ) {
var property = /grunt\/config\/(.+)\.js/.exec( path )[1],
module = require( './' + path );
config[ property ] = typeof module === 'function' ? module( grunt ) : module;
});

grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-nodeunit' );
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-requirejs' );
// Initialise grunt
grunt.initConfig( config );

grunt.registerTask( 'default', [
'test',
'clean:build',
'concat',
'uglify',
'copy:link'
]);

grunt.registerTask( 'test', [
'clean:tmp',
'jshint',
'requirejs',
'nodeunit',
'qunit'
]);
// Load development dependencies specified in package.json
for ( dependency in config.pkg.devDependencies ) {
if ( /^grunt-/.test( dependency) ) {
grunt.loadNpmTasks( dependency );
}
}

grunt.registerTask( 'release', [ 'default', 'copy:release', 'copy:link' ] );
// Load tasks from the `grunt-tasks/` folder
grunt.loadTasks( 'grunt/tasks' );

};
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 Rich Harris and contributors
Copyright (c) 2013-14 Rich Harris and contributors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Ractive.js - Next-generation DOM manipulation

*Got questions? Tag Stack Overflow questions with [ractivejs](http://stackoverflow.com/questions/tagged/ractivejs) or contact [@RactiveJS](http://twitter.com/RactiveJS) on Twitter*

*<b>BETANAUTS!</b> Help improve the next version of Ractive by trying out the [pre-release 0.4.0 builds](https://github.com/Rich-Harris/Ractive/tree/0.4.0/build) and [reporting any issues](https://github.com/Rich-Harris/Ractive/issues?state=open)!*
*<b>BETANAUTS!</b> Help improve the next version of Ractive by trying out the [pre-release 0.4.0 builds](https://github.com/ractivejs/ractive/tree/0.4.0/build) and [reporting any issues](https://github.com/ractivejs/ractive/issues?state=open)!*

What is Ractive.js?
-------------------
Expand All @@ -17,13 +17,13 @@ It's a JavaScript library for building reactive user interfaces in a way that do

...among many others. It takes a radically different approach to DOM manipulation - one that saves both you and the browser unnecessary work.

To get a feel for how it will make your life as a web developer easier, visit [ractivejs.org](http://ractivejs.org), follow the [interactive tutorials](http://learn.ractivejs.org), or try the [60 second setup](https://github.com/RactiveJS/Ractive/wiki/60-second-setup).
To get a feel for how it will make your life as a web developer easier, visit [ractivejs.org](http://ractivejs.org), follow the [interactive tutorials](http://learn.ractivejs.org), or try the [60 second setup](https://github.com/ractivejs/ractive/wiki/60-second-setup).


Get help
--------

If you don't find what you're looking for in the [docs](https://github.com/rich-harris/Ractive/wiki), ask a question on Stack Overflow with the `ractivejs` tag, or send a tweet to [@RactiveJS](http://twitter.com/RactiveJS) or [@Rich_Harris](http://twitter.com/Rich_Harris).
If you don't find what you're looking for in the [docs](http://docs.ractivejs.org/latest), ask a question on Stack Overflow with the `ractive` tag, or send a tweet to [@RactiveJS](http://twitter.com/RactiveJS).


Building
Expand Down Expand Up @@ -69,7 +69,7 @@ $ grunt release
Contributing
------------

If you have feature suggestions or bug reports, please [raise an issue on GitHub](https://github.com/RactiveJS/Ractive/issues) after checking it's not a duplicate.
If you have feature suggestions or bug reports, please [raise an issue on GitHub](https://github.com/ractivejs/ractive/issues) after checking it's not a duplicate.

Pull requests are always welcome! In lieu of a formal styleguide, please try to follow the existing conventions.

Expand Down
Loading

0 comments on commit 69cc280

Please sign in to comment.