1
0
mirror of synced 2024-11-22 04:56:08 +03:00

[WIP] Get Grunt consistently working again (#5466)

Get Grunt consistently working again
This commit is contained in:
Kevin Brown 2019-03-19 23:16:01 -04:00 committed by GitHub
parent 5977856d81
commit 9f8b6fff40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 132 deletions

View File

@ -62,10 +62,6 @@ module.exports = function (grunt) {
grunt.initConfig({
package: grunt.file.readJSON('package.json'),
clean: {
docs: ['docs/_site']
},
concat: {
'dist': {
options: {
@ -124,88 +120,10 @@ module.exports = function (grunt) {
}
},
'saucelabs-qunit': {
all: {
options: {
build: testBuildNumber,
tags: ['tests', 'qunit'],
urls: testUrls,
testTimeout: 8000,
testname: 'QUnit test for Select2',
browsers: [
{
browserName: 'internet explorer',
version: '8',
platform: 'Windows 7'
},
{
browserName: 'internet explorer',
version: '9',
platform: 'Windows 7'
},
{
browserName: 'internet explorer',
version: '10',
platform: 'Windows 7'
},
{
browserName: 'internet explorer',
version: '11',
platform: 'Windows 10'
},
{
browserName: 'firefox',
platform: 'linux'
},
{
browserName: 'chrome',
platform: 'linux'
},
{
browserName: 'opera',
version: '12',
platform: 'linux'
}
]
}
}
},
'gh-pages': {
options: {
base: 'docs',
branch: 'master',
clone: 'node_modules/grunt-gh-pages/repo',
message: 'Updated docs with master',
push: true,
repo: 'git@github.com:select2/select2.github.io.git'
},
src: '**'
},
jekyll: {
options: {
src: 'docs',
dest: 'docs/_site'
},
build: {
d: null
},
serve: {
options: {
serve: true,
watch: true
}
}
},
jshint: {
options: {
jshintrc: true
jshintrc: true,
reporterOutput: ''
},
code: {
src: ['src/js/**/*.js']
@ -240,19 +158,6 @@ module.exports = function (grunt) {
}
},
symlink: {
docs: {
cwd: 'dist',
expand: true,
overwrite: false,
src: [
'*'
],
dest: 'docs/dist',
filter: 'isDirectory'
}
},
requirejs: {
'dist': {
options: {
@ -331,19 +236,14 @@ module.exports = function (grunt) {
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-symlink');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-sass');
grunt.registerTask('default', ['compile', 'test', 'minify']);
@ -356,25 +256,5 @@ module.exports = function (grunt) {
grunt.registerTask('minify', ['uglify', 'sass:dist']);
grunt.registerTask('test', ['connect:tests', 'qunit', 'jshint']);
var ciTasks = [];
ciTasks.push('compile');
ciTasks.push('connect:tests');
/*
// grunt-saucelabs appears to be broken with Travis altogether now.
// Can't run Sauce Labs tests in pull requests
if (process.env.TRAVIS_PULL_REQUEST == 'false') {
ciTasks.push('saucelabs-qunit');
}
*/
ciTasks.push('qunit');
ciTasks.push('jshint');
grunt.registerTask('ci', ciTasks);
grunt.registerTask('docs', ['symlink:docs', 'jekyll:serve']);
grunt.registerTask('docs-release', ['default', 'clean:docs', 'gh-pages']);
grunt.registerTask('ci', ['compile', 'test']);
};

View File

@ -49,23 +49,15 @@
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "~0.3.3",
"grunt-contrib-qunit": "~0.4.0",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-symlink": "^0.3.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.0",
"grunt-gh-pages": "^0.9.1",
"grunt-jekyll": "^0.4.2",
"grunt-sass": "^1.0.0",
"grunt-saucelabs": "^9.0.0",
"node-sass": "^4.5.3",
"request": "<=2.81.0",
"shrinkwrap": "^0.4.0"
"node-sass": "^4.5.3"
},
"dependencies": {
"almond": "~0.3.1",