Feature request: "resolve @import only" mode
See original GitHub issueI think it would be great to have a way to generate a single less file from another set of files. For example, the following:
foo.less
@import "./bar.less";
body { color: my-body-color; }
bar.less
my-body-color: red;
Would give
output.less
my-body-color: red;
body { color: my-body-color; }
Instead of
output.css
body { color: red; }
It would be very useful, together with the !default feature.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Feature Request (As an Editor) - Blackmagic Forum • View topic
But not everything is fix yet. Feature Request: F01 Double click in media-pool to open import window. F02 Import folders from import screen...
Read more >Feature Request: Options to keep `require.resolve` as external
*.node can't be run only with itself, so I can't use type: ... New import type for externals , like "commonjs-require-resolve" ...
Read more >Resolve | webpack
Configure how modules are resolved. For example, when calling import 'lodash' in ES2015, the resolve options can change where webpack goes to look...
Read more >Auto import | IntelliJ IDEA Documentation - JetBrains
Basic procedures to create and optimize imports in IntelliJ IDEA. Learn more how to import the missing import ... Press Alt+Enter to accept...
Read more >JavaScript modules - MDN Web Docs
Importing features into your script · import { name, draw, reportArea, reportPerimeter } from './modules/square.js'; · /js-examples/module- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
High on my “regulations that would be 1000× more useful than the cookie law” list: ban parsers that don’t store enough info in the AST to enable character-for-character reconstruction of the input. I hope
@import
nodes at least store the line number? Looks like something that would be needed for sourcemaps.Maybe not. It sounds like it would be an as-is inline dump of the contents of the Less file at the point of @import. BUT my guess is that’s not a trivial change in flow, since currently Less files are fully imported into the AST, and then converted / formatted back out to CSS, if I’m not mistaken. And it sounds like a fairly custom feature. I would think at the least it would be a parse plugin, that takes the contents after import (and before render) and simply allows you to pull out the strings of each file and concatenate them.