diff --git a/.gitignore b/.gitignore index fa7ccf614b..5e95d2224f 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ # asset cache /.sass-cache/ +/node_modules/ diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000000..55a546e48d --- /dev/null +++ b/.jshintignore @@ -0,0 +1,24 @@ +app/assets/javascripts/raphael.js +app/assets/javascripts/raphael-min.js +app/assets/javascripts/date-de-DE.js +app/assets/javascripts/date-en-US.js +app/assets/javascripts/jstoolbar/**/* +app/assets/javascripts/jquery_noconflict.js +app/assets/javascripts/pages/**/* +app/assets/javascripts/project/**/* +app/assets/javascripts/jquery.menu_expand.js +app/assets/javascripts/jquery-ui-i18n.js + +#we sould fix this ones +app/assets/javascripts/select_list_move.js +app/assets/javascripts/context_menu.js +app/assets/javascripts/breadcrumb.js +app/assets/javascripts/keyboard_shortcuts.js +app/assets/javascripts/openproject.js +app/assets/javascripts/top-shelf.js +app/assets/javascripts/top_menu.js +app/assets/javascripts/findDomElement.js +app/assets/javascripts/application.js +app/assets/javascripts/action_menu.js +app/assets/javascripts/accessibility.js +app/assets/javascripts/repository_navigation.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000000..80550c4751 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,37 @@ +module.exports = function(grunt) { + + var jsPath = "app/assets/javascripts/"; + var jsPaths = ['timelines/**/*.js', 'timelines.js', 'timelines_modal.js', 'timelines_select_boxes.js', 'members_form.js', 'members_select_boxes.js'].map(function (e) { return jsPath + e; }); + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + jshint: { + all: { + files: { + src: ["app/assets/javascripts/"] //jsPaths + } + } + }, + mocha_phantomjs: { + all: ['mocha/index.html'] + }, + watch: { + scripts: { + files: jsPaths, + tasks: ['jshint', 'mocha_phantomjs'], + options: { + spawn: false, + }, + }, + }, + }); + + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-mocha-phantomjs'); + + // Default task(s). + grunt.registerTask('default', ['jshint']); + +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000000..4fb24d98b7 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "OpenProject", + "version": "0.1.0", + "devDependencies": { + "grunt": "~0.4.2", + "grunt-contrib-jshint": "~0.8.0", + "mocha-phantomjs": "~3.1.6", + "phantomjs": "~1.9.2", + "grunt-contrib-watch": "~0.5.3", + "grunt-mocha-phantomjs": "~0.3.2", + "grunt-mocha": "~0.4.8" + } +}