Commit Graph

144 Commits (master)

Author SHA1 Message Date
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
Lucas Duailibe f9f056612f
Update flow to 0.59.0 (#3238) 2017-11-26 23:14:45 -03:00
Ika 76efb33e75 chore: setup markdown formatting (#3224)
* chore(deps): upgrade prettier to v1.8.2

* chore: setup lint-docs script

* docs: add `<!-- prettier-ignore -->`s

* docs: format docs

* Revert "docs: format docs"

This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53.

* chore(prettierrc): set `--no-prose-wrap`

* docs: format docs

* Revert "docs: format docs"

This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df.

* docs: tweak

* docs: format docs

* chore: rename .prettierrc

* chore: rename back to .prettierrc

* chore: split out third-party

* refactor: fix linting

* chore: do not split out third-party on website
2017-11-22 22:27:40 +11:00
Lucas Duailibe 66d9b266e8
Skip assertDoc calls in production (#3268) 2017-11-16 09:54:57 -02:00
Ika 76ee59a191
chore(deps): update prettier to 1.8.0 (#3167)
* chore(deps): update prettier to 1.8.0

* refactor: fix linting
2017-11-07 16:42:38 +08:00
Lucas Azzola 71a5533c4e
Move all docs to website (#3139)
* Sync README -> docs/options.md

* Sync README -> docs/*.md

* Misc fixups

* Remove markdown-toc

* Remove insert-pragma from ToC

* Never again!

* Move all docs to ./docs

* Remove yarn toc

* Fix inter-doc links

* Fix links in footer

* Clean up README.md

* Add basic description to README.md

* Use flat badges

* Move editor guides to website

* Improve prettier-ignore docs

* Fixup bad find/replace

* Add JSON to README

* Fix custom parser API link

* Fixup GitHub centering, add downloads badge

* Add 1.8 docs

* docs(website): mention markdown on homepage (#1)

* Add intro

* Add watching-files.md

* Fix markdown syntax highlighting

* Switch back to .md links
2017-11-07 14:39:07 +11:00
Ika 9f6f3e7355 feat: support markdown (#2943)
* feat(markdown): inital implementation

* feat(markdown): support strong

* fix: add missing default value

* feat(markdown): support inlineCode

* feat: support delete

* feat: support link

* feat: support image

* feat: support blockquote

* feat: support heading

* feat: support code

* feat: support yaml

* feat: support html

* feat: support list

* feat: support thematicBreak

* feat: support table

* feat: support linkReference

* feat: support imageReference

* feat: support definition

* feat: support footnote

* feat: support footnoteReference

* feat: support footnoteDefinition

* test(cli): update snapshots

* refactor: extract SINGLE_LINE_NODE_TYPES

* refactor: printChildren

* fix: correct newlines

* test: add trailing newline

* fix: blockquote formatting

* fix: node types

* fix: break line correctly

* fix: remove unnecessary properties to make AST_COMPARE happy

* fix: escape `|` in tableCell content

* fix: unexpected line break

* fix: ast difference from loose list

* fix: html break lines

* refactor: fix linting

* fix: normalize ast

* fix: escape specific chars

* test: add more tests

* fix: build markdown parser

* chore: remove unnecessary *.log

* fix: escape html entity

* feat: support prettier-ignore

* fix: line break for non-loose listItem

* feat: support formatting `code` based on `lang`

* fix: add `jsx` and `tsx`

* fix: use multiparser

* refactor: fix linting

* test: update test case 😉

* feat: switch to `_` style emphasis

* fix: sequence list should use different prefix

* test: add tests

* fix: do not print additional new line after `prettier-ignore`

* fix(list): enforce `1.` to avoid unnecessary git diff

* feat: enable `commonmark` option

* feat: support `break`
* fix: escape backslash
* refactor: escape html entity using backslash

* fix: respect autolink-style link

* feat: support md`...` and markdown`...`

* docs: replace ands with commas

* fix: respect indented code block

* fix: respect html entity

* docs: add docs for modified MDAST

* fix: inlineCode is breakline-able

* feat: support backtick in inlineCode

* feat: support a-lot-of-backtick in fenced code block

* feat: use `~~~`-style code block in js template

* fix: respect escaped chars

* fix: use `*`-style emphasis for invalid `_`-style output

* test: add test cases

* fix: use `- - -`-style thematicBreak to avoid conflict with yaml

* fix: remain the same content for linkReference identifier

* fix: `inlineCode` gap can be a line break

* fix: `html` should not print trailing spaces if it's in root

* refactor: fix typo

* fix: wrap `definition`'s url if there's whitespace

* fix: remove unnecessary whitespace at the end of paragraph

* fix: fix: remove unnecessary whitespace at the start of paragraph

* fix: setence children length is possible 0

* fix: support continuous ordered list

* fix: do not print addtional hardline after loose list

* fix: use double-backtick style for single-backtick value in inlineCode

* fix: support nested emphasis

* fix: support space-url in link/image

* fix: escape `)` in link/image url

* fix: support single-quote in link/image/definition title

* fix: respect alt in image/imageReference

* fix: use `*`-style thematicBreak in list

* fix: loose/tight list linebreaks

* fix: print third linebreak before indented code block with a tight list in the previous

* test: move bug cases

* fix: remove unnecessary linebreaks

* refactor: fix typo
2017-10-12 09:46:44 +11:00
Lucas Azzola 2e655a3755 1.7.4 2017-10-03 19:46:42 +10:00
Lucas Azzola 33a1f59e01 Ensure package is published from dist/ with correct version number (#2963) 2017-10-03 19:34:08 +11:00
Simon Lydell 63916beebb Try to fix cosmiconfig in the built version of Prettier (#2930) 2017-09-29 09:27:50 +02:00
Simon Lydell 06c9127f02 Update instructions for running tests against dist
Fixes #2819.
2017-09-14 21:56:59 +02:00
Simon Lydell 1375e6880a Generate ISSUE_TEMPLATE.md on build 2017-09-14 00:14:35 +02:00
Simon Lydell 8ba2acadbb Make sure that shown playground Prettier version always is in sync 2017-09-12 22:17:06 +02:00
Ika 3db840258b chore(build): update ISSUE_TEMPLATE.md before publish (#2776) 2017-09-09 23:39:11 +10:00
Simon Lydell a29b407dda Generalize run-external-typescript-tests.js (#2742)
... so it can run external Flow tests as well (or any external tests for
that matter).
2017-09-03 13:41:07 -07:00
Simon Lydell f903ae45ed Make run-external-typescript-tests.js cross-platform (#2737)
The old version had quite a bit of code related to grouping errors,
showing the number of errors per group and saving the groups of errors
to different files. However, now there are only 12 bad tests so I didn't
bother porting that logic to the new version. Instead, the errors a
simply printed to stdout.
2017-09-03 15:59:19 +02:00
Levi Thomason 828a7b8f0d docs(readme): add and sort cli options (#2700)
* chore(build): auto generate toc

* docs(readme): add and sort cli options

* refactor(build): move toc to seperate task
2017-08-29 13:39:49 -07:00
Lucas Azzola 8a45377760 Load babylon parser for json formatting (#2620) 2017-08-15 21:54:10 +10:00
Joseph Frazier a78d1389f6 Use babylon.parseExpression for JSON (#2476)
* Add comments showing parser arguments

Since this is how they are invoked, the comments make it easier to maintain.

* Use babylon.parseExpression for JSON

See https://github.com/prettier/prettier/issues/2378#issuecomment-314600778

Note that this doesn't yet print comments:

    echo '{/*comment*/"K":"V"}' | ./bin/prettier.js --parser json

* Remove parser-json.js

This reduces duplicate code in the built package.
See https://github.com/prettier/prettier/pull/2476#pullrequestreview-50181398

* Add test with block comment in JSON

* Fix test with block comment in JSON

* Add test with line comment in JSON

* Don't build now-redundant parser-json.js
2017-07-24 11:43:49 +10:00
Lucas Azzola 71b2004391 Cleanup unused nodes, and turn on importMeta babylon plugin (#2498)
* Cleanup unused AST nodes

* Add tests for JSXNamespacedName

* Turn on importMeta babylon plugin

* Add tests for DeclareTypeAlias

* Add back TS*Keyword nodes, fix TS optional destructuring
2017-07-16 23:59:49 +10:00
Joseph Frazier 9290dd8803 Add some standardjs-esque eslint rules (#2401)
I experimented with simplifying the eslint config to just use eslint-config-standard and eslint-config-prettier. There were too many errors to make it a quick change, but I did find a few useful rules we could adopt instead.

---

* lint: Remove useless return statements

http://eslint.org/docs/rules/no-useless-return

* lint: Split declarations into multiple statements

http://eslint.org/docs/rules/one-var

* lint: Remove unneeded ternary operators

http://eslint.org/docs/rules/no-unneeded-ternary

* lint: Require symbol descriptions

http://eslint.org/docs/rules/symbol-description

* lint: Disallow declarations in nested blocks

http://eslint.org/docs/rules/no-inner-declarations

* lint: Disallow yoda conditions

http://eslint.org/docs/rules/yoda

* Revert "lint: Disallow yoda conditions"

See discussion at https://github.com/prettier/prettier/pull/2401#discussion_r125750068

This reverts commit f3b568d5bd48a742460cb0f805d1be38d8f61a40.
2017-07-05 16:54:46 -04:00
Evilebot Tnawi a0cadad222 feat(cli): support multiple patterns with ignore pattern (#2356) 2017-07-04 17:55:06 +02:00
Frank Li 80f38ce75b Website (#2241)
* initial docusaurus set-up

* Delete why-prettier.md

* Update README.md

* Update Docusaurus structure

* Update package.json

* Update siteConfig.js

* Remove ~ files

* chore(website): update build script

* Add redirect script

* Get eslint working on website

* Fix to allow for baseUrl of '/'

* Update docusaurus version

* Update README.md

* Change redirect script to use baseUrl of '/'

* Fix index.js formatting

* Load redirect script

* General cleanup

* Add projects using prettier
* Update service worker to just scope to playground
* Reduce link repeatition
* Link "Try it out" button to /playground/
* Make header of playground approximately same as main site
* Remove .html from URLs (e.g. users.html -> users/)
* Link Gitter Chat

* Add circleci.yml

* Only run builds on master

* Do deployment using Travis
2017-07-02 10:14:24 +10:00
Simon Lydell 7b176b5d73 Merge pull request #2341 from lydell/shelljs
Convert build.sh into build.js using shelljs
2017-06-29 18:26:27 +02:00
Lucas Azzola 968cc3cb2b Delete fuzzer2.js 2017-06-29 08:52:14 +10:00
Simon Lydell 20a0723fc1 Convert build.sh into build.js using shelljs
For better cross platform compatibility.
2017-06-28 22:34:59 +02:00
Simon Lydell ba51d2dfa8 Enable linting of build scripts 2017-06-28 21:37:33 +02:00
Lucas Azzola 678964b8de fix(typescript): don't add namespace keyword to global declaration, fixes #2327 (#2329) 2017-06-28 07:53:10 -07:00
Christopher Chedeau b257c68772 Use perl instead of sed for replacing eval 2017-06-27 10:02:31 -07:00
Christopher Chedeau 1e48f34ac8 Copy README.md to the dist/ folder (#2284)
Fixes #2275
2017-06-27 09:48:06 -07:00
Lucas Azzola eccb17495a Website: speed up load time, enable service worker (#2172)
* feat(website): speed up website load 💥

* chore(package): fix bad merge
2017-06-18 20:25:27 +10:00
Joseph Frazier 33a1c713d5 Dedupe copy/pasted code in build.sh (#2179) 2017-06-17 11:39:30 -10:00
Joseph Frazier d46b778dba Add json parser to dist/ build (#2178)
This fixes the build, as shown by:

    yarn build
    yarn test --prod -- tests/json/
2017-06-17 17:09:48 -04:00
Joseph Frazier fe8cc68e56 Fix dist/ build on machines that don't support `sed -i ''` (#2175)
Here's an example of the error that happens upon `yarn build`:

    sed: can't read : No such file or directory
2017-06-17 08:59:45 -10:00
Iaroslav Voloshchuk 89971285e4 Move devDependencies to dependencies (#2124)
fixes https://github.com/prettier/prettier/issues/2121

* move runtime deps to npm deps

* Fix (dev)dependencies

See https://github.com/prettier/prettier/pull/2124#discussion_r121795774

* Remove dependencies from dist/package.json

See https://github.com/prettier/prettier/pull/2124#issuecomment-308259138
2017-06-17 10:36:50 -04:00
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 364c38de0d Implement custom parser API (#1783)
* feat(api): add custom parser API

* test(api): add integration test for parser resolution

* chore(api): fix build after resolving conflicts

* docs(api): document custom parser API

* docs(api): fix typo

* chore(build): add parse5 to build and support yarn test --prod
2017-06-12 16:51:12 +10:00
Christopher Chedeau f702c2c614 1.4.3
* Fix support for node 4 (#1988)
* Fix website on iOS Safari (#1970)

Formatting change:
* Position JSX whitespace (`{" "}`) at the end of lines (#1964)

Lots of small fixes, mainly for TypeScript.
2017-06-07 15:48:34 -07:00
Martin V 820e39b2b3 Clean up build script, add Babel for docs js bundles (#1970)
* Clean up build script, add Babel for docs js bundles

* Update package.json
2017-06-07 15:20:48 -07:00
Joseph Frazier d9e4d8f1b8 Remove unnecessary 'else' after 'return' (#1987)
As mentioned in at the end of
https://github.com/prettier/prettier/pull/1983/files#r120222081
2017-06-05 15:12:59 -07:00
Jon Wong e33d6773d6 Adding support for `graphql` (#1982)
* Initial GraphQL implementation

This is the bare minimum amount of code to make graphql work. Turns out it's pretty easy to add support for other languages :)

* Fixing support for `graphql` parsing

There was a few structural changes with the addition of CSS and Typescript that we had to take into account.

* Fixing file glob, adding `graphql` to yarn.lock

* Removing extraneous file

* Adding `graphql` parser, style changes

* Splitting out graphql printer

* Removing merge conflict

* Fixing yarn.lock

* Addressing code review, using `createError`

* Adding release config

* Using exact version

* Removing destructuring
2017-06-05 12:34:08 -07:00
Christopher Chedeau f56f9e5e8f 1.4.1
This fixes all the TypeScript problems reported and a few regressions from 1.4.0.
2017-06-02 16:25:57 -07:00
Christopher Chedeau 3d175cc305 Remove eval for npm release (#1925)
Fixes #1895
2017-06-02 16:19:26 -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
Christopher Chedeau f4296550db Introduce Webpack 2 to fix postcss bundling (#1836)
It turns out rollup doesn't use the same algorithm for bundling commonjs files when there are cycles as node, which breaks postcss: https://twitter.com/Rich_Harris/status/869021144191561729. Webpack works just fine with it.

This sucks to have this rollup/webpack frankenstein but I really want to be able to release and don't really want to spend yet another day or two trying to make it work well.
2017-05-31 11:59:33 -07:00
Christopher Chedeau 05b921efdd Build the dist/ with rollup (#1794) 2017-05-28 21:49:41 -07:00
Simon Lydell 378682350f Improve ESLint setup and fix errors (#1656)
* Improve ESLint setup

- Uses `eslint:recommended` + a handful more rules.
- Uses .eslintignore so that editors can understand which files to lint.
- Uses .eslintrc<strong>.js</strong> so more editors get syntax highlighting.

* Fix ESLint errors

About half of them were fixed by `eslint . --fix`.
2017-05-21 12:11:09 -07:00
Simon Lydell bc5186e544 Run Prettier on all source files (#1648)
This commit updates `npm run format:all` to not only format .js files in
src/ and bin/, but also tests_config/ and scripts/, as well as all
jsfmt.spec.js files.

It also includes the result of running `npm run format:all`, except
changes to src/ and bin/.
2017-05-21 08:13:11 -07:00
Lucas Azzola 8f00393a56 tools(typescript): do not report SyntaxErrors as errors (#1647) 2017-05-21 07:53:30 -07:00
Lucas Azzola 1ea4ad4e30 tools(typescript): add script to run all TypeScript tests (#1606) 2017-05-14 03:26:37 -07:00
Simon Lydell dc93bdc983 Sync the Flow tests (#1163)
* Extract custom tests from tests/flow/

Approach:

1. Remove all .js files in tests/flow except .snap.js files.
2. Copy over all .js files from tests/ in the flow repo.
3. Go through the diff looking for deletions.
   - It was easy to see which deletions were due to changes in the tests
     due to updates in the flow repo.
   - For the rest of the deletions, I used `git blame` to verify that
     they had been added by us since the flow tests were copied over.

This makes tests/flow/ simply a copy of the tests from the flow repo,
making it easier to sync with the upstream flow tests in the future.

* Add a script for syncing the flow tests

* Sync the flow tests
2017-04-08 07:52:38 -07:00