Skip to content

Commit 4792a02

Browse files
GeoffreyBoothGuillaume Chau
authored andcommitted
Pass *all* CoffeeScript compiler output through Babel, not just when backticks are present; this allows support for CoffeeScript opt-in ES2015 features like modules and generators (#155)
1 parent 41661e1 commit 4792a02

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/vue-coffee/package.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'akryum:vue-coffee',
3-
version: '0.0.3',
3+
version: '0.0.4',
44
summary: 'Add coffee support for vue components',
55
git: 'https://github.com/Akryum/meteor-vue-component',
66
documentation: 'README.md'
@@ -15,7 +15,7 @@ Package.registerBuildPlugin({
1515
'vue-coffee.js'
1616
],
1717
npmDependencies: {
18-
'coffee-script': '1.12.1',
18+
'coffee-script': '1.12.4',
1919
'source-map': '0.5.6'
2020
}
2121
});

packages/vue-coffee/vue-coffee.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ global.vue.lang.coffee = Meteor.wrapAsync(function({
3333

3434
let output = coffee.compile(source, compileOptions);
3535

36-
if (source.indexOf('`') !== -1) {
37-
// If source contains backticks, pass the coffee output through ecmascript
38-
try {
39-
output.js = ECMAScript.compileForShell(output.js);
40-
} catch (e) {}
41-
}
36+
try {
37+
output.js = ECMAScript.compileForShell(output.js);
38+
} catch (e) {}
4239

4340
const stripped = stripExportedVars(
4441
output.js,

0 commit comments

Comments
 (0)