CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Feature Request: UI for employing Less plugins

Open calvinjuarez opened this issue 7 years ago • 9 comments

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?

calvinjuarez avatar Apr 18 '17 19:04 calvinjuarez

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 [email protected] 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.

bdkjones avatar Apr 18 '17 20:04 bdkjones

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 avatar Apr 18 '17 20:04 calvinjuarez

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

calvinjuarez avatar Jul 06 '18 22:07 calvinjuarez

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 [email protected] 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.

bdkjones avatar Jul 06 '18 22:07 bdkjones

less-plugin-at-rules.zip

Here you go.

calvinjuarez avatar Jul 06 '18 23:07 calvinjuarez

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';

bdkjones avatar Jul 11 '18 05:07 bdkjones

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

Multiple: No.

.js assumed: Yes.

Remote URI: No.

_ add/remove: No.

calvinjuarez avatar Jul 11 '18 06:07 calvinjuarez

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.

matthew-dean avatar Jul 11 '18 17:07 matthew-dean

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 [email protected] 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.

bdkjones avatar Jul 11 '18 17:07 bdkjones