-
-
Notifications
You must be signed in to change notification settings - Fork 199
Fix index.js generation for culture neutral codes #248
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
Fix index.js generation for culture neutral codes #248
Conversation
can you point me the lint rule? because to me you're fix looks a bit strange as both forms are equivalent. |
I think it is something like this rule here but I'm not at my work PC to check it
http://stackoverflow.com/questions/13271116/why-does-jslint-prefer-dot-notation-over-square-bracket
|
I would disable the lint rule 😄 |
@BenjaminVanRyseghem I've disabled the rule |
Gruntfile.js
Outdated
@@ -152,7 +152,8 @@ module.exports = function(grunt) { | |||
return 'exports[\'' + file.replace('.js', '') + '\'] = require(\'./' + file + '\');'; | |||
}).join('\n'); | |||
|
|||
fs.writeFileSync(dir + '/index.js', langFiles); | |||
fs.writeFileSync(dir + '/index.js', '/* jshint sub: true */' + require('os').EOL); |
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.
can you use \n
instead of require('os').EOL
to be consistent with the rest of the file?
Without this rule, it will fail at build time if the languages include any language neutral culture codes e.g. "es"
@BenjaminVanRyseghem done |
in numbro 1.11.0 |
E.g., for culture code 'nn', it will put
exports.nn = require('./nn.js')j;
into the index.js. Without this change, it fails at build time due to a lint rule