-
Notifications
You must be signed in to change notification settings - Fork 2k
fix#4805: in single and double quotes #4809
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
Conversation
package.json
Outdated
@@ -28,7 +28,7 @@ | |||
"repl.js" | |||
], | |||
"scripts": { | |||
"postinstall": "node --eval 'if (require(\"./package.json\").name === \"coffee-script\") { var red, yellow, cyan, reset; red = yellow = cyan = reset = \"\"; if (!process.env.NODE_DISABLE_COLORS) { red = \"\\x1b[31m\"; yellow = \"\\x1b[33m\"; cyan = \"\\x1b[36m\"; reset = \"\\x1b[0m\"; } console.warn(red + \"CoffeeScript has moved!\" + reset + \" Please update references to \" + yellow + \"\\\"coffee-script\\\"\" + reset + \" to use \" + yellow + \"\\\"coffeescript\\\"\" + reset + \" (no hyphen) instead.\"); console.warn(\"Also, a new major version has been released under the \" + yellow + \"coffeescript\" + reset + \" name on NPM. This new release targets modern JavaScript, with minimal breaking changes. Learn more at \" + cyan + \"http://coffeescript.org\" + reset + \".\"); console.warn(\"\"); }'", | |||
"postinstall": "node --eval \"if (require('./package.json').name === 'coffee-script') { var red, yellow, cyan, reset; red = yellow = cyan = reset = ''; if (!process.env.NODE_DISABLE_COLORS) { red = '\\x1b[31m'; yellow = '\\x1b[33m'; cyan = '\\x1b[36m'; reset = '\\x1b[0m'; } console.warn(red + 'CoffeeScript has moved!' + reset + ' Please update references to ' + yellow + '\\\"coffee-script\\\"' + reset + ' to use ' + yellow + '\\\"coffeescript\\\"' + reset + ' (no hyphen) instead.'); console.warn('Also, a new major version has been released under the ' + yellow + 'coffeescript' + reset + ' name on NPM. This new release targets modern JavaScript, with minimal breaking changes. Learn more at ' + cyan + 'http://coffeescript.org' + reset + '.'); console.warn(''); }\"", |
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.
have you tried \\\"coffee-script\\\"
and confirm it works on both platforms?
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.
@hajjem-ayoub Does it works on your local with this fix?
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.
yes tried it only with windows VM, i can also check on mac
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.
On mine doesn't work. (Windows 10)
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.
i also tried to npm link it in mac and it seems to work as well, it shows the message correctly at least
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.
@rossanmol just to debug it, can you tell me how did you test it?
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.
run node --eval
in cmd, might be that it works only with npm postinstall
What about this solution:
|
@rossanmol people using 1.x not all have access to ES6+ features. That's kinda the point of the 1.x branch. |
@rossanmol you cannot use ` you can only use ' or " because es6 not everywhere, but i will try to look for windows 10 to check, but can you tell me how you tested?? |
@hajjem-ayoub run the following in cmd:
I didn't try linking it. |
@rossanmol yes but than you don't have process.env.NODE_DISABLE_COLORS |
@hajjem-ayoub it fails because of the if statement, same as before. |
just pushing one like that now :D |
@rossanmol and for coloring i used chalk |
@hajjem-ayoub if anything, you missed a git add. |
74adbcf
to
08d60a0
Compare
@vendethiel sorry for that, i amended my commit and push forced again |
1f1477b
to
2f8bb86
Compare
2f8bb86
to
c6dba19
Compare
@vendethiel done with this and it looks like working fine, i just had to add chalk to dependancies if that's ok |
I don't think coloring is important enough to warrant adding a dep. |
Yes, we don’t have dependencies. I think #4807 is closer to what we need to do. |
fix for #4805