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

Adapt build scripts to both linux and windows based dev environment #1726

Closed
4 tasks done
slafayIGN opened this issue Jun 7, 2022 · 4 comments
Closed
4 tasks done
Assignees

Comments

@slafayIGN
Copy link
Contributor

slafayIGN commented Jun 7, 2022

There are issues in transform-less.js and webpack.browser.config.js that cause errors on build in windows environment.

The directory separator seems involved and it may be solved with the use of the path module when working with directories instead of string concatenation.

I will make a pull request.


Tasks:

  • npm run build-dist
  • npm run build-browser
  • npm run build-styleguide
  • npm run test
@jansule
Copy link
Contributor

jansule commented Jun 8, 2022

Is this issue solved?

@slafayIGN
Copy link
Contributor Author

Not completely, there is still an issue with the build-styleguide command which seems environment related.

Module parse failed: Unexpected token (63:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| // i18n
> export interface CodeEditorLocale {
|   downloadButtonLabel: string;
|   formatSelectLabel: string;

I didn't figure out what could be the cause in styleguide.config.js, but didn't spent much time on it yet.

@slafayIGN
Copy link
Contributor Author

npm run test doesn't find any test in the code.

I expected it to be a slash-backslash issue on windows but it seems it's not.

I managed to make things work with a single change in jest.config.js :

   testMatch: [
     "<rootDir>/src/**/__tests__/**/*.(j|t)s?(x)",
-    "<rootDir>/src/**/?(*.)(spec|test).(j|t)s?(x)"
+    "<rootDir>/src/**/*(*.)(spec|test).(j|t)s?(x)"
   ],

It finds 90 test suites and 381 tests.

I'm not sure I understand why ?(*.) doesn't work and why *(*.) is ok. Both are valid patterns : https://github.com/micromatch/micromatch#extglobs

Would this change be ok on other environments ?

KaiVolland added a commit that referenced this issue Jun 9, 2022
makes styleguidist config work on windows (refs #1726)
@jansule
Copy link
Contributor

jansule commented Jun 9, 2022

Would this change be ok on other environments ?

Yes, this would be ok for me

@jansule jansule closed this as completed in 2511e3c Jun 9, 2022
jansule added a commit that referenced this issue Jun 9, 2022
change testMatch expression (closes #1726)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants