node.js - Node js - Less css cannot find file to import -



node.js - Node js - Less css cannot find file to import -

i have 2 less files in public/stylesheets. using express.js serve them css files.

the first file, one.less looks this:

@import "another.less"; h1 { color: red; }

the sec file, another.less looks this:

p { color: red; }

when seek load page, server quits error:

file 'another.less' wasn't found.

i have tried absolute path, didn't work.

this express.js configuration:

app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(express.bodyparser()); app.use(express.methodoverride()); app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] })) app.use(app.router); app.use(express.static(__dirname + '/public')); });

edit: '@import "/public/stylesheets/two";'

original proposal did not work.

node.js less

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -