Code Monkey home page Code Monkey logo

Comments (5)

danielberndt avatar danielberndt commented on May 15, 2024

Here's a different module setup where the issue occurs as well: https://github.com/danielberndt/play-requirejs-submodule-demo

from playframework.

wsargent avatar wsargent commented on May 15, 2024

Verified under 2.1.3-RC1.

➜  play21-assets-module git:(master) ✗ play stage
[info] Loading global plugins from /Users/wsargent/.sbt/plugins
[info] Loading project definition from /Users/wsargent/work/play21-assets-module/project
[info] Set current project to play21-assets-module (in build file:/Users/wsargent/work/play21-assets-module/)
[info] Packaging /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/play21-assets-module-assets_2.10-1.0-SNAPSHOT-sources.jar ...
[info] Packaging /Users/wsargent/work/play21-assets-module/target/scala-2.10/play21-assets-module_2.10-1.0-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Wrote /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/play21-assets-module-assets_2.10-1.0-SNAPSHOT.pom
[info] Wrote /Users/wsargent/work/play21-assets-module/target/scala-2.10/play21-assets-module_2.10-1.0-SNAPSHOT.pom
[info] Packaging /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/play21-assets-module-assets_2.10-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] RequireJS optimization has begun...
[info] app.build.js:
[info] ({appDir: "javascripts",
[info]           baseUrl: ".",
[info]           dir:"javascripts-min", modules: [{name: "main"}]})
[info] Generating Scala API documentation for main sources to /Users/wsargent/work/play21-assets-module/target/scala-2.10/api...
[info] Packaging /Users/wsargent/work/play21-assets-module/target/scala-2.10/play21-assets-module_2.10-1.0-SNAPSHOT.jar ...
[info] Done packaging.

Tracing dependencies for: main
Uglifying file: /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/classes/public/javascripts-min/helper/lib.js
Uglifying file: /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/classes/public/javascripts-min/main.js
Uglifying file: /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/classes/public/javascripts-min/test.js
Uglifying file: /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/classes/public/javascripts-min/test2.js

main.js
----------------
helper/lib.js
main.js

[info] RequireJS optimization finished.
[info] Packaging /Users/wsargent/work/play21-assets-module/modules/assets/target/scala-2.10/play21-assets-module-assets_2.10-1.0-SNAPSHOT.jar ...
[info] Done packaging.
model contains 17 documentable templates
[info] Scala API documentation generation successful.
[info] Packaging /Users/wsargent/work/play21-assets-module/target/scala-2.10/play21-assets-module_2.10-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info]
[info] Your application is ready to be run in place: target/start
[info]
[success] Total time: 9 s, completed Jul 30, 2013 3:31:43 PM

from playframework.

huntc avatar huntc commented on May 15, 2024

Verified as failing?

from playframework.

wsargent avatar wsargent commented on May 15, 2024

Yes, verified as failing.

On Tuesday, July 30, 2013, Christopher Hunt wrote:

Verified as failing?


Reply to this email directly or view it on GitHubhttps://github.com//issues/847#issuecomment-21836104
.

from playframework.

jroper avatar jroper commented on May 15, 2024

Right, so the reason for this is primarily that Play's start command is a hack.

Play's start command tries to run the app in production mode without building any of the production artifacts (eg jar files), rather it adds the classes directories from each sub project to the classpath. Play's requireJs support is configured to run before the jar file is built.

The reason why it works for the root project is that we have a hack in the Play start command that explicitly runs it for the current project.

I think we could make this work by running the requireJs optimisation task for all aggregated projects, not just the current project, and that would fix this specific issue. But it wouldn't fix any other processing (eg gzip/md5 etc) that Play doesn't know about, and so also wouldn't work with the work we're doing now to pull client side tech support out of the core of Play.

I think the better fix to this would be to rewrite the play start command so that instead of using a completely different environment to the other prod modes, it first runs play stage, and then runs the start script produced by play stage. This will solve far more than just this issue.

I've raised a new issue here:

#2108

from playframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.