Skip to content

More Simple. Fewer Dependencies.

Compare
Choose a tag to compare
@mrmrs mrmrs released this 24 Aug 16:29
· 367 commits to main since this release

Originally tachyons was a monolithic repo. Eventually along the way I started splitting things up onto NPM as when I went to work at other places sometimes I would only need a handful of modules and if a clients build system allowed for it I could just grab them quickly from npm and add them to the outputted css. I was separately maintaining publishing the mono repo and the modules though.

When @johnotander and I started working on v4 one of the things we talked about was having a single source of truth and making it easier to keep everything in sync. So we would install through npm and then copy files over to source. This then caused a new problem, each module needed to be fully encapsulated - so when we would copy them from node_modules to src - we left in a lot of duplicated variables and custom media props. As Tachyons is all about immutability - this seems not the best :)

In practice this caused us to have a bug where the custom media props in our npm modules were being overridden somewhere and this was largely invisible to everyone.

So in the interest of simplicity, we've removed all the tachyons modules as dependencies and have removed the function of copying over the modules from the node_modules directory. Instead we'll just maintain this as an encapsulated project. I think it's more simple this way and I don't think the added complexity was worth keeping the npm copy function around for this version of the project.

TL;DR THE BIG CHANGES

  • We've removed all the duplicate variable and custom-media-prop declarations.
  • We removed tachyons modules as dev dependencies

Note: Nothing has changed in the outputted css besides some comments. As no new features were added, this is really just a patch to fix a bug.