Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
Fixed rootDir for when publishing a package
Browse files Browse the repository at this point in the history
  • Loading branch information
stevezhu committed Dec 18, 2014
1 parent 5825700 commit 75b261c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .npm/plugin/compileSass/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Package.registerBuildPlugin({
Package.onTest(function(api) {
api.use(['test-helpers', 'tinytest']);
api.use(['ui', 'templating']);
api.use('stevezhu:sass');
api.use('stevezhu:sass@1.3.6');
api.addFiles('tests/sass_include_paths.json', 'server');
api.addFiles([
'tests/test.scss',
Expand Down
10 changes: 9 additions & 1 deletion plugin/compile-sass-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ CompileSassUtils = {
return compileStep.isTestingPackage;
},
updateCompileStepPaths: function(compileStep) {
compileStep.rootDir = this.isTestPackages ? path.join(process.cwd(), args[1]) : files.findAppDir();
compileStep.rootDir = (function() {
if (this.isTestPackages) {
return path.join(process.cwd(), args[1]);
}
if (this.isPublishPackage) {
return files.findPackageDir(process.cwd());
}
return files.findAppDir();
}).call(this);

if (this.isInPackage(compileStep)) {
compileStep.packageDir = files.findPackageDir(compileStep._fullInputPath);
Expand Down

0 comments on commit 75b261c

Please sign in to comment.