Comments (11)
The minimum minimorum is to be able to 1) compile and 2) link.
Compile is as easy as running the Scala compiler with scalajs-library.jar
on the classpath, and scalajs-compiler.jar
as a scalac plugin.
Linking is as easy as reproducing the code from the CLI linker at
https://github.com/scala-js/scala-js/blob/v0.6.7/cli/src/main/scala/org/scalajs/cli/Scalajsld.scala#L137-L177
Of course, that assumes people will then run their code on their own. But you probably want your build tool to allow them to run easily. That becomes a bit more tricky, but the core idea can be found at:
https://github.com/scala-js/scala-js/blob/v0.6.7/sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/ScalaJSPluginInternal.scala#L561-L679
from cbt.
@cvogt @sjrd I'll try to dig into it. Will keep you posted.
from cbt.
Sounds awesome. Excited about this :). I am sure @sjrd and @gzm0 are happy to answer questions if they arise. Me too.
cc @lihaoyi
from cbt.
assigned to @katrinsharp
from cbt.
@katrinsharp everything is in place now in cbt to take a crack at this.
from cbt.
@cvogt had some prior commitments so only played with the code so far, but will take it as commitment now.
from cbt.
@sjrd, @gzm0 question: why maven dependency scalajs-compiler artifact has full scala version 2.11.8 and not 2.11 ? (http://mvnrepository.com/artifact/org.scala-js/scalajs-compiler_2.11.8/0.6.9) Feels like a bug unless it is feature :)
from cbt.
It is a feature. The compiler API is neither source nor binary compatible between minor versions of Scala, so compiler plugins must always be fully cross-compiled.
from cbt.
from cbt.
from cbt.
basic support implemented in #144
from cbt.
Related Issues (20)
- remove support for top-level source files
- Does CBT support cross building against multiple scala-js/scala-native versions? HOT 2
- speed up jar generation HOT 2
- please document defaultScalaVersion
- Handle dependency import scope HOT 3
- Compile error when trying to use cbt on Windows HOT 2
- Java 9 support HOT 1
- cbt eval throws NPE when defaultScalaVersion is overridden HOT 1
- Scalafix's scalahost dependency should depend on scala version
- improve intellij plugin getting started & docs HOT 8
- scalariform-example fails on Windows 10
- java.lang.NoClassDefFoundError: scala/Option in 'resources-example'
- NPE when compiling simple-fixed (classloader)
- hk2-locator transitive dependency crashes cbt's resolver
- Incorrect finding of $CBT_HOME when cbt symlink is relative HOT 1
- Existence of mains in a class with a parameterful constructor leads to cbt fail HOT 1
- When I type wrong subcommand, both exception stack trace and nice answer is shown
- org.scalajs.core.ir.IRVersionNotSupportedException error for scala.js HOT 1
- NumberFormatException when running cbt in direct mode HOT 1
- Fails to find nailgun jar when it's placed in /usr/share/nailgun/lib/nailgun.jar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbt.