diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-08-28 09:33:55 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-08-28 09:33:55 +0300 |
commit | 77a6412ff7a8bdb2f23fb00a2d8ce22e7a35fcee (patch) | |
tree | 32100fa64ee556f1fd125751bb7c619dc73200bf /tests/angularjs | |
parent | ba0a9d53f41a96c994d9bb1c8298d97c0400060c (diff) |
Split piwik.js into multiple files and provide a merged one (#10441)
refs #6106
Diffstat (limited to 'tests/angularjs')
-rw-r--r-- | tests/angularjs/Gruntfile.js | 23 | ||||
-rwxr-xr-x | tests/angularjs/karma.conf.js | 4 | ||||
-rw-r--r-- | tests/angularjs/package.json | 5 |
3 files changed, 28 insertions, 4 deletions
diff --git a/tests/angularjs/Gruntfile.js b/tests/angularjs/Gruntfile.js index 2e50318f95..3527b5973a 100644 --- a/tests/angularjs/Gruntfile.js +++ b/tests/angularjs/Gruntfile.js @@ -2,6 +2,12 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ + karma: { + unit: { + configFile: 'karma.conf.js', + autoWatch: true + } + }, pkg: grunt.file.readJSON('package.json'), watch: { scripts: { @@ -13,7 +19,14 @@ module.exports = function(grunt) { }, piwikjs: { files: ['js/piwik.js'], - tasks: ["shell:compilePiwikJs"], + tasks: ["shell:compilePiwikJs", "shell:updateTracker"], + options: { + spawn: false, + }, + }, + piwikjs2: { + files: ['plugins/*/tracker.js',], + tasks: ["shell:updateTracker"], options: { spawn: false, }, @@ -27,6 +40,14 @@ module.exports = function(grunt) { cwd: 'js' } } + }, + updateTracker: { + command: "php console custom-piwik-js:update --ignore-minified", + options: { + execOptions: { + cwd: '' + } + } } }, "clean-pattern": { diff --git a/tests/angularjs/karma.conf.js b/tests/angularjs/karma.conf.js index 9525c7e06b..780fdb6d8e 100755 --- a/tests/angularjs/karma.conf.js +++ b/tests/angularjs/karma.conf.js @@ -20,7 +20,7 @@ module.exports = function(config) { "libs/bower_components/angular-animate/angular-animate.js", 'libs/bower_components/angular-mocks/angular-mocks.js', 'libs/bower_components/jquery/dist/jquery.min.js', - "libs/bower_components/jquery-ui/jquery-ui.min.js", + "libs/bower_components/jquery-ui/ui/minified/jquery-ui.min.js", "plugins/CoreHome/javascripts/require.js", "plugins/Morpheus/javascripts/piwikHelper.js", "plugins/Morpheus/javascripts/ajaxHelper.js", @@ -68,7 +68,7 @@ module.exports = function(config) { // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], + browsers: [], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits diff --git a/tests/angularjs/package.json b/tests/angularjs/package.json index 74b8e44936..0d8daedeed 100644 --- a/tests/angularjs/package.json +++ b/tests/angularjs/package.json @@ -24,5 +24,8 @@ "engines": { "node": ">= 0.10.0" }, - "version": "0.1.0" + "version": "0.1.0", + "devDependencies": { + "grunt-karma": "^2.0.0" + } } |