-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add namespace to configuration, command option and api. This will all…
…ow user to specify the namespace of compiled js file: ex: export default or module.export or window.translations
- Loading branch information
An Nguyen
committed
Aug 28, 2018
1 parent
0144276
commit d0e63b8
Showing
10 changed files
with
140 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`compile should report failed message on error 1`] = `Can't parse message. Please check correct syntax: "{value, plural, one {Book} other {Books"`; | ||
exports[`createCompiledCatalog namespace should compile with cjs by default 1`] = `"/* eslint-disable */module.exports={languageData:{\\"plurals\\":function(n,ord){if(ord)return n==1?\\"one\\":\\"other\\";return n>=0&&n<2?\\"one\\":\\"other\\"}},messages:{}};"`; | ||
exports[`createCompiledCatalog namespace should compile with es 1`] = `"/* eslint-disable */export default{languageData:{\\"plurals\\":function(n,ord){if(ord)return n==1?\\"one\\":\\"other\\";return n>=0&&n<2?\\"one\\":\\"other\\"}},messages:{}};"`; | ||
exports[`createCompiledCatalog namespace should compile with global 1`] = `"/* eslint-disable */global.test={languageData:{\\"plurals\\":function(n,ord){if(ord)return n==1?\\"one\\":\\"other\\";return n>=0&&n<2?\\"one\\":\\"other\\"}},messages:{}};"`; | ||
exports[`createCompiledCatalog namespace should compile with window 1`] = `"/* eslint-disable */window.test={languageData:{\\"plurals\\":function(n,ord){if(ord)return n==1?\\"one\\":\\"other\\";return n>=0&&n<2?\\"one\\":\\"other\\"}},messages:{}};"`; | ||
exports[`createCompiledCatalog namespace should error with invalid value 1`] = `"Invalid namespace param: \\"global\\""`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters