Comments (5)
In less file this fails:
How exactly does it fail? Any specific error message? Note that importing a *.css
file requires (css)
option (w/o it the statement is supposed to stay as-is to be processed by a browser).
from less-plugin-npm-import.
Thanks for response.
With the .css
the @import
will stay as-is, without the .css
it will embed it correctly.
Interestingly, if using (css)
option, it fails to embed (stays as-is) either with or without the .css
.
So it only works for me without the (css)
option and without .css
suffix.
I'm using node 4.1.2
npm 2.14.4
.
from less-plugin-npm-import.
With the .css the
@import
will stay as-is, without the .css it will embed it correctly.
Without css
extension the file is treated as a less
file and imported accordingly.
Interestingly, if using (css) option, it fails to embed (stays as-is) either with or without the .css.
My mistake above, sorry (actually you could notice it by reading the docs I pointed to ;). -
css
option only stresses the file is .css
one and the import stays as is.
To include a .css file you need either less
or inline
option (yet again all this is documented at http://lesscss.org/features/#import-directives-feature).
from less-plugin-npm-import.
Thanks for clarification, makes sense when reading the less docs :)
Perhaps worth adding a second example lessc usage to your README, before where you say "css/less extensions not necessary"
@import (less) "npm://packagename/path/to/file.css";
from less-plugin-npm-import.
I will close this, since it is not a but and the question is answered.
@wmyers We will gladly merge in pull request with a new example :). But if you do not have time for it, you can open a new issue in less-docs repo. It will take longer time till someone adds it through in that case.
from less-plugin-npm-import.
Related Issues (17)
- less 2.2 tests failed HOT 1
- Module's package.json file may make trouble HOT 1
- Nothing happens. HOT 1
- Document test process and/or fix tests HOT 8
- it has bug when node_modules in the deep modules
- can I use it with less option 'syncImport: true, relativeUrls: true' ? HOT 2
- add less file which is in the node_modules has failed. HOT 2
- How to use with Grunt? HOT 2
- Doesn't work in a .vue file
- Not working with less-plugin-glob
- Why is the output result empty?
- this plugin breaks sourcemaps on windows HOT 1
- Doesnโt work with Less 2.1.0 HOT 4
- How to run tests HOT 3
- Plugin breaks on require HOT 1
- Requires fs module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from less-plugin-npm-import.