Coder Social home page Coder Social logo

Comments (7)

ferrarafer avatar ferrarafer commented on August 11, 2024 1

@akifarhan I will tackle this improvement next week.

from stacked.

ferrarafer avatar ferrarafer commented on August 11, 2024 1

Hi @akifarhan, I just saw the message and already pushed the PR.

To test the changes locally I usually do the following:

dart bin/stacked.dart generate

Take into account the example above suppose you are at the root of the project of the cli package. If not, adapt the path for the bin folder to your needs.

from stacked.

FilledStacks avatar FilledStacks commented on August 11, 2024 1

@akifarhan this has been merged into the cli

from stacked.

FilledStacks avatar FilledStacks commented on August 11, 2024

Thanks for adding the issue @akifarhan

from stacked.

ferrarafer avatar ferrarafer commented on August 11, 2024

@akifarhan @FilledStacks I'm not sure of this feature, generated code is not intended to be read and, because of that, I don't see why it should respect the format style of the project. The generated code could be obfuscated, which should not be a problem for us.

It is just an opinion, what do you think of this?

from stacked.

akifarhan avatar akifarhan commented on August 11, 2024

Thank you for the feedback @ferrarafer . I understand that generated code is primarily intended for functionality rather than readability. However, I have some concerns regarding the current behaviour:

  1. Existing behaviour in stacked create app: The stacked create app command includes a dart format step to format files according to the specified line length. This indicates an intention to ensure the newly created files follow the project's formatting guidelines including the generated code.

  2. Consistency: When I run the stacked generate command, I encounter unnecessary file changes where the generated code doesn't adhere to the specified line length. This inconsistency requires manual dart format in the development workflow to indicate that there's no changes to the generated code except for the styling format, which can be cumbersome

I believe integrating a formatting step into the stacked generate command would enhance the overall developer experience and maintain consistency across the codebase.

from stacked.

akifarhan avatar akifarhan commented on August 11, 2024

Thank you @ferrarafer ! Appreciate it. I would like to contribute and I've already created a PR but am having difficulties testing it locally.

I've tried this:
dart pub global activate --source path .

But received this error whenever I tried to run stacked commands.
FormatException: Could not parse ""/Users/akif/development/packages/stacked-org/cli"".

I appreciate it if you could help me to test it locally.

from stacked.

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.