bdkjones / CodeKit

CodeKit 3 Issue Tracker
https://codekitapp.com
82 stars 5 forks source link

Feature Request: UI for employing Less plugins #352

Open calvinjuarez opened 7 years ago

calvinjuarez commented 7 years ago

It'd be nice to be able to more easily use Less plugins (info at http://lesscss.org/usage/#plugins). Presumably in the Less language options per project?

bdkjones commented 7 years ago

Which plugins are you looking to use? And out of curiosity, why are you not on Sass?

Sent from my iPhone

On Apr 18, 2017, at 12:39, Calvin Juárez notifications@github.com wrote:

It'd be nice to be able to more easily use Less plugins (info at http://lesscss.org/usage/#plugins). Presumably in the Less language options per project?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

calvinjuarez commented 7 years ago

I'd like to be able to use any plugins I find. I don't have any in mind specifically. There are some examples on the page I linked, if you scroll down a bit, if you're looking for ones to, like, test with or whatever.

And I'm not on Sass 'cause I prefer Less.

calvinjuarez commented 6 years ago

Less has a built-in @plugin rule that allows most plugins to be included inline. It'd be nice if CodeKit watched for changes to files referenced by the @plugin at-rule. http://lesscss.org/features/#plugin-atrules-feature

bdkjones commented 6 years ago

You’d want CodeKit to simply re-compile your Less file if the plugin file changes? Can you provide a VERY simple test project that I could use to test the implementation of such a thing?

On 6 Jul 2018, at 15:47, Calvin Juárez notifications@github.com wrote:

Less has a built-in @plugin rule that allows most plugins to be included inline. It'd be nice if CodeKit watched for changes to files referenced by the @plugin at-rule.http://lesscss.org/features/#plugin-atrules-feature http://lesscss.org/features/#plugin-atrules-feature — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bdkjones/CodeKit/issues/352#issuecomment-403164572, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4jZi2rOPfuFO-SNTTGs_sPLyab0sSeks5uD-jqgaJpZM4NAzHr.

calvinjuarez commented 6 years ago

less-plugin-at-rules.zip

Here you go.

bdkjones commented 6 years ago

What are the rules for @plugin statements? For example, are these valid?

 // Multiple files?
@plugin 'multiple.js', 'files.js', 'inline.js';

// No extension. Assumed to be .js?
@plugin 'multiple'

// Remote URI?
@plugin '://somewebsite.com/somefile.js'

// Partial convention: will this resolve to a file named 'somefile.js', without an underscore?
@plugin '_somefile.js';
calvinjuarez commented 6 years ago

@matthew-dean, correct me if I’m wrong about any of these answers.

Multiple: No.

.js assumed: Yes.

Remote URI: No.

_ add/remove: No.

matthew-dean commented 6 years ago

AFAIK a remote URL is valid for @import or @plugin, but is subject to CORS in a browser. Less doesn't do any rewriting of URLs based on underscores. That's strictly a Sass feature.

bdkjones commented 6 years ago

Ok. It’s simple enough to have CodeKit recognize @plugin and link the dependency between files. I’ll get it in the next release.

Sent from my iPhone

On Jul 11, 2018, at 10:33, Matthew Dean notifications@github.com wrote:

AFAIK a remote URL is valid for @import or @plugin, but is subject to CORS in a browser. Less doesn't do any rewriting of URLs based on underscores. That's strictly a Sass feature.

And out of curiosity, why are you not on Sass?

I mean...out of curiosity, why not Crunch 2 instead of Codekit? lol

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.