Skip to content

Commit

Permalink
[WIP] Get Grunt consistently working again (#5466)
Browse files Browse the repository at this point in the history
Get Grunt consistently working again
  • Loading branch information
kevin-brown committed Mar 20, 2019
1 parent 5977856 commit 9f8b6ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 132 deletions.
126 changes: 3 additions & 123 deletions Gruntfile.js
Expand Up @@ -62,10 +62,6 @@ module.exports = function (grunt) {
grunt.initConfig({
package: grunt.file.readJSON('package.json'),

clean: {
docs: ['docs/_site']
},

concat: {
'dist': {
options: {
Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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']);
Expand All @@ -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']);
};
10 changes: 1 addition & 9 deletions package.json
Expand Up @@ -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",
Expand Down

0 comments on commit 9f8b6ff

Please sign in to comment.