Skip to content
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

add colorset support #32

Merged
merged 4 commits into from
Feb 17, 2018
Merged

Conversation

griffin-stewie
Copy link
Contributor

@griffin-stewie griffin-stewie commented Feb 13, 2018

Xcode supports Named Color feature on Asset Catalog recently. I added export format for this for all iOS developers.

colorset are bunch of JSON inside XXXXX.colorset directories. I use EXPORT_TYPE_FILES to give users to chose destination directory for it.

About colorset

name = colorDictionary.name.toLowerCase().trim().split(" ").join("_")
fileName = "#{name}.colorset"
colorsetURL = url.URLByAppendingPathComponent(fileName)
manager.createDirectoryAtPath_withIntermediateDirectories_attributes_error(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds maximum allowed length. Length is 81, max is 80.


class ColorSetFormatter extends FormatterBase
# Asset Catalog Format Reference: Named Color Type https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/Named_Color.html
# Asset catalog colors on Xcode 9 – Zeplin Gazette https://blog.zeplin.io/asset-catalog-colors-on-xcode-9-c4fdccc0381a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds maximum allowed length. Length is 120, max is 80.

@@ -0,0 +1,59 @@

class ColorSetFormatter extends FormatterBase
# Asset Catalog Format Reference: Named Color Type https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/Named_Color.html

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds maximum allowed length. Length is 174, max is 80.


ColorSetFormatter.prototype.colorComponents = function(colorDictionary) {
var obj;
return obj = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to return a conditional instead of an assignment?

"color-space": "display-p3",
components: this.colorComponents(colorDictionary)
};
return obj = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to return a conditional instead of an assignment?

ColorSetFormatter.prototype.contentsJSON = function(colorDictionary) {
var c, obj;
c = this.colorObject(colorDictionary);
return obj = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to return a conditional instead of an assignment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@houndci-bot @Adrxx
This JavaScript file is generated by coffee command, so IMO I think we developers don't need to have responsibility for it.

@griffin-stewie
Copy link
Contributor Author

griffin-stewie commented Feb 14, 2018

@Adrxx @lalomrtnz
I was wondering that these reviews by houndci-bot is not so much meaningful, because reacently We have powerful text editor and large screen and We need to call methods that come from Cocoa, those method signatures are quite long.
Same situation #33

@Adrxx
Copy link
Collaborator

Adrxx commented Feb 17, 2018

@griffin-stewie You're right, those comments are just annoying, I have removed the integration...

@Adrxx Adrxx merged commit d43192f into ment-mx:master Feb 17, 2018
@griffin-stewie
Copy link
Contributor Author

Thank you for merging my PR.

@griffin-stewie griffin-stewie deleted the feat/add_colorset_support branch February 18, 2018 08:11
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.

3 participants