Copy third party javascript files in play framework

I'm trying to configure my build.sbt file so that I can have third party javascript library outside my app directory and just move them to /public when I compile. Better yet, I'd like to add them to the asset compiler pipeline and have them end up in the resource_managed folder after I build.

I've tried to add the following to my settings

javascriptEntryPoints <<= (sourceDirectory in Compile)(base =>
    base / "vendor" / "myjslibrary" / "js" ** "*.js"
)

I can't really tell what this does (if it does anything at all). Can someone help me debug this?

Thanks!

Answers


It adds a path to the list of places where the js compiler would look for javascript files.

To construct that path it depends on "sourceDir in Compile" which probably is app/ and then appends "vendor/myjslibrary/js" to that and then says that it should match every js-file under that directory, so any file matching "*.js" under "app/vendor/myjslibrary/js/" and its subdirectories.


Need Your Help

Create context menu based on listview

android listview

I would like to do a program such that when there is a long-click on my listview, there will be a menu of options for users to choose. I have searched and found out that I can do what I want using