Skip to content

Commit

Permalink
check for "offline" flag #5
Browse files Browse the repository at this point in the history
  • Loading branch information
alykat committed Sep 14, 2021
1 parent b8313f7 commit 8997df5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ module.exports = function(grunt) {

var middleware = function(connect, options, ware) {
ware.unshift(caseSensitive);
ware.unshift(redirectMissingData);
if (!grunt.option("offline")) {
ware.unshift(redirectMissingData);
}
return ware;
};

grunt.config.merge({
connect: {
dev: {
Expand Down

1 comment on commit 8997df5

@ruthwtalbot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and this looks good to me! You can one-line the if statement but that's a nit.

For context, looks like this was added in the primaries rig.

Do wonder if there are other cases/flags we'd want to disable it? It's useful but do worry it makes it easier to miss times where the files fail to generate locally.

Please sign in to comment.