Skip to content

Update documentation to reflect (anticipated) v0.5.0 #38

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

Merged
merged 7 commits into from
Jun 13, 2014

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Jun 11, 2014

First draft for documentation update. A separate SBT-plugin page will follow.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 11, 2014

@sjrd thank you for comments & review.

@@ -224,7 +233,7 @@ if the result will always be the same (e.g., `document`), and `def` when
subsequent accesses to the field might return a different value (e.g.,
`innerWidth`).

Use `Unit` instead of `js.Undefined` as result type of methods that do not
Use `Unit` instead of `js.prim.Undefined` as result type of methods that do not
return any value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph can be restated, saying that Scala primitive types should be used instead of js.prim._, with possibly using scala.Int where applicable (stress that Int is to be used only if the value is in the range of an Int, 32-bits; if an integer value may be out of that range -which is typically the case for time values-, Double must be used -and not Long).

@sjrd
Copy link
Member

sjrd commented Jun 11, 2014

That's all for this diff.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 11, 2014

Updated

@sjrd
Copy link
Member

sjrd commented Jun 11, 2014

LGTM
Should we merge this already?

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 11, 2014

It can wait so we have a full update at once. I'll add a commit with a new page about the SBT-plugin showing:

  • JSEnvs
  • jsDependencies
  • Cross-Build setup
  • Scala.js library dependencies

Anything else that should go in there?

@sjrd
Copy link
Member

sjrd commented Jun 11, 2014

Not that I think of right now, at least.

@sjrd
Copy link
Member

sjrd commented Jun 11, 2014

The persistLauncher setting, and possibly packageJSDependencies (part of jsDependencies, I suppose).

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 11, 2014

Added new commit. Review by @sjrd

lazy val root = project.in(file(".")).aggregate()

lazy val fooJS = project.in(file("foo-js")).settings(scalaJSSettings: _*).settings(
name := "Foo Js Build",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give projects same name and say why

@sjrd
Copy link
Member

sjrd commented Jun 11, 2014

That is all for this commit.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 12, 2014

Updated

@sjrd
Copy link
Member

sjrd commented Jun 12, 2014

LGTM so far.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 12, 2014

What would you like me to add?

@sjrd
Copy link
Member

sjrd commented Jun 12, 2014

A link from /doc/ to the sbt plugin documentation.

And still dreaming about a Getting Started Guide ^^ But maybe I should do that one.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 12, 2014

The link from doc/ is in the second commit. We can talk about a getting started guide this afternoon. I don't mind writing that, but we should have a bit of a plan ;)

@sjrd
Copy link
Member

sjrd commented Jun 12, 2014

The link from doc/ is in the second commit.

Ah right. Somehow I missed it.

We can talk about a getting started guide this afternoon. I don't mind writing that, but we should have a bit of a plan ;)

OK

@sjrd sjrd mentioned this pull request Jun 13, 2014
12 tasks
@sjrd
Copy link
Member

sjrd commented Jun 13, 2014

Could you add named anchors to sections of the tutorial, for example

## <a name="setup"></a> Step 1: Setup

I'd like to refer to specific portions of the tutorial from the release notes.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 13, 2014

OK. We really need a better system. This is getting way out of hand; we shouldn't need to care about these kind of things.

Hello world!
[success] (...)

Congratulations! You have successfully compiled and run your first Scala.js application. The code is actually run by a JavaScript interpreter. If you do not believe this (it happens to us occainally), you can use sbt's `last`:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: occainally -> occasionally

@sjrd
Copy link
Member

sjrd commented Jun 13, 2014

The section Get started in /doc/ and in / should send directly to the tutorial.


### Create the HTML Page

The only thing which is specific to Scala.js, is how we can call the Scala code from JavaScript. First have a look at our HTML page (`scalajs-tutorial-fastopt.html`), we will go in the details right after.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could be a bit clearer about which folder this file goes into, I think.

</html>
{% endhighlight %}

The first script tag simply includes the generated code (attention, you might need to adapt the Scala version from `2.10` to `2.11` here).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from 2.11 to 2.10 here if you use Scala 2.10.x instead of 2.11.x

@sjrd
Copy link
Member

sjrd commented Jun 13, 2014

That's all for me.

@sjrd
Copy link
Member

sjrd commented Jun 13, 2014

btw, highlighting works as expected (I built it locally to review it)

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 13, 2014

Updated

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 13, 2014

Updated

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 13, 2014

Updated

@sjrd
Copy link
Member

sjrd commented Jun 13, 2014

LGTM

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 13, 2014

Tutorial has 0.5.0 branch now. Waiting for travis

gzm0 added a commit that referenced this pull request Jun 13, 2014
Update documentation to reflect (anticipated) v0.5.0
@gzm0 gzm0 merged commit 0a427fc into scala-js:master Jun 13, 2014
@gzm0 gzm0 deleted the update-0.5-changes branch June 13, 2014 17:14
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.

3 participants