Skip to content

Commit

Permalink
removing grunt-open issue #3296
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren McCarthy committed Nov 17, 2018
1 parent a96c6c6 commit e214115
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 28 deletions.
68 changes: 56 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,60 @@ module.exports = function(grunt) {
return middlewares;
}
}
}
},
open: {
},
yui: {
path: 'http://127.0.0.1:9001/docs/reference/'
options: {
directory: {
path: './',
options: {
icons: true
}
},
port: 9001,
open: 'http://127.0.0.1:9001/docs/reference/',
keepalive: keepalive,
middleware: function(connect, options, middlewares) {
middlewares.unshift(
require('connect-modrewrite')([
'^/assets/js/p5(\\.min)?\\.js(.*) /lib/p5$1.js$2 [L]',
'^/assets/js/p5\\.(dom|sound)(\\.min)?\\.js(.*) /lib/addons/p5.$1$2.js$3 [L]'
]),
function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', '*');
return next();
}
);
return middlewares;
}
}
},
dev: {
path: 'http://127.0.0.1:9001/test/'
test: {
options: {
directory: {
path: './',
options: {
icons: true
}
},
port: 9001,
open: 'http://127.0.0.1:9001/test/',
keepalive: keepalive,
middleware: function(connect, options, middlewares) {
middlewares.unshift(
require('connect-modrewrite')([
'^/assets/js/p5(\\.min)?\\.js(.*) /lib/p5$1.js$2 [L]',
'^/assets/js/p5\\.(dom|sound)(\\.min)?\\.js(.*) /lib/addons/p5.$1$2.js$3 [L]'
]),
function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', '*');
return next();
}
);
return middlewares;
}
}
}
},
'saucelabs-mocha': {
Expand Down Expand Up @@ -411,7 +457,6 @@ module.exports = function(grunt) {
// Load the external libraries used.
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-watch');
Expand Down Expand Up @@ -440,7 +485,7 @@ module.exports = function(grunt) {
'lint-no-fix',
//'yuidoc:prod', // already done by lint-no-fix
'build',
'connect',
'connect:server',
'mochaChrome',
'mochaTest'
]);
Expand All @@ -449,18 +494,17 @@ module.exports = function(grunt) {
grunt.registerTask('yui:test', [
'yuidoc:prod',
'clean:reference',
'connect',
'connect:yui',
'mochaChrome:yui'
]);
grunt.registerTask('yui:dev', [
'yui:prod',
'clean:reference',
'build',
'connect',
'open:yui',
'connect:yui',
'watch:yui'
]);
grunt.registerTask('yui:build', ['yui']);
grunt.registerTask('default', ['test']);
grunt.registerTask('saucetest', ['connect', 'saucelabs-mocha']);
grunt.registerTask('saucetest', ['connect:server', 'saucelabs-mocha']);
};
15 changes: 0 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"grunt-minjson": "^0.4.0",
"grunt-mocha-test": "^0.13.3",
"grunt-newer": "^1.1.0",
"grunt-open": "^0.2.3",
"grunt-release-it": "^1.0.1",
"grunt-saucelabs": "^9.0.0",
"html2plaintext": "^1.1.1",
Expand Down

0 comments on commit e214115

Please sign in to comment.