Code Monkey home page Code Monkey logo

tapestry-react's People

Contributors

gitter-badger avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jochenberger avatar ydylla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tapestry-react's Issues

Example of using third-party components

How would I add dependencies to the project so I could import existing components? Assuming this is possible, it would be great if the sample/test application did this.

ES6 modules should be transpiled to AMD modules

As Tapestry uses RequireJS, we should output React resources that use the ECMAScript 6 module system as AMD modules. The babel transpiler supports that, so that isn't a problem.
However, there might be a problem if we start running AMD modules through the AMD formatter: babel/babel#2416
We could try to detect the usage of "define", "import" and "export", use the respective options for babel, and force the user to choose a module system if we find both in a single file, but that's probably going to lead to false alerts if the terms are used with a different meaning or inside comments.
The best solution I can come up with right now is to use different file extensions (maybe .jsx and .jsx6) and only run the .jsx6 files through the AMD formatter.

In production, the debug/development code should be disabled

As we always add the unminified assets as modules, the debug code stays in the files in production mode. Unfortunately, there is no unminified production distribution (facebook/react#5242), so if we want to be able to use unminified resources in production, we need to strip the debugging code from the react.js file ourselves. Maybe a global replace of "development" !== 'production' by "production" !== 'production' will do the trick.

Rhino compiler can fail to compile modules if default charset is not UTF-8

The problem is in https://github.com/apache/tapestry-5/blob/5.4.1/tapestry-webresources/src/main/java/org/apache/tapestry5/internal/webresources/RhinoExecutorPool.java#L146, which creates a Reader without specifying a Charset. This causes trouble on Windows machines when trying to read the browser.js bundle, which contains unicode characters.
Error message:

017-01-09 14:55:35,224 [pool-3-thread-3] ERROR o.a.t.i.Registry - SyntaxError: Invalid range in character class. (classpath:de/eddyson/tapestry/react/services/browser.js#490)
2017-01-09 14:55:35,224 [pool-3-thread-3] ERROR o.a.t.i.Registry - Operations trace:
2017-01-09 14:55:35,225 [pool-3-thread-3] ERROR o.a.t.i.Registry - [ 1] Compiling classpath:XXX from JSXM to JavaScript
2017-01-09 14:55:35,225 [pool-3-thread-3] ERROR o.a.t.i.Registry - [ 2] Creating Rhino executor for source(s) classpath:de/eddyson/tapestry/react/services/browser.js.
2017-01-09 14:55:35,225 [pool-3-thread-3] ERROR o.a.t.i.Registry - [ 3] Loading script classpath:de/eddyson/tapestry/react/services/browser.js.
2017-01-09 14:55:35,231 [pool-3-thread-3] ERROR d.e.t.m.M.MinificationCacheWarming - Error requesting minified stack XXX for locale XXX
org.apache.tapestry5.ioc.internal.OperationException: SyntaxError: Invalid range in character class. (classpath:de/eddyson/tapestry/react/services/browser.js#490)

Invalid babel preset error if stage 3 transformations enabled

If I enable the babel stage 3 transformations ENABLE_STAGE_3_TRANSFORMATIONS, the transformation throws the following error:

Caused by: java.lang.RuntimeException: Error: Invalid preset specified in Babel options: "stage3"
	at de.eddyson.tapestry.react.services.impl.NodeBabelCompiler.compile(NodeBabelCompiler.java:79)
	at $BabelCompiler_17eea7322f01a9.compile(Unknown Source)
	at de.eddyson.tapestry.react.services.impl.BabelResourceTransformer.transform(BabelResourceTransformer.java:69)
	at org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl$1$1.perform(ResourceTransformerFactoryImpl.java:143)
	at org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl$1$1.perform(ResourceTransformerFactoryImpl.java:139)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)
	... 92 more

The reason is a typo in preset name in babel-compiler-wrapper.js. It has to be stage-3 and not stage3.

Drop Java 7 support

Java 7 reached EOL more than 2 years ago, we should no longer consider compatibility a requirement.
If you use this library in a Java 7 environment and cannot upgrade, please let us know.
cc @felixgonschorek, @benweidig

React addons are not available

The React addons are not available. I'd prefer having a separate react/addons module but that is not available (facebook/react#5243). On the other hand, the reactcomponent module depends on the react module, so if we just add a react-with-addons module, we'll probably load all the things twice. We could add a symbol to toggle, whether to add the react.js or the react-with-components.js assets as "react" module. The current workaround would be to override the ModuleManager contribution.

0.35.0 artifacts not available in jitpack.io

Hi Jochen,

we are currently in the process of upgrading our projects to tapestry 5.8
We wantet to upgrade our dependency on tapestry-react to v0.35.0, but it seems the build in jitpack had a timeout - we can't download the dependency in our projects.

The build for 0.35.0 seems to have been successful, but in the end there is a timeout, we think that has been the deployment container that would have published the artifact.

Thank you if you find the time to look afters this issue!
Cheers
Felix

jitpack log of 0.35.0 build: https://jitpack.io/com/github/eddyson-de/tapestry-react/v0.35.0/build.log

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.