Git Product home page Git Product logo

autoless's People

Contributors

jasonrhodes avatar jgonera avatar k88hudson avatar leecunliffe avatar morrislaptop avatar spliner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autoless's Issues

Watch module error

There is a case which causes TypeError in watch module. Here is an error message.

/usr/lib/node_modules/autoless/node_modules/watch/main.js:118
if (curr.nlink === 0 && (prevFile.file != f || prevFile.action != "removed
^
TypeError: Cannot read property 'nlink' of undefined
at /usr/lib/node_modules/autoless/node_modules/watch/main.js:118:13
at /usr/lib/node_modules/autoless/node_modules/watch/main.js:81:19
at Object.oncomplete (fs.js:93:15)

This error does not occurred in version 0.14.0 of watch (it's currently latest version).

Definable output path

Seems quite standard to have /less compile to /css in a project so it is unfortunate that autoless can't compile to a specific directory. Search for perfect CLI LESS compiler continues :-(

auto compiles with errors even after fixing the .less bug

If there is a bug detected in my .less file, autoless provides an appropriate error.

However, after fixing the bug in my .less file, autoless recompiles using the buggy code I had previously saved.

If I restart autoless, it will pick up my fixed .less file and compile correctly.

Unclear routing

Setup: compiling from a folder ./less into the current folder ., I found that I have to run

$ autoless ./less ..

In the hope that I could avoid stringifying all my calcs, I made the mistake of running

$ autoless -sm=on ./less ..

This watched all of the files in the directory one higher than my current folder, and everything recursively contained within. Which meant I had to force pull all of my repos.

This was, uh, unexpected behavior.

'> 1%, last 2 versions' creates a file called '%1' on Windows

It looks like the CLI isn't taking cross-platform projects into account, generating an actual file %1 on windows machines (and, presumably, any shell on unix with a scripting component that doesn't support %<num> syntax, either). Is there a more cross-platform syntax that can be used here?

Empty Output File

Sometimes the outputted css file is empty. No error is shown. When make some random changes to the less and save again, it the correct output reappears. Sometimes it needs several save actions until it works again. All save actions, trigger "Change detected ..." in the termial.

Trimming first letter of filename when compiling into a different directory

First off, this is a great idea for a library. It was working perfectly until I tried to compile .less files into a different directory. Then it removes the first letter of the filename in the compiled .css file.

I have a directory set up like so:

- public/
    - assets/
        - css/
            style.css
            - less/
                style.less

And then I get this:

$ autoless ./assets/css/less ./assets/css
Finding files...
✓ assets/css/less/style.less -> assets/css/tyle.css
Monitoring files in ./assets/css/less

The compilation works perfectly but it changes style.less into tyle.css

Version info:

$ npm -v
1.2.14

$ npm list
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]

--ignore option ?

Can autoless provide a ignore option that can exclude some specific files to be compiled?

LESS compress option

Any chance we could see support of the LESS -x, --compress options? While as autoless stands, it's helpful in a development environment... adding this would be super helpful whenever pushing to a production environment often because you end up having to run lessc -x every time anyways.

files that are importeded by another are not compiled themselves.

edit: after looking at the code, clearly this is intended behavior...

This may be a 'feature' rather than a 'bug', but here is what happens.

I have two less files.

a.less:

@import b.less
.some-class { ...

b.less

.another-class { ...

When I edit b.css, autoless will recompile a.less (expected), but it doesn't individually compile b.less. However, I want a compiled version of b.less because on another page, I include the compiled b.less on its own.

It might be nice to have a setting to 'compile imported files'?

I guess a potential work around would be to have another file c.less that imports b.less and I include the compiled c.less on the page where all I want is b.less.

Keep getting Error: ENOTDIR, scandir

Hi,

I keep getting this error message:
/usr/local/lib/node_modules/autoless/node_modules/watch/main.js:73
if (err) throw err;
^
Error: ENOTDIR, scandir 'less/style.less'
at Error (native)

I user following command:
$ autoless less/style.less css/style.css

Any ideas why?

--no-color config?

I see it in lessc, how use it in autoless?
--no-color Disables colorized output.
@black:"#000000"
@NAMEs:black,white
@name:extact(@NAMEs,1)
well get a error

// Colors
@transparent: transparent;
@black: #000000;
@white: #ffffff;
@lime: #a4c400;
@green: #60a917;
@emerald: #008a00;
@blue: #00AFF0;
@teal: #00aba9;
@cyan: #1ba1e2;
@cobalt: #0050ef;
@indigo: #6a00ff;
@violet: #aa00ff;
@pink: #dc4fad;
@magenta: #d80073;
@crimson: #a20025;
@red: #CE352C;
@orange: #fa6800;
@amber: #f0a30a;
@yellow: #e3c800;
@brown: #825a2c;
@olive: #6d8764;
@steel: #647687;
@mauve: #76608a;
@taupe: #87794e;
@dark: #1d1d1d;
@darkBrown: #63362F;
@darkCrimson: #640024;
@darkMagenta: #81003C;
@darkIndigo: #4B0096;
@darkCyan: #1B6EAE;
@darkCobalt: #00356A;
@darkTeal: #004050;
@darkEmerald: #003e00;
@darkGreen: #128023;
@darkOrange: #bf5a15;
@darkRed: #9a1616;
@darkPink: #9a165a;
@darkViolet: #57169a;
@darkBlue: #16499a;
@lightBlue: #4390df;
@lighterBlue: #00CCFF;
@lightTeal: lighten(@teal, 30%);
@lightOlive: #78aa1c;
@lightOrange: lighten(@orange, 30%);
@lightPink: #f472d0;
@lightRed: lighten(@red, 10%);
@lightGreen: lighten(@green, 10%);
@lightCyan: #59cde2;
@grayed: #585858;
@grayDarker: #222222;
@darker: #222222;
@grayDark: #333333;
@gray: #555555;
@grayLight: #999999;
@grayLighter: #eeeeee;
@darkGray: #333333;
@darkerGray: #222222;
@lightGray: #999999;
@lighterGray: #eeeeee;

@color-list: black, white, lime, green, emerald, blue, teal, cyan, cobalt, indigo, violet, pink, magenta, crimson, red, orange,
amber, yellow, brown, olive, steel, mauve, taupe, dark, darkBrown, darkCrimson, darkMagenta, darkIndigo, darkCyan,
darkCobalt, darkTeal, darkEmerald, darkGreen, darkOrange, darkRed, darkPink, darkViolet, darkBlue, lightBlue,
lighterBlue, lightTeal, lightOlive, lightOrange, lightPink, lightRed, lightGreen, lightCyan, grayed, grayDarker,
grayDark, gray, grayLight, grayLighter, lightGray, lighterGray, darkGray, darkerGray, darker;

@color-list-length: length(@color-list);

.generate-colors(@name, @i: 1) when (@i =< @color-list-length) {
  @name: extract(@color-list, @i);
  .fg-@{name} {color: @@name !important;}
  .bg-@{name} {background-color: @@name !important;}
  .generate-colors(@name, @i + 1);
}
.generate-colors(@color-list-length);

Update to 1.5.0

This still uses 1.3.3, could you please update it to LESS 1.5.0?

Consider archiving the project on Github and depreciating on npm

Please consider archiving this project or breathing new life into it.. It has now been six years since a release in April of 2015. A number of commits following that in May 2015 never even got a release to the npm package.
Less has changed in that time and I am finding that there are things that autoless does not know about. One example if using the css caluculate() it will do the math inside the parenthesis.
So this:
left: calc(90% - 109px);
becomes
left: calc(-19%);, which is not what we want. Trying to escape it like this ~"left: calc(90% - 109px);" results in autoless returning the error:

ParseError: Unrecognised input in less/style.less on line 1055, column 5:

Six years is a small eternity for a web technology project to sit without any updates. If you have moved on then move on an archive it. It will send a warning to people like me that this project could contain dated technology and may not be what I want. I normally first check the last commit date on a project before installing but some how that got missed this time. Also consider adding a warning of some time to the npm package that it is out date to.

Problem with @imported files from another (non-watched) directory

Hi there, thanks for autoless, it's fantastic. I'm running into an issue though when I try to watch a file that @imports other files from other directories. Like so:

MyProject
   Styles
      main.less
   OtherStyles
      other.less
      other2.less
      other3.less

So I've got my main.less file, which @imports all the other.less files like so:

@import "../OtherStyles/other.less";
@import "../OtherStyles/other2.less";
@import "../OtherStyles/other3.less";

But it's not catching the updates to the 'other' files and/or recompiling my main.less file. There's no error, it just doesn't update main.less.

I'm assuming this may be something to do with the fact that they're outside the directory being watched but I'm really not sure to telll you the truth.

Any help?

Thanks!

Watching of a single file (and its imports)

I would love to be able to pass one file as the source to autoless:

$ autoless source.less destination.css

I don't want to watch all files in its directory because I often am only working on one file for the day. I could achieve this by having separate directories, but it would be nice to avoid this.
Would you accept a PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.