File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ This is a CSS selector parser which tries to follow latest CSS standards and also support experimental features.
2+
3+ Project structure:
4+ - ` src/ ` contains all the source code.
5+ - ` src/ast.ts ` Abstract Syntax Tree.
6+ - ` src/index.ts ` should contain all the public API and types used in public API.
7+ - ` src/indexes.ts ` indexes for faster lookup.
8+ - ` src/parser.ts ` contains the parser itself which produces AST from CSS selector string.
9+ - ` src/pseudo-signatures.ts ` contains types and helper function for pseudo-classes and pseudo-elements.
10+ - ` src/renderer.ts ` contains the renderer which converts AST back to CSS selector string.
11+ - ` src/syntax-definitions.ts ` contains types and implementations of syntax definitions for different CSS versions.
12+ - ` src/utils.ts ` helper functions.
13+
14+ We always write TypeScript with single quotes and 4 spaces for indentation,
15+ so when your responses include TypeScript code, please follow those conventions.
16+
17+ All the imports include ".js" file extension because of the new ES module resolution algorithm.
18+
19+ We write code for better performance, but not at the cost of readability.
20+
21+ We write self-explanatory variable names and comments in English.
You can’t perform that action at this time.
0 commit comments