myitcv / gopherjs

A compiler from Go to JavaScript for running Go code in a browser
BSD 2-Clause "Simplified" License
21 stars 0 forks source link

compiler/prelude: format .js files using prettier #4

Closed myitcv closed 6 years ago

myitcv commented 6 years ago

This PR introduces automatic formatting of the prelude's now separate .js files. Using prettier has the same argument as using gofmt on .go source code.

As part of this we make the go generate step for the prelude include a formatpreludejs.go step.

The resulting prelude_min.go file is slightly different now, but post https://github.com/gopherjs/gopherjs/pull/791 we can see these differences are entirely and solely attributable to prettier's adjusting of the .js files.