-
-
Notifications
You must be signed in to change notification settings - Fork 197
Handle platform specific files in plugin #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle platform specific files in plugin #588
Conversation
✅ |
constructor(private $fs: IFileSystem, | ||
private $platformsData: IPlatformsData) { } | ||
|
||
public processPlatformSpecificFiles(directoryPath: string, platform: string, excludedDirs?: string[]) { |
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.
please declare function return type
_.each(contents, fileName => { | ||
let filePath = path.join(directoryPath, fileName); | ||
let fsStat = this.$fs.getFsStats(filePath).wait(); | ||
if(fsStat.isDirectory() && (!excludedDirs || (excludedDirs && !_.contains(excludedDirs, fileName)))) { |
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.
you do not need the !excludeDirs check - contains returns false if the first parameter is null/undefined:
> l.contains(undefined, "test")
false
> l.contains(null, "test")
false
0892dde
to
795485f
Compare
✅ |
import path = require("path"); | ||
import util = require("util"); | ||
|
||
export class ProjectFilesManager implements IProjectFilesManager { |
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.
Please add unit tests
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.
I add unit tests.
795485f
to
013069b
Compare
✅ |
013069b
to
bc2b332
Compare
✅ |
bc2b332
to
3e1fce3
Compare
✅ |
3e1fce3
to
3991ca8
Compare
✅ |
3991ca8
to
34cf06c
Compare
✅ |
👍 after green build |
34cf06c
to
3536e66
Compare
✅ |
👍 |
…fic-files-from-plugin Handle platform specific files in plugin
Fixes #578