LESS settings: output folder vs. folder path #278

7R5N opened this Issue Nov 18, 2016 · 1 comment


None yet
2 participants

7R5N commented Nov 18, 2016

Quick, short summary:
There are 2 places (spots) to specify the output folder for LESS, which – in my setup – cancel each other out.

  1. Project settings / Languages / Less / Less Output / Output Folder
  2. Project file list / … / → @Sidebar / Output: Change Output path

My Setup is somehow strange – don’t ask, I entered a team at an existing project (doh) – and these guys don’t work with CodeKit, so I have to adapt their setup – it’s an project based on bootstrap:

  • The LESS files are located in an "LESS" folder, all files names start with an underscore, even the one file to be compiled "_main.less", but not the variables file "variables.less" (doh)
  • The CSS file should be compiles in a "Vendor" folder, next to the "LESS" folder, the CSS file has a different file name "styles.css" than the LESS file (doh)
  • Path names for the CSS map must be absolute (for compatibility reasons with the other teammates)

Expected results:
Both settings respect each other

Actual results:
Both settings cancel each other out

Exact steps to reproduce:

  1. At spot 2 (file list) I change the output path of the file "_main.less" to the "Vendor" folder and the file name "styles.css" → then the paths in and to the CSS map file are relative
  2. At spot 1 (settings) I change the output folder to 'relative to project’s root folder', which makes the paths absolute.
  3. Then I press the button "Apply changes to existing files", which then
  4. sets the "_main.less" @2. (file list) to "Ignore it", and the "variables.less" to "Compile it"
  5. After re-setting the output path of the file "_main.less" to the "Vendor" folder and the file name "styles.css" (which is basically step 1), at the settings the output folder ist set back to 'relative to source file’ folder'.

A link to download a simplified project or file that shows the issue:

Your configuration (any details about your system that you think might be relevant)
CodeKit 3.0.3


bdkjones commented Nov 18, 2016

Have you read the Output Paths & Actions section of codekitapp.com/help/? If not, start there. I'm having trouble following your exact problem, but here's what I can tell you:

When you apply Output Paths from Project Settings, that overwrites anything you've specified on a file-by-file basis. That's correct behavior.

It sounds like all you need to do is select _main.less, choose Change, then go over to your Vendor folder and name the file styles.css.

I'm not sure why you're worried about source map paths. You WANT relative paths in the map and CodeKit will always create relative paths in the sources array. Changing the option in Project Settings to "relative to the project root folder" will have no effect on paths in the source map. Those are calculated automatically by the Less compiler and they're always relative.

I'm also unable to reproduce the issue in Step 5. When I return to Project Settings, the Output Path option is still listed as relative to the project root folder.

@bdkjones bdkjones closed this Jan 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment