Skip to content

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

Merged
merged 1 commit into from
Jun 25, 2015

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Jun 23, 2015

Fixes #578

@Fatme Fatme added this to the 1.1.2 milestone Jun 23, 2015
@ns-bot
Copy link

ns-bot commented Jun 23, 2015

constructor(private $fs: IFileSystem,
private $platformsData: IPlatformsData) { }

public processPlatformSpecificFiles(directoryPath: string, platform: string, excludedDirs?: string[]) {
Copy link
Contributor

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

@Fatme Fatme added the bug label Jun 24, 2015
_.each(contents, fileName => {
let filePath = path.join(directoryPath, fileName);
let fsStat = this.$fs.getFsStats(filePath).wait();
if(fsStat.isDirectory() && (!excludedDirs || (excludedDirs && !_.contains(excludedDirs, fileName)))) {
Copy link
Contributor

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

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 0892dde to 795485f Compare June 24, 2015 09:57
@ns-bot
Copy link

ns-bot commented Jun 24, 2015

import path = require("path");
import util = require("util");

export class ProjectFilesManager implements IProjectFilesManager {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add unit tests.

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 795485f to 013069b Compare June 25, 2015 08:01
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 013069b to bc2b332 Compare June 25, 2015 09:55
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from bc2b332 to 3e1fce3 Compare June 25, 2015 10:03
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 3e1fce3 to 3991ca8 Compare June 25, 2015 10:05
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 3991ca8 to 34cf06c Compare June 25, 2015 11:18
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@rosen-vladimirov
Copy link
Contributor

👍 after green build

@Fatme Fatme force-pushed the fatme/handle-platform-specific-files-from-plugin branch from 34cf06c to 3536e66 Compare June 25, 2015 11:44
@ns-bot
Copy link

ns-bot commented Jun 25, 2015

@teobugslayer
Copy link
Contributor

👍

Fatme pushed a commit that referenced this pull request Jun 25, 2015
…fic-files-from-plugin

Handle platform specific files in plugin
@Fatme Fatme merged commit 4b8342a into release Jun 25, 2015
@Fatme Fatme deleted the fatme/handle-platform-specific-files-from-plugin branch June 25, 2015 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants