Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-CI testing #474

Merged
merged 9 commits into from Mar 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
@@ -1,2 +1,5 @@
node_modules
.idea
.idea
_SpecRunner.html
.grunt

9 changes: 9 additions & 0 deletions .travis.yml
@@ -0,0 +1,9 @@
language: node_js

node_js:
- "0.8"

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "npm install -g grunt-cli"
149 changes: 99 additions & 50 deletions Gruntfile.js
Expand Up @@ -21,72 +21,94 @@
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: [
'tmp/intro.js',

'tmp/core.js',
'src/tableView.js',
'src/helpers.js',
'src/fillHandle.js',
'src/undoRedo.js',
'src/selectionPoint.js',

'src/renderers/textRenderer.js',
'src/renderers/autocompleteRenderer.js',
'src/renderers/checkboxRenderer.js',
'src/renderers/numericRenderer.js',

'src/editors/textEditor.js',
'src/editors/autocompleteEditor.js',
'src/editors/checkboxEditor.js',
'src/editors/dateEditor.js',
meta: {
src: [
'tmp/core.js',
'src/tableView.js',
'src/helpers.js',
'src/fillHandle.js',
'src/undoRedo.js',
'src/selectionPoint.js',

'src/cellTypes.js',
'src/renderers/textRenderer.js',
'src/renderers/autocompleteRenderer.js',
'src/renderers/checkboxRenderer.js',
'src/renderers/numericRenderer.js',

'src/pluginHooks.js',
'src/plugins/autoColumnSize.js',
'src/plugins/columnSorting.js',
'src/plugins/contextMenu.js',
'src/plugins/legacy.js',
'src/plugins/manualColumnMove.js',
'src/plugins/manualColumnResize.js',
'src/editors/textEditor.js',
'src/editors/autocompleteEditor.js',
'src/editors/checkboxEditor.js',
'src/editors/dateEditor.js',

'src/cellTypes.js',

'src/3rdparty/jquery.autoresize.js',
'src/3rdparty/sheetclip.js',
'src/3rdparty/walkontable.js',
'src/3rdparty/copypaste.js',
'src/pluginHooks.js',
'src/plugins/autoColumnSize.js',
'src/plugins/columnSorting.js',
'src/plugins/contextMenu.js',
'src/plugins/legacy.js',
'src/plugins/manualColumnMove.js',
'src/plugins/manualColumnResize.js',

'src/outro.js'
],
dest: 'jquery.handsontable.js'
'src/3rdparty/jquery.autoresize.js',
'src/3rdparty/sheetclip.js',
'src/3rdparty/walkontable.js',
'src/3rdparty/copypaste.js',
],
vendor: [
'lib/bootstrap-typeahead.js',
'lib/numeral.js',
'lib/jQuery-contextMenu/jquery.contextMenu.js'
// seems to have no effect when turned off on contextmenu.html
//'lib/jQuery-contextMenu/jquery.ui.position.js'
]
},

concat: {
dist: {
files: {
'jquery.handsontable.js': [
'tmp/intro.js',
'<%= meta.src %>',
'src/outro.js'
]
}
},
full_js: {
src: [
'jquery.handsontable.js',
'lib/bootstrap-typeahead.js',
'lib/numeral.js',
'lib/jQuery-contextMenu/jquery.contextMenu.js'
//'lib/jQuery-contextMenu/jquery.ui.position.js' //seems to have no effect when turned off on contextmenu.html
],
dest: 'dist/jquery.handsontable.full.js'
files: {
'dist/jquery.handsontable.full.js': [
'jquery.handsontable.js',
'<%= meta.vendor %>'
]
}
},
full_css: {
src: [
'jquery.handsontable.css',
'lib/jQuery-contextMenu/jquery.contextMenu.css'
],
dest: 'dist/jquery.handsontable.full.css'
files: {
'dist/jquery.handsontable.full.css': [
'jquery.handsontable.css',
'lib/jQuery-contextMenu/jquery.contextMenu.css'
]
}
}
},

