Skip to content

Commit 2ee8765

Browse files
committed
Remove unnecessary README, fix README code snippets
1 parent ba5d75f commit 2ee8765

File tree

3 files changed

+26
-183
lines changed

3 files changed

+26
-183
lines changed

README.md

+25-29
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Produces:
4242
type: 'Selector',
4343
rules: [
4444
{
45+
type: 'Rule',
4546
tag: { type: 'TagName', name: 'a' },
4647
attributes: [
4748
{
@@ -50,36 +51,33 @@ Produces:
5051
operator: '^=',
5152
value: { type: 'String', value: '/' }
5253
}
53-
],
54-
type: 'Rule'
54+
]
5555
},
5656
{
57+
type: 'Rule',
5758
classNames: [ 'container' ],
5859
pseudoClasses: [
5960
{
6061
type: 'PseudoClass',
6162
name: 'has',
6263
argument: {
6364
type: 'Selector',
64-
rules: [ { tag: { type: 'TagName', name: 'nav' }, type: 'Rule' } ]
65+
rules: [ { type: 'Rule', tag: { type: 'TagName', name: 'nav' } } ]
6566
}
6667
}
6768
],
68-
type: 'Rule',
6969
nestedRule: {
70+
type: 'Rule',
7071
combinator: '>',
71-
rule: {
72-
tag: { type: 'TagName', name: 'a' },
73-
attributes: [ { type: 'Attribute', name: 'href' } ],
74-
pseudoClasses: [
75-
{
76-
type: 'PseudoClass',
77-
name: 'nth-child',
78-
argument: { type: 'Formula', a: 0, b: 2 }
79-
}
80-
],
81-
type: 'Rule'
82-
}
72+
tag: { type: 'TagName', name: 'a' },
73+
attributes: [ { type: 'Attribute', name: 'href' } ],
74+
pseudoClasses: [
75+
{
76+
type: 'PseudoClass',
77+
name: 'nth-child',
78+
argument: { type: 'Formula', a: 0, b: 2 }
79+
}
80+
]
8381
}
8482
}
8583
]
@@ -111,20 +109,18 @@ const selector = ast.selector({
111109
})
112110
})
113111
],
114-
nestedRule: {
112+
nestedRule: ast.rule({
115113
combinator: '>',
116-
rule: ast.rule({
117-
tag: ast.tagName({name: 'a'}),
118-
attributes: [ast.attribute({name: 'href'})],
119-
pseudoClasses: [
120-
ast.pseudoClass({
121-
name: 'nth-child',
122-
argument: ast.formula({a: 0, b: 2})
123-
})
124-
],
125-
pseudoElement: 'before'
126-
})
127-
}
114+
tag: ast.tagName({name: 'a'}),
115+
attributes: [ast.attribute({name: 'href'})],
116+
pseudoClasses: [
117+
ast.pseudoClass({
118+
name: 'nth-child',
119+
argument: ast.formula({a: 0, b: 2})
120+
})
121+
],
122+
pseudoElement: 'before'
123+
})
128124
})
129125
]
130126
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"license": "MIT",
4040
"scripts": {
4141
"build": "tsc",
42-
"build:docs": "rm -Rf docs && typedoc --excludeInternal --excludeExternals --disableSources --plugin typedoc-plugin-markdown --readme tools/README.md --entryDocument ../README.md --out docs src/index.ts && ts-node tools/cleanup-docs.ts",
42+
"build:docs": "rm -Rf docs && typedoc --excludeInternal --excludeExternals --disableSources --plugin typedoc-plugin-markdown --entryDocument ../README.md --out docs src/index.ts && ts-node tools/cleanup-docs.ts",
4343
"test": "jest test",
4444
"test:lib": "TEST_LIB=1 npm run test",
4545
"lint": "eslint src/**.ts",

tools/README.md

-153
This file was deleted.

0 commit comments

Comments
 (0)