question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request: --out CLI option should allow filename control

See original GitHub issue

The Problem

Using the CLI --out option, it is currently not possible to control the filename of the compiled CSS file. All we can do is set the folder where the compiled CSS file is placed.

Thus, basic.styl always becomes basic.css.

Many times, people want a different output filename. For example: basic.min.css or similar names that match patterns expected by various Content Management Systems. (Or to follow their team’s file-naming conventions.)

The Current Workaround

I develop CodeKit and, until now, I’ve worked around this Stylus limitation by having the compiler compile to a temporary folder. I then move the file into the correct spot and rename it as appropriate.

Why The Workaround No Longer Works

With the new source map capabilities, the approach above won’t work. The compiler will calculate the wrong paths because I haven’t told it the real, final output location. I can’t simply move and rename output files any longer.

I’ve actually hacked a new workaround. I still use the “compile and relocate” approach, but I have CodeKit open the CSS file and the source map and edit their contents as appropriate. This works, but it’s slower than having the Stylus CLI do this on its own (because it involves 2x the disk-write operations).

Why This Matters

Stylus is the only language that has this limitation. Both Less and Sass provide users a way to customize the output filename. If Stylus is going to remain competitive, I think it needs to offer this flexibility.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MylesBorinscommented, Jan 3, 2015

I’ll see if I can do something about this

0reactions
Panyacommented, Sep 29, 2014

@aesthetics-io what do you mean? This feature is not implemented yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding arguments and options to your Bash scripts - Red Hat
Enter the following code at the CLI and press Enter. Then enter hw as you would any other shell command. [student@testvm1 ~]$ hw(){...
Read more >
Command line options - AWS Documentation
In the AWS CLI, command line options are global parameters you can use to override the default configuration settings, any corresponding profile setting, ......
Read more >
Command Line Interface (CLI) - Visual Studio Code
Visual Studio Code has a powerful command-line interface built-in that lets you control how you launch the editor. You can open files, install...
Read more >
curl.1 the man page
Options and their parameters must be specified on the same line in the file, separated by whitespace, colon, or the equals sign. Long...
Read more >
Command: plan | Terraform - HashiCorp Developer
The terraform plan command creates an execution plan with a preview of the changes that Terraform will make to your infrastructure.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found