Skip to content
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

Bug: Windows generact #15

Open
Geczy opened this issue Sep 14, 2017 · 7 comments
Open

Bug: Windows generact #15

Geczy opened this issue Sep 14, 2017 · 7 comments
Labels

Comments

@Geczy
Copy link

Geczy commented Sep 14, 2017

image

This shouldn't be happening. It works perfect in a unix environment but not my windows 10

@diegohaz diegohaz added the bug label Sep 14, 2017
@diegohaz
Copy link
Owner

This seems to be a problem with this function: https://github.com/diegohaz/generact/blob/master/src/utils.js#L11-L20

I don't have a Windows machine to test it. Could you try to change it?

@Geczy
Copy link
Author

Geczy commented Sep 14, 2017

Parallels? Windows 10 vm's are free https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

@Shhzdmrz
Copy link

still not working on Windows 10 even not the extension of vs code.

@diegohaz
Copy link
Owner

Hi, guys. I'd appreciate very much if some Windows user could take this.

The problem seems to be with this function:

generact/src/utils.js

Lines 12 to 21 in 638f952

export const getComponentName = (path: string): string => (
path.split('/').reduce((name, part) => {
if (/^[A-Z]/.test(part)) {
return removeExt(part)
} else if (/^((?!index).+)\.[^.]+$/.test(part)) {
return upperFirst(camelCase(removeExt(part)))
}
return name
}, '')
)

@Shhzdmrz
Copy link

I am willing to contribute please guide me how to setup the basic environment and how to test it.

@diegohaz
Copy link
Owner

Sure, @Shhzdmrz.

  1. Fork the repo and clone it in your local machine (git clone https://github.com/Shhzdmrz/generact);
  2. Change to the directory: cd generact;
  3. Install dependencies with yarn or npm install;
  4. Run tests with yarn test or npm test (if you're on Windows, some should fail);
  5. Keep tests running with yarn test --watch or npm test -- --watch;
  6. Update the code in src trying to make tests to pass.

Just make sure to run yarn lint before creating the PR.

@Shhzdmrz
Copy link

@diegohaz please check my forked branch with the comments I added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants