-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add CSON parsing support #224
Conversation
Are there still people using coffeescript?!? Will merge this asap...and publish update |
I don't know about CoffeeScript - I am actually using TypeScript, but for files I mostly use CSON because I like the clean syntax 😄 |
thank you for your contribution - published in i18next-node-fs-backend@1.2.0 |
This commit pretty much killed using this package through webpack. |
@pariz...webpack...on serverside..or used in electron... if having issues i guess we could rollback this....as not a must have feature to have a coffeescript parser...(who uses coffeescript anyways) |
you can use this module in the browser / webpack? Didn't know that. How exactly does it break webpack? We could roll this back I suppose. Generally I thought it should be pretty easy to add a method for extending file format support. So you could just add support by doing e.g.: {
// path where resources get loaded from
loadPath: '/locales/{{lng}}/{{ns}}.json',
// path to post missing resources
addPath: '/locales/{{lng}}/{{ns}}.missing.json',
// jsonIndent to use when storing json files
jsonIndent: 2,
// additional file extension / syntax support
loaders: {
cson: (data: string) => {
return CSON.parse(data);
},
},
} @jamuhl wdyt? |
@lenovouser agree - we have the same on the i18next-xhr-backend it's just called parse there: https://github.com/i18next/i18next-xhr-backend#backend-options |
i18next-node-fs-backend@2.0.0 -> removes cson parser and adds options.parse to set a custom parser hope you both can live with that solution |
Basically JSON for coffeescript.
github.com/bevry/cson