geelen / jspm-loader-css

50 stars 27 forks source link

Make this the default loader #3

Open geelen opened 9 years ago

geelen commented 9 years ago

Really up to @guybedford if/when that happens, but I think it should be, and I'm happy to do what's needed to make it happen.

guybedford commented 9 years ago

More than happy to do this, just let me know when we're ready to consider this!

geelen commented 9 years ago

Now build mode is working, I think the biggest thing is getting Autoprefixer as part of the process. I think opt-in :local syntax + Autoprefixer makes for a pretty solid loader. The problem there is still this: https://github.com/jspm/npm/issues/52#issuecomment-110085437

If we use @MadLittleMods' config here we can get it working, but I have no idea how I could add that config in this project and get it to affect load-paths of projects that use this loader...

guybedford commented 9 years ago

We should actually be able to use that config as map config in an override and post it into the registry to get this to work. It does mean locking down the exact version of the caniuse-db dependency, but it should work out fine despite being ugly.

Basically:

"overrides": {
  "npm:autoprefixer-core@5.1.11": {
    "map": {
      "caniuse-db/data": "npm:caniuse-db@1.0.30000157/data.json!",
      etc etc
    }
  }
}

If that type of map config doesn't work at all, I can fix it to work, as the above override should work out here.

We can then put it in the registry so that this works for users.

geelen commented 9 years ago

As I mentioned just now in the chat room, I think I should vendor a single-file version of autoprefixer into this repo, the way https://github.com/ai/autoprefixer-rails does. That way we don't need to add anything to the registry, or pollute users' config.js files when we install it.

geelen commented 9 years ago

A compiled (single-file) version of Autoprefixer is now bundled & enabled on this plugin by default! So, I'm willing to say that

:sparkling_heart: this plugin does what it needs to to be super badass and the default JSPM css loader :sparkling_heart:

What amount of testing/additional documentation do you think we need before that can happen, @guybedford?

guybedford commented 9 years ago

AMAZING!!

I would suggest checking the standard stylesheets for Bootstrap and Font Awesome. Currently getting a bug loading Bootstrap unfortunately.

Then I also run it on the testlibs manual test folder in the jspm repo, but happy to run those ones and report back.

guybedford commented 9 years ago

@geelen let me know if there is anything further you need from me to get to this point. Still very keen to see this happen.

geelen commented 9 years ago

Me too, just been a bit distracted with a new contract starting. I'm thinking about doing an intro to JSPM & CSS blog post and it'd be great to have a jspm install css step in there to use this project :)

This weekend, I'm thinking.

guybedford commented 9 years ago

Awesome, I'll be around to chat.