Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#52377 closed defect (bug) (fixed)

Twenty Twenty-One: Re-add .css.map files

Reported by: poena's profile poena Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 5.7 Priority: normal
Severity: normal Version: 5.6
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Originally mentioned in #52158, the themes .css.map files should be added back and un-ignored in SVN.

This is helpful for developers who work with the Sass files and for troubleshooting.

Attachments (2)

52377.patch (410 bytes) - added by poena 3 years ago.
Remove *.css.map from svn:ignore
52377.diff (863 bytes) - added by peterwilsoncc 3 years ago.

Download all attachments as: .zip

Change History (9)

@poena
3 years ago

Remove *.css.map from svn:ignore

#1 @poena
3 years ago

  • Keywords has-patch added

#2 @peterwilsoncc
3 years ago

There's a good chance I am missing some context but I am a little worried about committing the map file changes.

The map file is formatted as a single line, so each time there is a CSS change is committed the file will essentially need to be recommitted again. As these are fairly large files this could increase the size of the repository substantially:

assets/css/ie-editor.css.map: 24K
assets/css/ie.css.map: 55K
assets/css/print.css.map: 803 bytes
assets/css/style-dark-mode.css.map: 540 bytes
assets/css/style-editor.css.map: 11KB
style.css.map: 23K
Total: 114K

I also have a bias towards committing as few built files as possible, so that colours my view (and can colour your view of my response ;)

Without been built as part of the root directory, I'm also worried they would be missed during commits and end up out of date.

Is it common that bundled theme developers don't use the wordpress-develop repo so are not able to build the map files themselves?

#3 @poena
3 years ago

The bundled themes are used as examples by people who wants to learn how to build themes, in that sense I think it is common that wordpress-develop is not used.

#4 follow-up: @poena
3 years ago

How did committers handle the map files in Twenty Nineteen?
Twenty Twenty One is not the first theme using sass or its own package.json.

#5 in reply to: ↑ 4 @peterwilsoncc
3 years ago

Replying to poena:

The bundled themes are used as examples by people who wants to learn how to build themes, in that sense I think it is common that wordpress-develop is not used.

That makes sense and justifies putting them in.

How did committers handle the map files in Twenty Nineteen?
Twenty Twenty One is not the first theme using sass or its own package.json.

Honestly I am not sure, sorry. It's only recently that I have had time to go through milestones for commit runs. I'll see if I can find an answer to your question. I imagine adding steps when the commit keyword is added will help though. :)

@peterwilsoncc
3 years ago

#6 @peterwilsoncc
3 years ago

  • Owner set to peterwilsoncc
  • Status changed from new to assigned

In 52377.diff, removes map files from the ignore properties on:

  • src/wp-content/themes/twentytwentyone/assets/css
  • src/wp-content/themes/twentytwentyone

To avoid a large patch, I've not included the map file so an npm run build will need to be run in the TT1 theme directory prior to commit.

#7 @peterwilsoncc
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 50348:

Twenty Twenty-One: Add CSS source map files to committed files.

Remove *.css.map files from the ignore properties of Twenty Twenty-One directories, add the unignored files.

Props poena, peterwilsoncc.
Fixes #52377.

Note: See TracTickets for help on using tickets.