Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Commit 08c615a

Browse files
author
Steve Ross
committed
Meteor 1.3+ no longer needs meteorhacks npm
refs #71 @ #71
1 parent c0abf5f commit 08c615a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Diff for: lib/utils.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,20 @@ Utils = {
147147

148148
// Take a path to a SCSS file and compiles it to CSS with `node-sass`.
149149
toCSS: function(scss) {
150-
if (!Package['chrisbutler:node-sass']) {
150+
let sass;
151+
let meteorMinorVersionPosition = 1;
152+
let minorVersion = Meteor.release.split('.')[meteorMinorVersionPosition];
153+
// since meteor 1.3 we no longer need meteor hacks just use the npm version
154+
if (minorVersion >= 3){
155+
sass = require('node-sass');
156+
} else if (!Package['chrisbutler:node-sass']) {
157+
sass = Package['chrisbutler:node-sass'].sass;
158+
} else {
151159
Utils.Logger.warn('Sass support is opt-in since lookback:[email protected]. Please add chrisbutler:node-sass from Atmosphere and try again.', TAG);
152160
return Utils.readFile(scss);
153161
}
154162

155163
const file = path.join(ROOT, scss);
156-
const sass = Package['chrisbutler:node-sass'].sass;
157164

158165
try {
159166
return sass.renderSync({

Diff for: package.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ var where = 'server';
44
Package.describe({
55
name: 'lookback:emails',
66
summary: 'Send HTML emails with server side Blaze templates. Preview and debug in the browser.',
7-
version: '0.7.4',
7+
version: '0.7.5',
88
git: 'https://github.com/lookback/meteor-emails.git'
99
});
1010

1111
Npm.depends({
12-
'html-to-text': '1.3.0'
12+
'html-to-text': '1.3.0',
13+
'node-sass': '3.8.0'
1314
});
1415

1516
Package.onUse(function(api) {

0 commit comments

Comments
 (0)