Giter VIP home page Giter VIP logo

Comments (2)

JGeek00 avatar JGeek00 commented on September 16, 2024 2

🤔 I think I misunderstood the instructions. I thought that after adding a custom script you had to run rps gen to "consolidate" the changes. I was running that command without having it declared on the pubspec.yaml. Now I have declared my custom script and everything works fine.

from rps.

gonuit avatar gonuit commented on September 16, 2024

Hi @JGeek00 👋🏻 ,

Do you have a gen script defined in your pubspec.yaml file?

For this to work, you must define the scripts of your choice yourself.
As an example, your pubspec.yaml file might look as follows:

name: my_great_app
description: My great app!
publish_to: "none"

version: 1.0.0+1

scripts:
  run: "flutter run"
  gen: "flutter pub run build_runner build --delete-conflicting-outputs"
  watch: "flutter pub run build_runner watch --delete-conflicting-outputs"   

environment:
  sdk: ">=2.18.0 <3.0.0"

dependencies:
  json_annotation: 4.6.0

dev_dependencies:
  build_runner: ^2.2.1

flutter:
  uses-material-design: true

  assets:
    - assets/images/

Now you can use the rps, rps run, rps gen and rps watch commands 🕵🏻


It is also possible that you have nested the gen script under the run key. I do not recommend it, but it will work, and then calling rps gen is not possible, as it is nested under the run key.

If so, this is a change that should be made:

scripts:
-  run:
-    gen: "flutter pub run build_runner build --delete-conflicting-outputs"
+ gen: "flutter pub run build_runner build --delete-conflicting-outputs"

Let me know if this works for you 🤙🏻

from rps.

Related Issues (15)

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.