Skip to content

Commit 99b4192

Browse files
corysimmonsshellscape
authored andcommitted
Add Table of Contents to API.md (#39)
* Add lockfile * Add TOC to API.md
1 parent 507d5a8 commit 99b4192

File tree

4 files changed

+3123
-2
lines changed

4 files changed

+3123
-2
lines changed

API.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,49 @@
33
*Please use only this documented API when working with the parser. Methods
44
not documented here are subject to change at any point.*
55

6+
<!-- toc -->
7+
8+
- [`parser` function](#parser-function)
9+
* [`parser.atword([props])`](#parseratwordprops)
10+
* [`parser.colon([props])`](#parsercolonprops)
11+
* [`parser.comma([props])`](#parsercommaprops)
12+
* [`parser.comment([props])`](#parsercommentprops)
13+
* [`parser.func([props])`](#parserfuncprops)
14+
* [`parser.number([props])`](#parsernumberprops)
15+
* [`parser.operator([props])`](#parseroperatorprops)
16+
* [`parser.paren([props])`](#parserparenprops)
17+
* [`parser.string([props])`](#parserstringprops)
18+
* [`parser.value([props])`](#parservalueprops)
19+
* [`parser.word([props])`](#parserwordprops)
20+
- [Node types](#node-types)
21+
* [`node.type`](#nodetype)
22+
* [`node.parent`](#nodeparent)
23+
* [`node.toString()`, `String(node)`, or `'' + node`](#nodetostring-stringnode-or---node)
24+
* [`node.next()` & `node.prev()`](#nodenext--nodeprev)
25+
* [`node.replaceWith(node)`](#nodereplacewithnode)
26+
* [`node.remove()`](#noderemove)
27+
* [`node.clone()`](#nodeclone)
28+
* [`node.raws`](#noderaws)
29+
* [`node.source`](#nodesource)
30+
* [`node.sourceIndex`](#nodesourceindex)
31+
- [Container types](#container-types)
32+
* [`container.nodes`](#containernodes)
33+
* [`container.first` & `container.last`](#containerfirst--containerlast)
34+
* [`container.at(index)`](#containeratindex)
35+
* [`container.index(node)`](#containerindexnode)
36+
* [`container.length`](#containerlength)
37+
* [`container.each(callback)`](#containereachcallback)
38+
* [`container.walk(callback)`](#containerwalkcallback)
39+
* [`container.walk` proxies](#containerwalk-proxies)
40+
* [`container.prepend(node)` & `container.append(node)`](#containerprependnode--containerappendnode)
41+
* [`container.insertBefore(old, new)` & `container.insertAfter(old, new)`](#containerinsertbeforeold-new--containerinsertafterold-new)
42+
* [`container.removeChild(node)`](#containerremovechildnode)
43+
* [`container.removeAll()` or `container.empty()`](#containerremoveall-or-containerempty)
44+
- [Root nodes`](#root-nodes)
45+
- [Value nodes](#value-nodes)
46+
47+
<!-- tocstop -->
48+
649
## `parser` function
750

851
This is the module's main entry point, and returns a `new Parser`.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,11 @@ and utilized many patterns and logical constructs from the project.
100100

101101
Tests and some tokenizing techniques found in [postcss-value-parser](https://github.com/TrySound/postcss-value-parser)
102102
were used.
103+
104+
## Contributing
105+
106+
- `git fork/clone`
107+
- `npm i`
108+
- Before PR'ing, make sure `npm test` still pass. Add test if you're adding features.
109+
110+
When you tweak [API.md](API.md), please run `npm run toc` before PR'ing.

0 commit comments

Comments
 (0)