-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improved error messages for registerTemplate * updated error message * Introduce option to control the generation of the "Do not edit" header (#132) * stage #1 - formats.js * stage #2 - templates * reset changes to template + simplified changes to formats (now the “options” object is assigned to the “file” element) * fixed wrong parameter passed to fileHeader function * updated documentation * updates after PR comments * removing the confusing static-style-guide stuff (#157) * Fixes #72 * handle no command and invalid commands with friendly console output (#156) * Add json5 support (#165) * Removing unnecessary backticks (#172) * Merge Jest Branch (#169) * Jest testing (#133) * moved all the existing tests to Jest * finalised Jest tests for “utils” removing assert dependency * finalised Jest tests for “register” removing assert dependency + moved tests under correct folder * finalised Jest tests for “transform” removing assert dependency + moved tests under correct folder + removed extra file * updated path for “service” files/folders * removed output folder * updated the paths to ignore in the Jest config in package.json * finalised Jest tests for “clean” removing assert dependency + other small changes * added “__output” to the list of folders ignored by Jest * some tunings + more tests * more tests cleanup * fixed test for exportPlatform * fixed last tests, and now all tests are green! * Added first snapshot tests! Yay! * added mock for dates to avoid failing snapshots tests * updated tests * first attempt to fix the UTC date problem on CI (reference: boblauer/MockDate#9) * second attempt to fix the UTC date problem on CI * removed the TZ=UTC env environment to test if is really needed * updated all the occurrences of new Date in the templates * restored linting before running the tests suite * code style fix * fixed wrong porting of the test for buildAllPlatforms * test(all): Fix for all tests to match the date and remove of mockdate (#148) inspiration jestjs/jest#2234 * test(javascript/es6): Add test for es6 (#149) * test: add registerTemplate (#147) * add tests for transform object (#151) * add tests for transform object * split up complex test in multiple smaller tests * Jest flatten props (#163) * Adding tests for lib/utils/flattenProperties.js (#146) * Adding tests for lib/utils/flattenProperties.js * update to use lodash sortby function * update to use lodash sortby function * Add babel-jest (#173) * feat(json-nested): Add JSON nested transform (#167) Added JSON nested transform, Added test for it and Documentation update re #139 * Fix errors and improve error messaging (#158) * updated error messaging. Fixes for issues with references. * adding in didoo's test from #118 * cleanup of terminology * fixed resolveObject to correctly replace multiple references. modified testing suite to reflect new test. * updates per comments by didoo and dbanksdesign * case sensitive, oops. * case sensitive, oops. * minor updates based on PR feedback * merging with develop to ensure we stay synched * removing cli error handling and moving to module * removing per dannys comments * making constants for group errors per Dannys comments * switch to error grouping mindset and naming * switch to error grouping mindset and naming * per danny's comment * fix flush to execute across all groups if called with no group; remove flush on uncaught exceptions to prevent confusion * simplify, simplify, simplify * changed out error naming to message mindset, cleaned out console.log, fixed issues with simplified GroupMessages * sepearate circular reference tests into separate expects * avoid using string so we dont get it confused with String * Deprecating templates (#152) * Displaying a warning when using templates in the config or registerTemplate * Moving built-in templates to formats * Porting over a stragler test (#190) * 2.5.0
- Loading branch information
1 parent
41fedba
commit fa6ebeb
Showing
174 changed files
with
9,969 additions
and
7,533 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["env"] | ||
} |
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,4 +1,7 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
}, | ||
"env": { | ||
"node": true, | ||
"mocha": true | ||
|
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
// some comment | ||
source: ['test/properties/**/*.json'], | ||
platforms: { | ||
web: { | ||
transformGroup: 'web', | ||
prefix: 'smop', | ||
buildPath: 'test/output/web/', | ||
files: [ | ||
{ | ||
destination: '_icons.css', | ||
format: 'scss/icons', | ||
}, | ||
{ | ||
destination: '_variables.css', | ||
format: 'scss/variables', | ||
}, | ||
{ | ||
destination: '_styles.js', | ||
format: 'javascript/module', | ||
}, | ||
], | ||
}, | ||
scss: { | ||
transformGroup: 'scss', | ||
prefix: 'smop', | ||
buildPath: 'test/output/scss/', | ||
files: [ | ||
{ | ||
destination: '_icons.scss', | ||
format: 'scss/icons', | ||
}, | ||
{ | ||
destination: '_variables.scss', | ||
format: 'scss/variables', | ||
}, | ||
], | ||
}, | ||
less: { | ||
transformGroup: 'less', | ||
prefix: 'smop', | ||
buildPath: 'test/output/less/', | ||
files: [ | ||
{ | ||
destination: '_icons.less', | ||
format: 'less/icons', | ||
}, | ||
{ | ||
destination: '_variables.less', | ||
format: 'less/variables', | ||
}, | ||
], | ||
}, | ||
android: { | ||
transformGroup: 'android', | ||
buildPath: 'test/output/', | ||
files: [ | ||
{ | ||
destination: 'android/colors.xml', | ||
template: 'android/colors', | ||
}, | ||
{ | ||
destination: 'android/font_dimen.xml', | ||
template: 'android/fontDimens', | ||
}, | ||
{ | ||
destination: 'android/dimens.xml', | ||
template: 'android/dimens', | ||
}, | ||
], | ||
actions: ['android/copyImages'], | ||
}, | ||
ios: { | ||
transformGroup: 'ios', | ||
buildPath: 'test/output/ios/', | ||
files: [ | ||
{ | ||
destination: 'style_dictionary.plist', | ||
template: 'ios/plist', | ||
}, | ||
{ | ||
destination: 'style_dictionary.h', | ||
template: 'ios/macros', | ||
}, | ||
], | ||
}, | ||
}, | ||
} |
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
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
test/json_files/circular.json → __tests__/__json_files/circular.json
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,7 +1,6 @@ | ||
{ | ||
|
||
"a": "{b}", | ||
"b": "{c}", | ||
"c": "{d}", | ||
"d": "{a}" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"a": { | ||
"b": { | ||
"c": "{j}" | ||
} | ||
}, | ||
"j": "{a.b.c}" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"a": { | ||
"b": "{c.d.e}" | ||
}, | ||
"c": { | ||
"d": { | ||
"e": "{a.b}" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"a": { | ||
"b": { | ||
"c": { | ||
"d": "{e.f.g}" | ||
} | ||
} | ||
}, | ||
"e": { | ||
"f": { | ||
"g": "{h.i}" | ||
} | ||
}, | ||
"h": { | ||
"i": "{a.b.c.d}" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"k": "{l}", | ||
"l": "{m}", | ||
"m": "{l}", | ||
"n": "{k}" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"prop1" : { "value": "test1 value" }, | ||
"prop2" : { "value": "test2 value" }, | ||
"prop3" : { "value": "{prop1.value}" }, | ||
"prop4" : { "value": "{prop3.value}" }, | ||
"prop12" : { "value": "{prop1.value}, {prop2.value} and some extra stuff" }, | ||
"prop124" : { "value": "{prop1.value}, {prop2.value} and {prop4.value}" } | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
json5A: 5, | ||
// some comment | ||
d: { | ||
json5e: 1, | ||
}, | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"asset": { | ||
"font": { | ||
"icon": { | ||
"value": "./test/__assets/fonts/scapp_icons-regular.ttf" | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"asset": { | ||
"image": { | ||
"flag": { | ||
"us": { | ||
"mdpi": { | ||
"value": "__tests__/__assets/images/mdpi/flag_us_base.png" | ||
}, | ||
"hdpi": { | ||
"value": "__tests__/__assets/images/hdpi/flag_us_base.png" | ||
}, | ||
"xhdpi": { | ||
"value": "__tests__/__assets/images/xhdpi/flag_us_base.png" | ||
}, | ||
"xxhdpi": { | ||
"value": "__tests__/__assets/images/xxhdpi/flag_us_base.png" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.