Skip to content

Fix index.js generation for culture neutral codes#248

Merged
BenjaminVanRyseghem merged 1 commit into
BenjaminVanRyseghem:developfrom
gwynjudd:index
Mar 29, 2017
Merged

Fix index.js generation for culture neutral codes#248
BenjaminVanRyseghem merged 1 commit into
BenjaminVanRyseghem:developfrom
gwynjudd:index

Conversation

@gwynjudd
Copy link
Copy Markdown

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

@BenjaminVanRyseghem
Copy link
Copy Markdown
Owner

can you point me the lint rule?

because to me you're fix looks a bit strange as both forms are equivalent.
Maybe we should fix the lint rule instead?

This was referenced Mar 27, 2017
@gwynjudd
Copy link
Copy Markdown
Author

gwynjudd commented Mar 27, 2017 via email

@BenjaminVanRyseghem
Copy link
Copy Markdown
Owner

I would disable the lint rule 😄

@gwynjudd
Copy link
Copy Markdown
Author

@BenjaminVanRyseghem I've disabled the rule

Comment thread Gruntfile.js Outdated
}).join('\n');

fs.writeFileSync(dir + '/index.js', langFiles);
fs.writeFileSync(dir + '/index.js', '/* jshint sub: true */' + require('os').EOL);
Copy link
Copy Markdown
Owner

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"
@gwynjudd
Copy link
Copy Markdown
Author

@BenjaminVanRyseghem done

@BenjaminVanRyseghem BenjaminVanRyseghem merged commit 99e9e0f into BenjaminVanRyseghem:develop Mar 29, 2017
@gwynjudd gwynjudd deleted the index branch March 29, 2017 20:35
@BenjaminVanRyseghem
Copy link
Copy Markdown
Owner

in numbro 1.11.0

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

Successfully merging this pull request may close these issues.

2 participants