Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port core to Scala.js #898

Merged
merged 14 commits into from
Apr 23, 2017
Merged

Port core to Scala.js #898

merged 14 commits into from
Apr 23, 2017

Conversation

olafurpg
Copy link
Member

@olafurpg olafurpg commented Apr 22, 2017

It's a bit tricky to run the unit tests in JS because unit tests are written in external source files like this one https://github.com/scalameta/scalafmt/blob/0cbbbac5b90d7ce104a6fcca781bb4a479a0d27b/core/src/test/resources/test/DynamicStyle.stat
Ideally, we should add file IO support in scalameta-io for node.js, which can be used for running unit tests in sbt. However, I'm tempted to leave that for another PR and write a few basic unit tests without file IO and merge PR.

  • get basic unit test passing in JS
  • add more tests in JS
  • move core project to scalafmt-core directory, etc. since all files are moving anyways to shared/ directories.
  • clear out PR queue to avoid rebase issues
  • ship it!

olafurpg added 13 commits April 23, 2017 19:36
- Use metaconfig-hocon on JS
- Use metaconfig-typesafe-config on JVM

The first unit test passes on JS!
Let's wait for scalameta/scalameta#812 to get
fixed so we can run the full test suite in Scala.js
This commit reorganizes the top-level directories to follow a consistent
naming convention: scalafmt-MODULE. I'm doing this in this PR because
the files have already moved into `shared/` directories so URLs to
previous files will get lost anyways. I like the consistent naming
scheme because it feels easier to get an overview of the project.
@olafurpg olafurpg force-pushed the scala.js branch 3 times, most recently from 49bda07 to 11a5cb4 Compare April 23, 2017 18:01
@olafurpg olafurpg merged commit d5c3b0a into scalameta:master Apr 23, 2017
@olafurpg olafurpg deleted the scala.js branch April 23, 2017 18:15
@olafurpg olafurpg changed the title [WIP] Port to Scala.js Port core to Scala.js Apr 23, 2017
pjrt pushed a commit to pjrt/scalafmt that referenced this pull request May 22, 2017
* Move core tests to tests module

* Remove unused sbt-pack

* Move cli/test to tests/test

* Tiny cleanup in build.sbt

* Move src to shared/src

* Abstract over config backend.

- Use metaconfig-hocon on JS
- Use metaconfig-typesafe-config on JVM

The first unit test passes on JS!

* Format :v

* Fix ci-slow command

* Add a few more JS unit tests.

Let's wait for scalameta/scalameta#812 to get
fixed so we can run the full test suite in Scala.js

* Skip CI_PUBLISH for ci-sbt-scalafmt

* Move all the files!

This commit reorganizes the top-level directories to follow a consistent
naming convention: scalafmt-MODULE. I'm doing this in this PR because
the files have already moved into `shared/` directories so URLs to
previous files will get lost anyways. I like the consistent naming
scheme because it feels easier to get an overview of the project.

* Move scalafmt-readme back to readme/

* Update .scalafmt.conf

* Fix ci-sbt-scalafmt command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant