Commit Graph

100 Commits (e765d31f8f847cf6b71e648509ab810667ad2271)

Author SHA1 Message Date
Lucas Duailibe 576e570711
Fix custom require's (#4766) 2018-06-28 15:56:25 -03:00
Ika 5cfaba6a1c
chore(ISSUE_TEMPLATE): add template for integration issue (#4722)
Ref: https://blog.github.com/2018-05-02-issue-template-improvements/

![image](https://user-images.githubusercontent.com/8341033/41692826-e7b98d06-7534-11e8-9b51-54a04c097681.png)

So that people would know what kind of info we need to know to understand issues like #4720.
2018-06-22 12:37:52 +08:00
Ika dcf44ffbdc
feat: support YAML (#4563)
* feat: support YAML

* fix: do not indent sequence in mappingValue

* docs: add yaml to index.md

* fix: reduce `SyntaxError: Node#parse consumed no characters`

* chore: remove old-build and new-worker.js

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* fix: no space after `<<`

* fix: add yaml to standalone test

* test: add tests

* fix: next empty line in flow collection

* fix: tabs are not allowed
http://yaml.org/spec/1.2/spec.html#space/indentation/

* fix: update parser

* feat: rewrite the mappingItem logic
* feat: indent sequence in mapping
* feat(doc): add ifBreak#groupId and group#id

* chore: fix node 4

* chore: add tools_yaml.svg

* chore: remove resolved TODO

* refactor: remove unnecessary workaround

* chore(worker): importScriptOnce

* chore(build): rename with babelPlugins

* make it rollup compatible

* feat: support singleQuote

* refactor
2018-06-21 10:29:42 +08:00
Lucas Duailibe 9ec1da1ad1
[internal] Cache build results (#4693) 2018-06-18 15:16:40 -03:00
Lucas Duailibe 0780adbb0d Fix build output in CircleCi 2018-06-14 11:15:04 -03:00
Lucas Duailibe 78ac229956
Transpile webpack generated bundles (#4689) 2018-06-13 17:23:33 -03:00
Lucas Duailibe f0907a049d chore(rollup): Refactor native shims plugin 2018-06-13 12:49:35 -03:00
Lucas Duailibe 889b7dab79
Run tests using the standalone build in an empty context (#4668)
Validate that our build is stripping all the "native" dependencies (native modules and env vars).
2018-06-12 15:05:40 -03:00
Ika 3666411bd5
chore(scripts): add missing `execa` import
See 4dde525996
2018-06-09 22:09:51 +08:00
Lucas Duailibe 4dde525996 [release script] Run Prettier on CHANGELOG.md before committing 2018-06-08 15:14:35 -03:00
Lucas Duailibe 70604f1fd1 [Release script] Use `execa` 2018-06-05 19:10:27 -03:00
Lucas Duailibe 54b1f8562d
Introduce Release script (#4631) 2018-06-05 16:37:52 -03:00
Ika 26b13b6274 chore(scripts): update ISSUE_TEMPLATE and exclude tarball (#4620) 2018-06-01 10:58:16 -03:00
Lucas Duailibe 8a67378f97
Nicer logging on build script (#4590) 2018-05-29 14:59:57 -03:00
Suchipi Izumi 89c84e5ee0 Fix some build script issues
* Copy README to dist
* Fix strings in prepublishOnly
2018-05-29 00:22:59 -06:00
Lucas Duailibe 2505926533 Fix PR playground 2018-05-27 21:52:06 -03:00
Lucas Duailibe 412b064df8 Format docs with Prettier 1.13 2018-05-27 15:38:31 -03:00
Lucas Duailibe 1a4dda73a9 Fix playground 2018-05-27 15:31:52 -03:00
Lucas Duailibe 0d57f22098 Use new worker on playground 2018-05-27 15:24:50 -03:00
Lucas Duailibe 9da80415f4 Bump own prettier dependency 2018-05-27 15:22:34 -03:00
Lucas Duailibe 68e24cef79 Build docs script 2018-05-27 15:19:01 -03:00
Lucas Duailibe 174a7736c1
[build] Always transpile everything (#4548) 2018-05-25 12:47:01 -03:00
Lucas Duailibe ded8524acd
Drop node 4 support for development (#4537) 2018-05-24 15:49:57 -03:00
Lucas Duailibe 52a2a46b3c
New build system (#4449) 2018-05-24 15:30:45 -03:00
Ika 1062f2a889
feat: support JSON.stringify formatting (#4450)
* test: move tests

* feat: support legacy JSON formatting

* fix: add missing assertion

* test: fix coverage

* fix: same output as JSON.stringify

* refactor: fix linting

* refactor: rename to json-stringify

* refactor: fix linting

* fix: should fix the production build

* docs: remove outdated name

* fix(playgound): add lib/parser-json-stringify.js

* feat(playgound): add example for json-stringify

* fix: no error on singleQuote string

* fix(playground): correctly load json-stringify

* fix: identifier is only allowed in ObjectProperty.key

* refactor: clearer
2018-05-14 09:12:25 +08:00
Lucas Duailibe f48dd0ea3b
Simplify `build-docs.js` (#4453) 2018-05-09 14:41:51 -03:00
Lucas Duailibe 091edee99c
New playground (#3573) 2018-04-20 12:08:05 -03:00
Brian Ng 9c15f9ed9e
Remove workaround in rollup config for flow parser 2018-04-17 09:50:27 -05:00
Lucas Duailibe f420163e5a Merge branch 'master' into new-playground 2018-04-17 11:45:53 -03:00
Ika 5d7b14856b
fix(schema): support array type (#4312)
* test: add test

* fix(schema): support array type

* fix: convince CI

* refactor: another way to convince CI
2018-04-15 00:06:43 +08:00
Lucas Duailibe 1c8dd0c1e7 more stuff 2018-04-12 13:28:28 -03:00
Lucas Duailibe 46c8a4cd9d
Move sw-toolbox to `website` dependencies (#4297) 2018-04-11 11:38:48 -03:00
Ika 93caa7642e
chore: add a script to generate schema (#4248)
* chore: add a script to generate schema

* typo fix

* refactor
2018-04-05 00:59:50 +08:00
Joseph Frazier 286601f5fa
Don't publish nested tarballs (#4197)
Fixes https://github.com/prettier/prettier/issues/4179

I tried the `.gitignore` idea, but it didn't work, presumably because we
publish from `dist/` instead of the repo root. See here for more details
on how/why this solution works:
https://docs.npmjs.com/files/package.json#files
2018-03-24 19:11:24 -04:00
Sandhose 6b5765da36 Use the animated logo on the website's landing page (#3910)
* Use the animated logo on the landing page

* docs: Add build step to copy logo css

* docs: Shrink the logo when the screen is small
2018-02-07 09:47:14 +11:00
Christopher Chedeau 9ba0d69cb9
Upgrade flow to 0.64 (#3899)
* Upgrade flow to 0.64

This also enables spread operator on jsx on the flow parser:

```js
<div>{...list}</div>
```

I had no idea it was even a thing.

I had to comment out a flow test that no longer parses, but it's no longer in the flow repo and the comment said that it shouldn't be working anyway so I don't think it's going to be a problem.

* Fix build script
2018-02-06 09:01:58 -08:00
Lucas Azzola dd78f31aaf
Run production tests on npm package (#3730)
* Run production tests on npm package

* Put back fast finish
2018-01-13 03:19:20 +11:00
Lucas Azzola a10418ee80
Bump Prettier to 1.10.1 (#3699)
* Bump Prettier to 1.10.1

* Fix relative paths
2018-01-11 01:13:09 +11:00
Ika 7e24d3ff79 fix(playground): avoid `assign to readonly` error on Safari (#3668)
* fix(playground): suppress`assign to readonly` error

* fix(playground): avoid `assign to readonly` error
2018-01-10 18:02:49 +11:00
Lucas Azzola e5d6a4704f
Automatically load plugins from package.json (#3624)
* Automatically load plugins from package.json

* Fix build by adding json extension

* Fixup misuse of options argument

* Rewire graceful-fs to fs

* Document graceful-fs issue

* Alias graceful-fs to fs in Rollup
2018-01-05 21:09:51 +11:00
Ika 8a86c0cc9f fix(playground): fix report version (#3614) 2017-12-31 12:12:56 +11:00
Ika 0af436cd47 fix(playground): use `prVersion` (#3613) 2017-12-31 00:54:36 +11:00
Robert Webb 833666a394 Support handlebars (#3534)
* feat(glimmer): initial HTML/Handlebars/Glimmer support

* feat(glimmer): support un-escaped mustache expressions

* fix(glimmer): add 'as |foo|' syntax

* fix(glimmer): support {{foo bar}} syntax

* feat(glimmer): implement all AST types

* feat(glimmer): implement if/else if/else

* test(glimmer): ignore leading/trailing whitespace from AST_COMPARE

* fix(glimmer): do not use trailing slash for void self-closing elements

* chore(build): disable html tests until we can sort out the glimmer dependency

* feat(html): complete rebase on parse5 addition

* Prettier Support For Glimmer VM/Handlebars

Polished Support for Sub Expressions
Added test cases for glimmer primitives
Added support for concat statements
Attempted to make element nodes work
Attempted block statements
Element Nodes are OK
Added support for block elements that are not else-if related
Added support for Else/If
Cleaning up
Rebase
Switch node 4 syntax
Update build

* Removed dead code/partials

* Added new lines to end of test files.

* Rebase after plugin change

* Added ignores to code coverage
2017-12-29 18:14:31 +01: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 Azzola ed80d6c5bd
Make all CLI logging go through a logger (#3515)
* Make all CLI logging go through a logger

* Add --loglevel docs

* Change default loglevel to log

* Update snapshots

* Switch to YAML eslint files
2017-12-18 23:22:07 +11:00
Lucas Azzola d1c97b3622
Convert eslint config and users/languages/editors files to YAML (#3516)
* YAML all the things

* Cleanup website data files

* Update edit links
2017-12-18 21:55:10 +11:00
Lucas Azzola c7c1d2e7a4 Upgrade Prettier to Prettier 1.9 (#3395)
* Upgrade to prettier@1.9.0

* Run eslint --fix

* Run prettylint --fix

* Fix playground with editorconfig script
2017-12-05 08:14:03 -02:00
Lucas Azzola e04f22975d
Change "preview" to "pr" 2017-11-29 17:45:53 +11:00
Lucas Duailibe f514d1e93f Docs build script (#3332)
* Remove artifacts from repo

* Remove docs stuff from build script

* Add new docs build script

* Add 'third-party' shim in playground worker

* Build from src if it's a PR

* Add command to package.json and remove old stuff from travis
2017-11-28 09:27:25 +11:00