watch: {
files: ['src/*', 'src/editors/*', 'src/plugins/*', 'src/renderers/*', 'src/3rdparty/*', 'src/css/*', 'lib/*'],
files: [
'src/*',
'src/editors/*',
'src/plugins/*',
'src/renderers/*',
'src/3rdparty/*',
'src/css/*',
'lib/*'
],
tasks: ['replace', 'concat', 'clean']
},

clean: {
dist: ['tmp']
},

replace: {
dist: {
options: {
Expand All @@ -101,14 +123,41 @@ module.exports = function (grunt) {
'jquery.handsontable.css': 'src/css/jquery.handsontable.css'
}
}
},

jasmine: {
src: [
'lib/jquery.min.js',
// '<%= meta.src %>',
'jquery.handsontable.js',
'lib/bootstrap-typeahead.js',
'lib/numeral.js',
'lib/jQuery-contextMenu/jquery.contextMenu.js',
'test/jasmine/spec/SpecHelper.js'
],
options: {
specs: [
'test/jasmine/spec/*Spec.js',
'test/jasmine/spec/*/*Spec.js'
],
template: 'test/JqueryHandsontableRunner.tmpl',
templateOptions: {
css: [
'lib/jQuery-contextMenu/jquery.contextMenu.css',
'jquery.handsontable.css',
]
}
}
}
});

// Default task.
grunt.registerTask('default', ['replace', 'concat', 'clean']);
grunt.registerTask('test', ['default', 'jasmine']);

grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
};
1 change: 1 addition & 0 deletions README.md
@@ -1,4 +1,5 @@
# Handsontable
[![Build Status](https://travis-ci.org/bollwyvl/jquery-handsontable.png?branch=travis-testing)](https://travis-ci.org/bollwyvl/jquery-handsontable)

Handsontable is a minimalistic approach to Excel-like table editor in HTML & jQuery. Requires jQuery 1.7+. Runs in IE7, IE8, IE9, Firefox, Chrome, Safari and Opera.

Expand Down
8 changes: 6 additions & 2 deletions package.json
Expand Up @@ -9,9 +9,13 @@
"version": "0.8.10",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-replace": "~0.3.2",
"grunt-replace": "~0.4.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-concat": "~0.1.0",
"grunt-contrib-watch": "~0.2.0"
"grunt-contrib-watch": "~0.2.0",
"grunt-contrib-jasmine": "~0.3.3"
},
"scripts":{
"test": "grunt test -v"
}
}
21 changes: 21 additions & 0 deletions test/JqueryHandsontableRunner.tmpl
@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }) %>

<link rel="stylesheet" media="screen" href="./lib/jQuery-contextMenu/jquery.contextMenu.css">
<link rel="stylesheet" media="screen" href="./jquery.handsontable.css">

<% with (scripts) { %>
<% [].concat(jasmine, vendor, helpers, src, specs, reporters, start).forEach(function(script){ %>
<script src="<%= script %>"></script>
<% }) %>
<% }; %>
</head>
<body>
</body>
</html>
4 changes: 2 additions & 2 deletions test/jasmine/SpecRunner.html
Expand Up @@ -34,8 +34,8 @@
<script type="text/javascript" src="spec/Core_onKeyDownSpec.js"></script>
<script type="text/javascript" src="spec/Core_copySpec.js"></script>
<script type="text/javascript" src="spec/Core_dataSchemaSpec.js"></script>
<script type="text/javascript" src="spec/Core_alter.js"></script>
<script type="text/javascript" src="spec/Core_view.js"></script>
<script type="text/javascript" src="spec/Core_alterSpec.js"></script>
<script type="text/javascript" src="spec/Core_viewSpec.js"></script>
<script type="text/javascript" src="spec/Core_destroyEditorSpec.js"></script>
<script type="text/javascript" src="spec/Core_getCellMetaSpec.js"></script>
<script type="text/javascript" src="spec/RowHeaderSpec.js"></script>
Expand Down
File renamed without changes.
File renamed without changes.