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

npm scripts don't build correctly on windows #226

Open
qfulsher opened this issue Oct 10, 2017 · 4 comments
Open

npm scripts don't build correctly on windows #226

qfulsher opened this issue Oct 10, 2017 · 4 comments
Labels

Comments

@qfulsher
Copy link

The current scripts for the npm run build command use rm and cp which don't exist in cmd.exe. I've been able to make the build work by utilizing shx. I could make a pull request if you guys don't mind taking a dependency on shx.

@jonathanKingston
Copy link
Contributor

I don't really know what that is, can't you use a MINGW based setup like git bash instead?

Is the build script the only thing that is broken?

@qfulsher
Copy link
Author

From what I understand shx just allows you to write cross-platform shell scripts. For example, here's one of the current build scripts:

"createlib": "cd src && rm -rf ext-libs && mkdir ext-libs && npm run movelibcontents",

This script works fine in cmd except for the rm -rf. cmd doesn't understand the rm command so this would fail on a windows machine. Here's the modified version using shx:

"createlib": "cd src && shx rm -rf ext-libs && mkdir ext-libs && npm run movelibcontents",

Installing shx and then using this script will build correctly on both bash and cmd shells. I also think that shx supports more than just windows and bash.

And yes building the unmodified version on MINGW should work just fine. This is just a bit less complicated for a windows user.

@jonathanKingston
Copy link
Contributor

jonathanKingston commented Oct 10, 2017

I use Windows as my default (granted this is a recent change), I wouldn't ever touch cmd where possible. I'm worried this small change will lead to us maintaining a build that very few people will use and will be untested.

I would rather provide windows users a docker setup or guide on using mingw than maintaining another code branch. I'm happy to leave this open for other peoples views though, to see if there is enough interest.

@vanowm
Copy link

vanowm commented Feb 2, 2020

Would be nice if you provided a guide...
P.S.
I really don't understand the point of "building/compiling" a browser extension, while we could simply modify the already "built" source...

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