Comments (4)
Nope, at the monent, since it uses fs
module.
What a use case do you have?
from validator.
I want to create an addon for nano-css
that in dev mode would automatically validate CSS and inform developer. Is there a lib you could recommend for that?
from validator.
This module is a wrapper for CSSTree. You can use it for your purposes like that module does.
from validator.
What if we separated CLI from the core (function which takes string and outputs array of zero or more error plain objects), then tapped that core in CLI, plus published the core using Rollup in CJS, ES Modules and UMD formats? Theoretically, people would be able to access that UMD build via browsers, maybe even straight from npm CDN's (for example, <script src="https://cdn.jsdelivr.net/npm/email-comb/dist/email-comb.umd.js"></script>
of mine).
Another problem with this CLI being bundled is that when I consume this package, my Rollup complains about path
and fs
dependencies — but I don't even use them via validateString()
! It's the bundled CLI that uses them, basically, all I need is validateString()
.
The benefit of this program is that it sugar-coats the AST traversal from people — which can cause brain haemorrhages for junior developers. Conceptually, it's genius: a function with string-in, array of zero or more error objects out.
It's just Rollup is needed and CLI must be separated.
from validator.
Related Issues (18)
- Invalid Level 3 :not() selectors HOT 1
- support exit code
- [CSSTree] Unknown property `font-display` HOT 2
- !important without whitespace considered invalid in some cases HOT 3
- Lack of semicolon is not detected as an error HOT 1
- Some CSS errors are not detected if they are at the start of the file, but detected when they are in the middle (?) HOT 2
- Content counters are not recognized as valid CSS HOT 1
- Validator on max() and min() HOT 2
- Marking as invalid browser properties
- color-mix() support
- Attempted import error: 'validate' is not exported from 'csstree-validator'. HOT 4
- Selectors starting with numerical should fail validation
- support for `@layer`
- clamp() throwing an incorrect error
- Add fix-suggestion
- support justify-content: space-evenly; HOT 1
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader 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 validator.