Commit Graph

18 Commits (9b772cb4fd7d3b8033f11f4779ecb803c61e0d50)

Author SHA1 Message Date
Lucas Azzola 40c41f232f Website: usability improvements (#2118)
* feat(website): use worker thread for formatting

* Create index.html

Remove step=5
2017-06-13 09:20:13 -07:00
Lucas Azzola 4e4922b428 feat(website): revamp the website a bit (#2113) 2017-06-12 07:58:06 -07:00
Christopher Chedeau 02c48d284e Fix strictEqual throwing (#1909)
I looked at what is being called with assert and couldn't find anything but `ok` and `strictEqual`.

Fixes #1903
2017-06-02 14:27:03 -07:00
Christopher Chedeau d55640087e Fix building docs (#1838)
The hackiness continues! I'm now bundling an existing bundle again in order for it to get exported as a global variable :p There's likely a better solution, but it kind of works.

Because I have to regenerate the docs, I just tagged it as 1.4.0-beta and added typescript and postcss in there.
2017-05-31 13:37:35 -07:00
CodinCat b354fbd6dc Update repo link in github page (#1500) 2017-05-04 07:46:42 -07:00
Aviv Rosental d6e5e6be60 omit 'doc' key from options object before passing it to format() (#1299) 2017-04-16 11:32:06 -07:00
Christopher Chedeau 33c8a26cd6 Support semi and useTabs options in docs (#1232) 2017-04-13 09:31:37 -07:00
Christopher Chedeau edf2bde590 Fix trailing commas in docs (#825)
I also added support for parser dropdown and stop minifying the bundle so that the flow parser actually works.

Fixes #816
2017-02-27 17:02:41 -05: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 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 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 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