This repository was archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Updated for meteor 1.3 / 1.4 closes #71 #72
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c372836
Modulus APP_DIR is not correct use productionPrivateDir() instead
c0abf5f
Merge branch 'master' of git://github.com/lookback/meteor-emails
08c615a
Meteor 1.3+ no longer needs meteorhacks npm
271b324
forgot to bump version in the package to 0.7.5
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ const productionPrivateDir = () => { | |
return fs.realpathSync(meteorRoot + '/../'); | ||
}; | ||
|
||
const privateDir = process.env.BUNDLE_PATH || process.env.APP_DIR || productionPrivateDir(); | ||
const privateDir = process.env.BUNDLE_PATH || productionPrivateDir(); | ||
|
||
let ROOT = privateDir && path.join(privateDir, 'programs', 'server', 'assets', 'app'); | ||
|
||
|
@@ -147,13 +147,20 @@ Utils = { | |
|
||
// Take a path to a SCSS file and compiles it to CSS with `node-sass`. | ||
toCSS: function(scss) { | ||
if (!Package['chrisbutler:node-sass']) { | ||
let sass; | ||
let meteorMinorVersionPosition = 1; | ||
let minorVersion = Meteor.release.split('.')[meteorMinorVersionPosition]; | ||
// since meteor 1.3 we no longer need meteor hacks just use the npm version | ||
if (minorVersion >= 3){ | ||
sass = require('node-sass'); | ||
} else if (!Package['chrisbutler:node-sass']) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dunno... again I'm on meteor 1.4 so if someone can test on a lower version it would be good. All I know is that this is working for us on 1.4. Tried to account for the other versions. BTW also working fine on galaxy. |
||
sass = Package['chrisbutler:node-sass'].sass; | ||
} else { | ||
Utils.Logger.warn('Sass support is opt-in since lookback:[email protected]. Please add chrisbutler:node-sass from Atmosphere and try again.', TAG); | ||
return Utils.readFile(scss); | ||
} | ||
|
||
const file = path.join(ROOT, scss); | ||
const sass = Package['chrisbutler:node-sass'].sass; | ||
|
||
try { | ||
return sass.renderSync({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Npm.require()
?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.
there is no more npm.require... its just require when npm is present.