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.

Stylus Can't Recursively Compile

See original GitHub issue

If I try to use the Stylus executable to compile, the command doesn’t recognize the ** command to recursively compile.

stylus views/stylesheets/** --out public/stylesheets/

My views/stylesheets directory structure:

-- stylesheets
|
---- some_directory
|
---- other_directory

I’d assume that the above command would compile .styl files from /stylesheets as well as /stylesheets/some_directory and /stylesheets/other_directory here, however this only compiles at the base-level stylesheets folder.

EDIT

It appears as though it does go into the subdirectories, however it outputs those files to the public/stylesheets directory rather than public/stylesheets/some_directory.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tannerlinsleycommented, Dec 16, 2015

Wow. A lot of people I know including me obviously didn’t know this. That’s spectacular. I’ll give it a whirl tomorrow in my project. I would love to ditch stylus-import-tree On Tue, Dec 15, 2015 at 9:59 PM Mikhail Korepanov notifications@github.com wrote:

Well, suppose we have a directory with our .styl files (./test/): tree test

test ├── a │ └── a.styl ├── b │ └── b.styl └── c ├── c.styl └── d └── d.styl

Each file in the test dir contains something like:

body content: ‘from //<c>…’

And main file ./main.styl:

@import ‘test/*/

Then after compiling the main file with stylus main.styl we will get: main.css

body { content: ‘from a’; }body { content: ‘from b’; }body { content: ‘from c’; }body { content: ‘from d’; }

Looks like all is working fine.

— Reply to this email directly or view it on GitHub https://github.com/stylus/stylus/issues/1711#issuecomment-164995761.

0reactions
Panyacommented, Dec 16, 2015

Well, suppose we have a directory with our .styl files (./test/): tree test

test
├── a
│   └── a.styl
├── b
│   └── b.styl
└── c
    ├── c.styl
    └── d
        └── d.styl

Each file in the test dir contains something like:

body
  content: 'from <a>/<b>/<c>...'

And main file ./main.styl contains:

@import 'test/**/*'

Then after compiling the main file with stylus main.styl we will get: main.css

body {
  content: 'from a';
}
body {
  content: 'from b';
}
body {
  content: 'from c';
}
body {
  content: 'from d';
}

Looks like all is working fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems to run Stylus compiler - Stack Overflow
styl for compile the file i have to following error: 'Stylus' is not recognized as an internal or external command. stylus · Share....
Read more >
Stack fails to build "mutually recursive" packages · Issue #2583 ...
I have a two-package project, where the library in package two depends on the library in package one . However, there's also an...
Read more >
Re: Maximum recursion depth exceeded - Stylus Studio
NET language that >>> can compile and optimize for tail recursion is F#. ... Truly great madness cannot be achieved without significant intelligence....
Read more >
Why rm does not work recursively by default?
I was discussing with a friend trying to figure out why rm command does not, for example, check if the path is to...
Read more >
Cannot understand how Function Recursion Works on this Problem ...
Instead of receipts and a box in which you build up a literal stack of papers, in this case you have a set...
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