-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
422 changed files
with
69,177 additions
and
47,169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.