jgonera / autoless Goto Github PK
View Code? Open in Web Editor NEWAnother .less files watcher, but this time with dependency tracking and growl notifications.
License: MIT License
Another .less files watcher, but this time with dependency tracking and growl notifications.
License: MIT License
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).
The command autoless --source-map=site.css.map less css
didn't work for me?
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 :-(
For smaller projects compiling everything at the beginning is not an issue, for bigger projects compiling too many files could be avoided by comparing destination and source file modification time. Dependencies should be taken into account too.
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.
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.
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?
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.
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]
Dziękuję :)
Juliusz, it would be nice if you added autoprefixer and clean-css.
Update less to 1.7.0
Can autoless provide a ignore option that can exclude some specific files to be compiled?
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.
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
.
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?
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);
This still uses 1.3.3, could you please update it to LESS 1.5.0?
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.
That way we don't have to install the package before we can find out what it can actually do and how to do that?
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!
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?
When I start the program with:
autoless ./css ./css
the target files lose their first letter:
css/mycss.less -> css/ycss.less
I tracked it down to line 22 in Manager.js:
var dstFile = path.join(this.dstDir, base.slice(this.srcDir.length) + '.css');
Please update to the latest versions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.