-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(init): install coffee-script automatically #1164
Conversation
@@ -255,12 +255,17 @@ exports.init = function(config) { | |||
sm.process(questions, function(answers) { | |||
var cwd = process.cwd(); | |||
var configFile = config.configFile || 'karma.conf.js'; | |||
var testMainFile = (/\.coffee$/).test(configFile) ? 'test-main.coffee' : 'test-main.js'; | |||
var isCoffee = (/\.coffee/).test(configFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you remove $
from RegExp?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @maksimr. I put it back
LGTM |
@@ -255,12 +255,17 @@ exports.init = function(config) { | |||
sm.process(questions, function(answers) { | |||
var cwd = process.cwd(); | |||
var configFile = config.configFile || 'karma.conf.js'; | |||
var testMainFile = (/\.coffee$/).test(configFile) ? 'test-main.coffee' : 'test-main.js'; | |||
var isCoffee = (/\.coffee$/).test(configFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, have you gave a look to path.extname?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool! Haven't heard about this one before.
I'm going to update this PR later today.
Thanks, @aymericbeaumet
if the user initialize Karma passing a .coffee file we'll install coffee-script and put it as a dev-dependency Closes karma-runner#1152
LGTM |
feat(init): install coffee-script automatically
if the user initialize Karma passing a .coffee file we'll install
coffee-script and put it as a dev-dependency
Closes #1152