Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bounty on fixing up Emmet.js for CodeMirror for custom use

Howdy! We use CodeMirror as our editor on CodePen. We also use the Emmet add on for it. We love it. The users love it. It's also very very big at 831k (before compression and stuff).

I've been wanting to optimize it for a while, I've just struggled with it the few times I've tried, and think maybe one of you smart people might be able to do the job more efficiently.

Here's what our custom version of Emmet.js would be like:

  • It would not include it's own copy of Lodash.js, it would just assume that's already available on the page.
  • It would remove everything related to vendor prefixing that's built into Emmet. CodePen offers two prefixing solutions already that are a bit better fit.
  • Remove all the CanIUse information. There is a ton of it in there, and I suspect it's related to the prefixing feature which we're wanting to remove anyway.

Then after that, ensure that everything works exactly as it did before. In the past I've had luck removing things, only to find I'd broken some specific tab trigger or something. Here's a good collection of triggers that should all work.

The repo for it has an index.html demo, so that's a perfect testing ground for all this.

I'd like to offer $500 for the job, if anyone is up for it. But I'd rather not waste a bunch of people's time repeating work, so if you wanna try it, email me at chris@codepen.io so I can kinda coordinate.

@sergeche

This comment has been minimized.

Copy link

sergeche commented Oct 21, 2014

It would remove everything related to vendor prefixing that's built into Emmet.

You want to remove it completely (e.g. save some bytes) or simply disable it?

@chriscoyier

This comment has been minimized.

Copy link
Owner Author

chriscoyier commented Oct 21, 2014

@sergeche remove it completely - reducing the size is the #1 goal.

@chriscoyier

This comment has been minimized.

Copy link
Owner Author

chriscoyier commented Jan 14, 2015

This is done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.