Giter VIP home page Giter VIP logo

react-grails-asset-pipeline's Introduction

peh

react-grails-asset-pipeline's People

Contributors

peh avatar tobia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-grails-asset-pipeline's Issues

Support for CoffeeScript

Thank you for writing this plugin.

Would you consider supporting CoffeeScript JSX components (CJSX) as specified by this transformer?

I found out about it because it's supported by React's official Sublime Text support package and I'm a big fan of CoffeeScript, so I'd love to use that as a language for JSX. It really cuts down on verbosity.

Hard-coded environment in ReactTagLib

This line in ReactTagLib:

def debugMode = (conf.allowDebugParam && debugParameter) || 
                (Environment.current == Environment.DEVELOPMENT && 
                    !grailsApplication.warDeployed && conf.bundle != true)

does not take into consideration custom environments.

Medium- to large-size Grails apps have many environments, used for various development purposes, testing, QA, demos, or different kinds of production deployments.

The standard plugins are aware of this and only use the three default environments to set the default values of their configuration variables, never directly their behaviour.

In this case I suggest removing the environment check and leaving the others, which should suffice:

def debugMode = (conf.allowDebugParam && debugParameter) || 
                (!grailsApplication.warDeployed && conf.bundle != true)

Enable JS minimization

It seems to me that when building the war file, JSX resources are not minimized, while JS ones are.

Right now I'm writing my components as *.jsx files, having one of them (called Main) include the others with asset pipeline include comments, and referencing it from the GSP page with:

<asset:reactTemplate src="Main.jsx"/>

This works both in run-app and war, but the compiled version in the war is not minimized.

Should I organize or include my JSX files differently? Or is this feature not here yet? Can you piggyback on the regular asset pipeline minimization procedure?

Pipeline not working on test environment

Hi. Your plugin worked on fine on development. But when I exported test war and deployed it, it seems that jsx files are not complied.

For example, I had this file editor.js with just these two lines:

//= require jsx/title.jsx
//= require jsx/root.jsx

That worked on development, and I would get separated compiled js files. Now, on test war, I expected they should be packed in editor.js and minified, but this is how my editor.js looks:

//# sourceMappingURL=editor.js.map

I would expect bunch of minifed code below this first line (like application.js).

How do I enable the harmony option?

Also, why does :react-asset-pipeline:1.1.1 depend on another plugin net.errbuddy.plugins:react-asset-pipeline:1.0.7 with a different version that is taken from a custom MVN repo?

That's a bit convoluted. Wouldn't it be easier to just package all the classes you need in this plugin?

require_tree does not pick up JSX files

I tried using the following line in a JSX file, to include all files from a folder of components, but it doesn't work:

// =require_tree widgets

The same line in a .js file works fine.

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.