Commit Graph

21 Commits (0241d97b7783276e34b44234d8b1858ba14eb0b4)

Author SHA1 Message Date
Christopher Chedeau 848dfa3505 0.18.0 2017-02-16 09:28:26 -08:00
Brandon Mills eda26398e5 [Docs] Use replaceState API when demo code changes (#710)
In the current demo, every time the code in the left panel is changed,
the new code is stored in the URL hash, which pushes a new history
entry. This effectively "breaks" the back button. This change calls
`history.replaceState` instead, so a single click of the back button
will return the browser to whatever page was open before navigating to
the demo.
2017-02-14 21:02:17 -08:00
Christopher Chedeau fbba7db6e2 0.17.0 2017-02-13 19:11:05 -08:00
Christopher Chedeau 4dca78dbed Add option for putting > on the last line in jsx (#661)
Feel free to suggest a better name for the option. Otherwise it works great :)

Fixes #654
2017-02-13 12:57:05 -05:00
Christopher Chedeau 98d04d8c70 0.16.0 2017-02-05 18:28:20 -08:00
Christopher Chedeau b040be2206 0.15.0 2017-02-01 16:31:11 -08:00
Christopher Chedeau efc3ee0488 0.14.1 2017-01-30 09:56:01 -08:00
Christopher Chedeau 94b137ac47 0.13.0 2017-01-27 14:41:30 -08:00
Christopher Chedeau caf7f2a6f2 0.12.0 2017-01-26 20:24:17 -08:00
Christopher Chedeau ef531274f7 0.11.0 2017-01-23 09:40:01 -08:00
Simon Lydell bb1884320b Use babel-code-frame for syntax errors (#367)
* Use babel-code-frame for syntax errors

* Support the `--color` option more explicitly

* Update rollup config to handle babel-code-frame

* Use exact dependencies
2017-01-23 09:10:51 -08:00
Christopher Chedeau 92f14d79df v0.0.10 (#353) 2017-01-20 10:00:01 -08:00
Christopher Chedeau c468fde106 Add debugging support for doc IR (#347)
This PR adds two things:

`--debug-print-doc` command that prints the formatted doc

```js
echo "<div>&lt;</div>" | ./bin/prettier.js --stdin --debug-print-doc
[
  groupConditional(
    group([
      group([ "<", "div", group([ indent(2, []), softline() ]), ">" ]),
      "&lt;",
      "</",
      "div",
      ">"
    ]),
    [
      group([
        group([ "<", "div", group([ indent(2, []), softline() ]), ">" ]),
        "&lt;",
        "</",
        "div",
        ">"
      ]),
      group([
        group([ "<", "div", group([ indent(2, []), softline() ]), ">" ]),
        indent(2, groupBreak([ hardline(), "&lt;" ])),
        hardline(),
        "</",
        "div",
        ">"
      ])
    ]
  ),
  ";",
  hardline()
];
```

The ability to view the IR in real time on the browser display:

![image](https://cloud.githubusercontent.com/assets/197597/22134741/4f172f20-de7e-11e6-84bc-5f813976dc19.png)

The way it works is pretty cool, we take the doc IR and print a valid JavaScript string out of it, that we then send to prettier in order to make it look good :)
2017-01-20 09:54:32 -08:00
Christopher Chedeau b065eaa582 Update docs to 0.0.9 (#309) 2017-01-18 14:26:22 -08:00
Christopher Chedeau e4b5aaade2 Fix docs (#307)
It doesn't compile cleanly anymore:
- esutils checks for Buffer.isBuffer without ensuring that Buffer exists.
- for version, we require a json file, need a rollup extension for that.

I no longer hardcode the version number.

Note: we need to merge this pull request after we have done the release so that the version number is correct and need to rebuild the minified version in a subsequent commit.
2017-01-18 14:24:42 -08:00
James Long 6f2b01193f Update live editor to 0.0.8 2017-01-17 11:00:02 -05:00
James Long 60c0b52fed Update live editor to 0.0.7 2017-01-13 23:33:38 -05:00
Mikael Brevik cbabefdb0f Adds various prettier-browser changes (#175)
* Adds link to GH repo in title

* Adds popular keybindings (subl) to editor

* Changes theme to base16-dark to fit better with body bg
2017-01-13 17:14:48 -05:00
James Long 3713408871 Update live editor to 0.0.6 2017-01-13 15:40:22 -05:00
Artem Sapegin 7fee1588ae Add title and encoding to the REPL 2017-01-12 13:59:32 +01:00
Christopher Chedeau 4685164faf Add prettier-browser
This is a very handy way of playing out with prettier without having to install it. People have already been using it actively in the issues. Putting it directly inside of the repo would be better than on mine.
2017-01-11 10:56:23 -08:00