Ika
952bc0cc03
fix: get rid of CRLF ( #5494 )
2018-12-08 18:28:29 +08:00
Ika
0534735c2f
fix(vue): tweak semicolon for single expression in event bindings ( #5519 )
2018-11-29 09:28:35 +08:00
Ika
4af3dd4b07
test: improve snapshots ( #5521 )
...
- before
```
${input}${"~".repeat(printWidth)}
${output}
```
- after
```
===options===
${options}
${" ".repeat(printWidth)}| printWidth
====input====
${input}
===output====
${output}
=============
```
2018-11-25 16:21:14 +08:00
Ika
5e8a4a115a
feat: support HTML/Vue/Angular ( #5259 )
2018-11-04 23:03:07 +08:00
Simen Bekkhus
51b7c02e12
Upgrade jest to 22 ( #4782 )
...
* chore: upgrade Jest
* chore: update snapshots
* chore: lock down babel dependency using invalid syntax
* 2 args to test.skip
* use jest 22 for now
* Revert "2 args to test.skip"
This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.
* remove snapshot name from matcher
* fix standalone tests skips
2018-07-03 03:06:29 -03:00
wonderful-panda
3f788d4fb6
fix: *.vue with `lang='tsx'` is not formatted ( #3763 )
2018-01-18 00:20:55 -02:00
Daniel Heckrath
2155465c88
Enable PostCSS in VUE SFC ( #3715 )
...
* Enable PostCSS in VUE SFC
* Add test that verifies that postcss style blocks are parsed
* Move postcss check to same condition as the css check
2018-01-12 17:05:22 +11:00
Lucas Azzola
b1a7787e87
Fix vue self-closing tags ( #3693 )
2018-01-10 18:44:18 +11:00
Lucas Azzola
4c9d4061da
Prettier Plugin API ( #3536 )
...
* Move files around in preparation for refactor
* Update paths in build script
* Extract generic printing logic from the JavaScript printer
* Conform printer API
* Fixup decorator handling
* Fix multiparser
* Create plugin entry for markdown
* Create plugin entry for javascript/typescript
* Create plugin entry for html
* Create plugin entry for graphql
* Create plugin entry for css/less/scss
* Move JSON to JS plugin entry
* Integrate plugins into getSupportInfo()
* Move astFormat to parser definition
* Move util to common
* Implement parser loading
* remark -> mdast
* Rename cli/cli -> cli/index
* Rename builder -> doc package, fix printer resolution
* Fix doc shape assumption in CSS-in-JS logic
* Fix third-party.js prod resolution
* Fixup build-docs script
* Distribute multiparser code
* Remove requirement to forward options
* Flatten closure
* Remove debug directory
* Expose doc
* Add external plugins
* Pass options to loadPlugins
* Export getParsers
* Pin resolve version
* Use getSupportInfo in Markdown embed
* Document plugin API
* Update build-docs
* Add CLI for plugins
* Lint docs
* Fixup build.js
* Add vue language
* Fixup multiparser for vue
* Upgrade rollup and rollup-plugin-commonjs
* Fixup third-party build
* Change AST format in docs
2017-12-26 12:23:50 +11:00
Christopher Chedeau
c40b061b80
[vue] Introduce proper support for Vue Single File Components (SFC) ( #3563 )
...
There's a lot of demand for vue sfc (#2097 ). This introduces partial support for them: all the html is printed as is, except for the script and style tags which are printed using prettier. I believe that this should cover a lot of the use cases while being simple to support and if we want we can extend to more in the future.
I copy pasted the html parser used by vue (it's just a single 400 lines file) so that we don't run the chancesof conflicts. I'm also very conservative: I only print the style and script at the top level and for the lang attributes we support.
I expect this to be landable as is and provide value, review welcome :)
2017-12-25 01:15:33 +01:00
Lucas Duailibe
f119d4a90f
Change run_spec to have explicit parser list ( #3356 )
2017-11-30 03:31:52 -03:00
Lucas Azzola
b7e1c366e0
Vue: pretty-print binding syntax ( #2108 )
...
* feat(vue): pretty-print :class attributes
* feat(vue): switch to brand new custom parser API! 🎉
* refactor(vue): move AST manipulation to post-parse
2017-06-14 22:33:15 +10:00
Lucas Azzola
fdb7467de7
feat(html): add support for HTML fragments ( #2093 )
2017-06-10 20:10:34 -07:00