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

Feature request: change less main/out based on existing file. #92

Open
StefBakker opened this issue Oct 31, 2022 · 3 comments
Open

Feature request: change less main/out based on existing file. #92

StefBakker opened this issue Oct 31, 2022 · 3 comments

Comments

@StefBakker
Copy link

I would like to see a option to automatically switch the less settings. I am working a lot with different workspaces and projects at the moment (Joomla/Wordpress/Magento) that require me to manually adjust the settings in the settings.json. It would be nice to have a extra option to use a specific main/out based on lets say a file. Maybe something like be able to expand the main/out settings:

"less.compile": {
    "main": {
      "./wp-config.php": "${workspaceRoot}/wp-content/themes/theme/assets/less/template.less",
      "./configuration.php": "${workspaceRoot}/templates/theme/less/template.less",
      "./bin/magento": "${workspaceFolder}\/app\/design\/frontend\/parent_theme\/child_theme\/web\/css\/template.css",
    }
},

Maybe this is possible, maybe not but i thought i would share my thoughts about a improvement to this extension

@mrcrowl
Copy link
Owner

mrcrowl commented Oct 31, 2022

Hey @StefBakker, just wanted to check that your request isn't satisfied by the per-file directives (comment based) that we already support?

See https://github.com/mrcrowl/vscode-easy-less#per-file-configuration

For example, you can add directive comments like this:

// main: "../styles.less", compress: true, sourceMap: false

body,
html {
  ...;
}

@mrcrowl
Copy link
Owner

mrcrowl commented Oct 31, 2022

... if that doesn't help, you can also specify settings in the workspace config file: i.e.

.vscode/settings.json

Still not enough? Then yes, let's chat more about what you need.

@Mqxx
Copy link

Mqxx commented Sep 1, 2023

Hey is the topic still up to date? I have a similar question related to the output path per file. I have my original less files in a certain structure, for example like this:

./src/wiki/page_1/style/index.less

I now want the file to be automatically saved under the same path but under:

./dist/wiki/page_1/style/index.css

Can I configure this without having to specify this for each individual file?

Thx 😃 ~Mqx

PS: This Extension is awsome!

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

No branches or pull requests

3 participants