Skip to content
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

Merged
merged 1 commit into from
Aug 21, 2014

Conversation

cironunes
Copy link
Member

if the user initialize Karma passing a .coffee file we'll install
coffee-script and put it as a dev-dependency

Closes #1152

@@ -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);
Copy link
Contributor

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?)

Copy link
Member Author

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

@maksimr
Copy link
Contributor

maksimr commented Aug 20, 2014

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);
Copy link
Member

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?

Copy link
Member Author

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
@aymericbeaumet
Copy link
Member

LGTM

maksimr added a commit that referenced this pull request Aug 21, 2014
feat(init): install coffee-script automatically
@maksimr maksimr merged commit 1741924 into karma-runner:master Aug 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

karma init should install coffee-script (when generating karma.conf.coffee)
3 participants