-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements nesting in template string parser #1103
base: master
Are you sure you want to change the base?
Changes from all commits
af3760b
8f74c0b
4542869
44cd7e6
159e2c8
bdbfe14
134dab3
1d77e7e
8a4e4cf
3ba236d
df99f72
72626dc
7497dac
b5feccc
a447887
dcac2a7
8b831fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ import template from '../../src/index' | |
import parse from '../../src/parse' | ||
|
||
const options = {Renderer: null} | ||
const jss = create(options).use(template()) | ||
const jss = create(options).use(template({cache: false})) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. disabling cache here to have a realistic comparison without caching, I didn't document it, because I don't think user should need it, so for now it's a private one, just for tests |
||
|
||
const css = ` | ||
color: rgb(77, 77, 77); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import parse from '../../src/parse' | ||
import stylis from 'stylis' | ||
import parse, {parse2} from '../../src/parse' | ||
|
||
const css = ` | ||
color: rgb(77, 77, 77); | ||
|
@@ -37,8 +38,25 @@ const css = ` | |
font-variant: normal normal; | ||
border-spacing: 0px; | ||
` | ||
|
||
stylis.set({ | ||
global: false, | ||
keyframe: false, | ||
prefix: false, | ||
compress: false, | ||
semicolon: true | ||
}) | ||
|
||
suite('Parse', () => { | ||
benchmark('parse()', () => { | ||
parse(css) | ||
}) | ||
|
||
benchmark('parse2()', () => { | ||
parse2(css) | ||
}) | ||
|
||
benchmark('stylis()', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using stylis parser just to see a comparable other value in perspective |
||
stylis('#id', css) | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was broken