From e353f7f5924137a594b66d1ec2f18be08a34576a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 19 Mar 2019 22:43:19 -0400 Subject: [PATCH 1/4] Remove unused Grunt docs packages Now that we no longer use Jekyll and docs are stored in a different repository, we don't need to be installing these development dependencies and we don't need the Grunt configuration that backs them. --- Gruntfile.js | 25 ------------------------- package.json | 4 ---- 2 files changed, 29 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9bf44ee303..da04a224be 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -62,10 +62,6 @@ module.exports = function (grunt) { grunt.initConfig({ package: grunt.file.readJSON('package.json'), - clean: { - docs: ['docs/_site'] - }, - concat: { 'dist': { options: { @@ -240,19 +236,6 @@ module.exports = function (grunt) { } }, - symlink: { - docs: { - cwd: 'dist', - expand: true, - overwrite: false, - src: [ - '*' - ], - dest: 'docs/dist', - filter: 'isDirectory' - } - }, - requirejs: { 'dist': { options: { @@ -331,18 +314,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'); @@ -373,8 +352,4 @@ module.exports = function (grunt) { ciTasks.push('jshint'); grunt.registerTask('ci', ciTasks); - - grunt.registerTask('docs', ['symlink:docs', 'jekyll:serve']); - - grunt.registerTask('docs-release', ['default', 'clean:docs', 'gh-pages']); }; diff --git a/package.json b/package.json index ac0060f25b..64a48dfc09 100644 --- a/package.json +++ b/package.json @@ -49,18 +49,14 @@ "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", From 868eda53e9d4eb66c52b433ef276ab4f56f3d77d Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 19 Mar 2019 22:44:01 -0400 Subject: [PATCH 2/4] Remove Saucelabs integration This was disabled months ago when it stopped working within Travis. We may as well remove the integration now that it is no longer accurate. --- Gruntfile.js | 98 +--------------------------------------------------- package.json | 1 - 2 files changed, 1 insertion(+), 98 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index da04a224be..624d4f2a35 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -120,85 +120,6 @@ 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 @@ -322,7 +243,6 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-sass'); grunt.registerTask('default', ['compile', 'test', 'minify']); @@ -335,21 +255,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('ci', ['compile', 'test']); }; diff --git a/package.json b/package.json index 64a48dfc09..046e8cddd1 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-watch": "~0.6.0", "grunt-sass": "^1.0.0", - "grunt-saucelabs": "^9.0.0", "node-sass": "^4.5.3", "request": "<=2.81.0", "shrinkwrap": "^0.4.0" From 3e969982d9552a20f9402d43c5f8af4d63e9d2ba Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 19 Mar 2019 23:00:56 -0400 Subject: [PATCH 3/4] Unpinned extra dependencies Let's see if Travis fixed their issues that they had with the request package, but the rest aren't documented as to why they were pinned. --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 046e8cddd1..b02f6d1165 100644 --- a/package.json +++ b/package.json @@ -52,15 +52,12 @@ "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-uglify": "~0.4.0", "grunt-contrib-watch": "~0.6.0", "grunt-sass": "^1.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", From 3f71d09efaf601771c226fba36b0129d0f8648e9 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 19 Mar 2019 23:08:48 -0400 Subject: [PATCH 4/4] Fixed Grunt error with older jshint versions --- Gruntfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 624d4f2a35..2cefb84951 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -122,7 +122,8 @@ module.exports = function (grunt) { jshint: { options: { - jshintrc: true + jshintrc: true, + reporterOutput: '' }, code: { src: ['src/js/**/*.js']