GithubHelp home page GithubHelp logo

Comments (10)

justin808 avatar justin808 commented on June 24, 2024

@rupurt As a workaround, just create an empty file right now.

If you could submit a PR for your enhancement, we'd take it!

from react_on_rails.

rupurt avatar rupurt commented on June 24, 2024

@justin808 that's what I did 😄

I'll see if I have some time to take a stab at it over the weekend.

from react_on_rails.

robwise avatar robwise commented on June 24, 2024

@rupurt That would be awesome! Definitely take a look at the lib/generators/react_on_rails/base_generator.rb file, as I believe this may be the right place for this logic. We could also try putting this logic inside of the config/initializers/react_on_rails.rb initializer, although I'm not sure if that work and/or maybe that's not a solution for your specific scenario.

from react_on_rails.

yorzi avatar yorzi commented on June 24, 2024

Generator raises error when application.css.scss is not found as well (in our case we use application.scss), I think it's a similar issue. It might be good to be able to config these files in initializer.

from react_on_rails.

robwise avatar robwise commented on June 24, 2024

@yorzi I would say this issue is an enhancement, whereas yours is closer to a bug. I have therefore made a separate issue: #86

from react_on_rails.

yorzi avatar yorzi commented on June 24, 2024

@robwise 👍 I can look into that today.

from react_on_rails.

justin808 avatar justin808 commented on June 24, 2024

@yorzi Would be awesome if you can submit a PR to fix the missing files!

from react_on_rails.

justin808 avatar justin808 commented on June 24, 2024

@robwise Can we close this one?

from react_on_rails.

robwise avatar robwise commented on June 24, 2024

@justin808 negative, I fixed a different issue that was with the application.scss, not js. This issue will still occur. I can come up with a fix if you want.

  1. We can allow passing an argument to specify a different file than application.js
  2. We can simply create an application.js file if it is missing

The latter solution would not actually really fix @rupurt's problem, though, but it would at least let the generator run through completion by default instead of essentially forcing him to figure out that he needs to make his own application.js file, run the generator, and then move the code manually to where he wants it.

from react_on_rails.

justin808 avatar justin808 commented on June 24, 2024

@robwise I vote for 2) with a warning as the user will see the diff and can take appropriate action.

from react_on_rails.

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.