-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Supporting env var assignments on Windows #316
Conversation
Can we ignore the failed coverage test? You can't write coverage to the best of my knowledge. |
"release:major": "ta-script npm/release.sh major", | ||
"release:minor": "ta-script npm/release.sh minor", | ||
"release:patch": "ta-script npm/release.sh patch", | ||
"start": "npm run docs", | ||
"start:local-modules": "npm run docs -- --local-modules", | ||
"pretest": "gulp dll", | ||
"test": "NODE_ENV=test babel-node $(npm bin)/karma start build/karma.conf.babel.js", | ||
"test": "cross-env NODE_ENV=test babel-node node_modules/karma start build/karma.conf.babel.js", |
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.
This should be node_modules/.bin/karma
.
Details:
When you npm install
packages that come with executables, they are placed in node_modules/.bin
. You can get the absolute path to the npm bin with the command npm bin
. NPM also adds this directory to your $PATH
when you npm run ...
scripts. This way you can execute scripts that you have installed. The $(npm bin)
syntax is command substitution. It places the output of that command inline in another command. So, we were placing the absolute path to the npm bin directory just before /karma
.
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.
Thank you for explaining that to me. I learned something new!
Thanks for the PR. Please reference the related issue in the description in order to close the issue when the PR is merged. Coverage will not fail for this PR. Coverage is calculated by lines of code covered by tests. Since this PR touches no code, the coverage will not be affected. CircleCI seems to have blown up for some random reason. It should run on the next commit. |
@joshuazmiller it looks like tests are failing because they are never running in the first place. Pretty sure this is due to the karma path issue I noted here https://github.com/TechnologyAdvice/stardust/pull/316#discussion_r68971089 |
Also added node_module/.bin/karma
Current coverage is 88.30%@@ master #316 diff @@
==========================================
Files 62 62
Lines 821 821
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 725 725
Misses 96 96
Partials 0 0
|
It doesn't seem I have permission to manually close #313 , however I added it to my description and perhaps it will work now. I'll keep in mind to mark those in for future pull-requests. When I run test with the .bin I get the following error:
I haven't written bash scripts in years, and I pretty much can't make sense of the file to understand what's wrong. |
Ah, yes. The karma script that is running is not compatible with Windows. You would likely need to run the "karma.cmd" version instead. We can't hard code the test script to that or it won't work on Unix machines. We'll need to figure out how to support Windows here. Any help appreciated as I so not have a Windows machine available. I will do some digging on this though. |
Indeed, even if you did have permissions the best practice is to leave the issue open until the fix is merged. The description you have in this PR should take care of it! |
@joshuazmiller I just merged #320 which removes Please update this PR with the latest master and set the
Let's see if tests then pass, and also if it runs locally for you. |
Unfortunately, I still get errors after the merge and adding that line:
|
I see in your error output you are running: npm ERR! node v4.4.7
npm ERR! npm v3.10.2 This project requires Node 6. I just added a note about this in the contributing guide last night. Please install Node 6 and give it another go. Thanks for hanging in there through all this! I think we're close to a solution. |
@joshuazmiller did updating Node help at all? |
It works now! Thanks! |
Awesome! 😸 Very glad we finally got it. Just one last tweak and we can merge this PR. It looks like the package description got set wrong (probably after a conflict fix). It should be: "description": "The official Semantic-UI-React integration." Once that is updated, we can get this PR in. Thank you very much for hanging in there. |
This should do it. Thank you. I am going to get back to the List Item and Item API as soon as I can |
* Supporting env var assignments on Windows * fix: change package.json to have cross-env * fix: correct the description
Trying to resolve #313