Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gamtiq
Copy link

@gamtiq gamtiq commented Jun 28, 2014

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
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
Copy link
Author

gamtiq commented Jul 5, 2014

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
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
Copy link
Author

gamtiq commented Jul 6, 2014

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
Copy link
Author

gamtiq commented Apr 27, 2015

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