Skip to content

Add fileExt & importOption options, ability to use global less, update less version - #67

Open
gamtiq wants to merge 6 commits into
guybedford:masterfrom
gamtiq:master
Open

Add fileExt & importOption options, ability to use global less, update less version#67
gamtiq wants to merge 6 commits into
guybedford:masterfrom
gamtiq:master

Conversation

@gamtiq

@gamtiq gamtiq commented Jun 28, 2014

Copy link
Copy Markdown

Hello,

I've made several changes to improve usability of the plugin. Namely:

  • fileExt option to specify default file extension
  • importOption option to set the way of resource importing
  • ability to use preloaded global less
  • ability to use global less configuration
  • adaptation to curl configuration
  • the example to demonstrate usage of new options

* fileExt option to specify default file extension
* importOption option to set the way of resource importing
* ability to use preloaded global less
* ability to use global less configuration
* adaptation to curl configuration
@guybedford

Copy link
Copy Markdown
Owner

Can you explain why you need access to importOption here? Which alternative options do you think are useful and why?

Also I'm not sure I understand the use case for fileExt, how do you see this being used?

The configuration and global changes sound great.

@gamtiq

gamtiq commented Jul 5, 2014

Copy link
Copy Markdown
Author

Both options allows loading and preprocessing files with css extension.
I softly migrate one of my projects to Less using. I have lots of css-files and some of them use some of Less functionality. At the moment my project has only a couple of less-files (actually they are includes). For some reasons it is inconvenient for me to rename css-files to less-files. So those options allow me using Less in css-files.
Actually I use the proposed changes in the project and all works fine.

@guybedford

Copy link
Copy Markdown
Owner

I'm not sure that this is the right level to be handling this sort of thing.

Ideally one could handle this with a rewrite rule on the server for example.

I think there is some nice code here though that could potentially benefit users, but are the fileExt and importOption changes beneficial apart from this use case?

@gamtiq

gamtiq commented Jul 6, 2014

Copy link
Copy Markdown
Author

I suppose so.
multiple as default value for import option is quite restrictive (at least it is not flexible solution).
The same is relevant to fileExt option. Why a user cannot use an extension that differs from less?

Rewrite rule on the server is possible solution. But why should we utilize server for migration to Less when it is possible to use only client-side solution?

@gamtiq

gamtiq commented Apr 27, 2015

Copy link
Copy Markdown
Author

Hello,

I've updated lessc up to version 2.5.0. It seems that all works fine. But I didn't test the plugin with RequireJS optimizer.
Also I've improved example a little.

@gamtiq gamtiq changed the title Add fileExt & importOption options, ability to use global less Add fileExt & importOption options, ability to use global less, update less version Apr 27, 2015
@gamtiq gamtiq mentioned this pull request Mar 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants