var wgServer = process.env.MW_SERVER,
wgScriptPath = process.env.MW_SCRIPT_PATH,
- WebdriverIOconfigFile,
karmaProxy = {};
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-karma' );
grunt.loadNpmTasks( 'grunt-stylelint' );
- grunt.loadNpmTasks( 'grunt-webdriver' );
karmaProxy[ wgScriptPath ] = {
target: wgServer + wgScriptPath,
changeOrigin: true
};
- if ( process.env.JENKINS_HOME ) {
- WebdriverIOconfigFile = './tests/selenium/wdio.conf.jenkins.js';
- } else {
- WebdriverIOconfigFile = './tests/selenium/wdio.conf.js';
- }
-
grunt.initConfig( {
eslint: {
all: [
'!node_modules/**',
'!resources/lib/**',
'!resources/src/jquery.tipsy/**',
- '!resources/src/jquery/jquery.farbtastic.js',
- '!resources/src/mediawiki.libs/**',
+ '!resources/src/mediawiki.libs.jpegmeta/**',
// Third-party code of PHPUnit coverage report
'!tests/coverage/**',
'!vendor/**',
'!extensions/**/*.js',
'!skins/**/*.js',
// Skip functions aren't even parseable
- '!resources/src/mediawiki.hidpi-skip.js'
+ '!resources/src/mediawiki.hidpi/skip.js'
]
},
jsonlint: {
installer: 'includes/installer/i18n/'
},
stylelint: {
- options: {
- syntax: 'less'
- },
src: '{resources/src,mw-config}/**/*.{css,less}'
},
watch: {
chromium: {
browsers: [ 'Chromium' ]
},
- more: {
- browsers: [ 'Chrome', 'Firefox' ]
+ firefox: {
+ browsers: [ 'Firefox' ]
}
},
copy: {
return require( 'path' ).join( dest, src.replace( 'resources/', '' ) );
}
}
- },
-
- // Configure WebdriverIO task
- webdriver: {
- test: {
- configFile: WebdriverIOconfigFile
- }
}
-
} );
grunt.registerTask( 'assert-mw-env', function () {