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

Failed to generate single outFile #1

Closed
1tchy opened this issue Oct 14, 2014 · 8 comments
Closed

Failed to generate single outFile #1

1tchy opened this issue Oct 14, 2014 · 8 comments
Milestone

Comments

@1tchy
Copy link

1tchy commented Oct 14, 2014

The option outFile doesn't seem to create the expected single JS-file.
Although if this option is specified, all other JS-files are not created.

Following you can find an example based on the "complicated"-Test:

build.sbt:

import com.arpnetworking.sbt.typescript.Import.TypescriptKeys._

lazy val root = (project in file(".")).enablePlugins(SbtWeb).settings(
  JsEngineKeys.engineType := JsEngineKeys.EngineType.Node,
  outFile := "myfile.js",
  outDir := "path"
)

libraryDependencies += "org.webjars" % "bootstrap" % "3.0.2"

test:

> assets
$ absent target/web/typescript/main/javascripts/animal.js
$ absent target/web/typescript/main/javascripts/mammal.js
$ absent target/web/typescript/main/javascripts/human.js
$ exists target/web/typescript/path/myfile.js
@BrandonArp
Copy link
Member

Thanks for the report. It's going to be a bit tricky to get this solved. It looks like the built-in jsengine tasks aren't well suited for this kind of task (multiple source files to generate a single output file). I'm going to have to think about how to make this work. If you have any ideas, please let me know.

@1tchy
Copy link
Author

1tchy commented Oct 14, 2014

I'm not really into it. But it looks like the sbt-concat-plugin does something similar. Maybe you can have a look there.

@fernandezpablo85
Copy link
Contributor

You can use both sbt-concat and this plugin to generate the single js file you want.

@BrandonArp
Copy link
Member

@1tchy Are you still wanting this feature? With the work done on 0.1.5 I think it's now possible to do it, but I'd rather not spend time on the feature if nobody will use it.

@1tchy
Copy link
Author

1tchy commented May 20, 2015

Thanks for asking. I would have used it for a specific project, however this project is done and so I currently have no more need for this.

@BrandonArp BrandonArp added this to the 1.0 milestone May 20, 2015
@joost-de-vries
Copy link

This would be a very useful feature. Do you have an idea what needs to be done? I can add a helping hand.

@akauppi
Copy link

akauppi commented Oct 13, 2015

Today's the 1st birthday of this issue! 🍰

@rockneurotiko
Copy link

Yay!!!! 🍰

DomBlack added a commit to DomBlack/sbt-typescript that referenced this issue Aug 10, 2016
 - All input files now point to the same output file
 - Added `AllowJS` compiler flag, as this is useful for projects using outFile
 - Added `typingsFile` option to allow typings files to be written for older JS code being included in the single file output
BrandonArp pushed a commit that referenced this issue Aug 15, 2016
* Fixed single outFile generation (#1)

 - All input files now point to the same output file
 - Added `AllowJS` compiler flag, as this is useful for projects using outFile
 - Added `typingsFile` option to allow typings files to be written for older JS code being included in the single file output

* Added scripted test for single-outfile fixes
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

No branches or pull requests

7 participants