Skip to content

Package: Include structure CSS in themes zip#300

Closed
scottgonzalez wants to merge 2 commits intojquery:masterfrom
scottgonzalez:theme-zip
Closed

Package: Include structure CSS in themes zip#300
scottgonzalez wants to merge 2 commits intojquery:masterfrom
scottgonzalez:theme-zip

Conversation

@scottgonzalez
Copy link
Member

Changes the 1.12 themes packager to be built on top of the 1.12 packager.

Fixes gh-298

Changes the 1.12 themes packager to be built on top of the 1.12 packager.

Fixes jquerygh-298
}

extend( Package.prototype, Package1_12.prototype );
// Copy some properties from the Package1_12's prototype
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment why "inheritance" doesn't work?

@jzaefferer
Copy link
Member

👍

} )
).forEach( function( prop ) {
Package.prototype[ prop ] = Package1_12.prototype[ prop ];
});
Copy link
Member

Choose a reason for hiding this comment

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

How big would it be to explicitly list all the properties? Explicit code is easier to understand and maintain... Something like:

extend( Package.prototype, {
    "AUTHORS.txt": Package1_12[ "AUTHORS.txt" ],
    ...
    "themes": function( callback ) {

Copy link
Member Author

Choose a reason for hiding this comment

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

It wouldn't be hard, but it would be more error prone. This says to copy all CSS files, regardless of which files may exist.

Copy link
Member

Choose a reason for hiding this comment

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

There's something in the current code that I believe could be simpler to look and understand at a glance. Perhaps extending the Package in one step for the css ones, and then:

extend( Package.prototype, {
    "AUTHORS.txt": Package1_12[ "AUTHORS.txt" ],
    "LICENSE.txt": Package1_12[ "LICENSE.txt" ],
    "images": Package1_12[ "images" ],
    "themes": function( callback ) {
    ...

Feel free to completely ignore this whole comment though. :)

It's up to you.

@scottgonzalez
Copy link
Member Author

Updated based on @rxaviers comment.

@rxaviers
Copy link
Member

👍

@jzaefferer
Copy link
Member

Works for me

@scottgonzalez scottgonzalez deleted the theme-zip branch May 16, 2016 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants