ember-welcome-page
Advanced tools
Comparing version 0.5.0 to 0.6.0
20
index.js
@@ -17,6 +17,4 @@ /* jshint node: true */ | ||
var jsExt = this.app.registry.extensionsForType('js'); | ||
var templateExt = this.app.registry.extensionsForType('template'); | ||
this.shouldOverrideIndex = this.shouldOverride(jsExt, templateExt, this.app.project.root); | ||
this.jsExt = this.app.registry.extensionsForType('js'); | ||
this.templateExt = this.app.registry.extensionsForType('template'); | ||
}, | ||
@@ -29,2 +27,3 @@ | ||
this.ui.writeInfoLine("\nJust getting started with Ember? Please visit http://localhost:" + options.port + "/ember-getting-started to get going\n"); | ||
var _this = this; | ||
@@ -46,6 +45,5 @@ app.get('/ember-getting-started-image.png', function (req, res, next) { | ||
// we'll add another setup here to hijack / | ||
// and control everything using our tests | ||
if (this.shouldOverrideIndex) { | ||
app.get('/', function(req, res, next) { | ||
// we'll assume we're running '/' but then bail if we aren't supposed to be overriding | ||
app.get('/', function(req, res, next) { | ||
if (_this.shouldOverride(_this.jsExt, _this.templateExt, _this.app.project.root)) { | ||
res.sendFile(__dirname + '/vendor/welcome.html', options, function (err) { | ||
@@ -56,4 +54,6 @@ if (err) { | ||
}); | ||
}); | ||
} | ||
} else { | ||
next(); | ||
} | ||
}); | ||
}, | ||
@@ -60,0 +60,0 @@ |
{ | ||
"name": "ember-welcome-page", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Welcome page for Ember-CLI", | ||
@@ -5,0 +5,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199
120107