Skip to content

Commit 94025c2

Browse files
committed
Fix PR comments
1 parent f84b615 commit 94025c2

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

src/lib/before-prepare.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ module.exports = function ($logger, $projectData, $usbLiveSyncService) {
88
return;
99
}
1010

11-
return converter.convert($logger, $projectData.projectDir, $projectData.appDirectoryPath);
11+
return converter.convert($logger, $projectData.projectDir, $projectData.appDirectoryPath, $projectData.appResourcesDirectoryPath);
1212
}

src/lib/compiler.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function compile(data) {
2222
if (fs.existsSync(sassPath)) {
2323
logger.info("Found peer node-sass");
2424
} else {
25-
throw new Error('node-sass installation local to project was not found. Install by executing `npm install node-sass`.');
25+
isResolved = true;
26+
rej(new Error('node-sass installation local to project was not found. Install by executing `npm install node-sass`.'));
2627
}
2728

2829
var isResolved = false;

src/lib/converter.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ var path = require('path');
77

88
var watcherProcess = null;
99

10-
function convert(logger, projectDir, appDir, options) {
10+
function convert(logger, projectDir, appDir, appResourcesDir, options) {
1111
options = options || {};
1212
var data = {
1313
projectDir,
1414
appDir,
15+
appResourcesDir,
1516
logger
1617
};
1718

@@ -28,7 +29,7 @@ function createWatcher(data) {
2829
return;
2930
}
3031

31-
watcherProcess = spawn(process.execPath, [ path.join(__dirname, "./watcher.js"), JSON.stringify({appDir: data.appDir, projectDir: data.projectDir })], { stdio: ["ignore", "ignore", "ignore", "ipc"] });
32+
watcherProcess = spawn(process.execPath, [ path.join(__dirname, "./watcher.js"), JSON.stringify({appDir: data.appDir, appResourcesDir: data.appResourcesDir, projectDir: data.projectDir })], { stdio: ["ignore", "ignore", "ignore", "ipc"] });
3233

3334
watcherProcess.on('error', error => {
3435
throw new Error(error);

src/lib/log-provider.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ module.exports = function(logger) {
2020
return logger[data.logLevel](data.message);
2121
}
2222

23-
process.send(JSON.stringify(data));
23+
process.send(data);
2424
}
2525
}

src/lib/watch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ module.exports = function (logger, projectData, usbLiveSyncService, hookArgs) {
99
}
1010
}
1111

12-
return converter.convert(logger, projectData.projectDir, projectData.appDirectoryPath, { watch: true });
12+
return converter.convert(logger, projectData.projectDir, projectData.appDirectoryPath, projectData.appResourcesDirectoryPath, { watch: true });
1313
}

src/lib/watcher.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var LogProvider = require('./log-provider');
66
var args = JSON.parse(process.argv[2]);
77
var appDir = args.appDir;
88
var projectDir = args.projectDir;
9+
var appResourcesDir = args.appResourcesDir;
910
var watchPromisesChain = Promise.resolve();
1011

1112
var watcherOptions = {
@@ -15,7 +16,7 @@ var watcherOptions = {
1516
pollInterval: 100,
1617
stabilityThreshold: 300
1718
},
18-
ignored: ['**/.*', '.*', path.join(appDir, "App_Resources")] // hidden files and App_Resources folder
19+
ignored: ['**/.*', '.*', appResourcesDir] // hidden files and App_Resources folder
1920
};
2021

2122
watcher = choki.watch('**/*.s[ac]ss', watcherOptions)

0 commit comments

Comments
 (0)