Skip to content

pub package manager support for new project template #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Jun 5, 2015 · 18 comments
Closed

pub package manager support for new project template #34

DartBot opened this issue Jun 5, 2015 · 18 comments
Assignees
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/406015?v=3" align="left" width="96" height="96"hspace="10"> Issue by dhconnelly
Originally opened as dart-lang/sdk#2432


Per the discussion of the Dart package manager, I'm requesting an additional "pub" command to create a new project with a standard layout and files.

Use:

pub new awesome_app

This will create a folder named "awesome_app" with:

  • a package description/dependencies file (correctly configured, so if a package needs to declare its own version in addition to declaring its dependencies, this is already filled-in);
  • a packages directory;
  • an awesome_app.dart program, or whatever;
  • etc.

Extensions:

Maybe supports "client", "server", "both" sub-commands so that these project types can be autogenerated appropriately (including io or html or json libraries, etc).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Removed Type-Defect label.
Added Type-Enhancement label.

@DartBot DartBot added type-enhancement A request for a change that isn't a bug closed-not-planned Closed as we don't intend to take action on the reported issue Priority-Medium labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/713530?v=3" align="left" width="48" height="48"hspace="10"> Comment by chrisbu


Similar to issue #35, it would be great if the functionality described above was available to apps by being able to #import pub itself and call functions on pub directly.

 (Ok, as a workaround, you could just start pub as a process from another dart script).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl


Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1148886?v=3" align="left" width="48" height="48"hspace="10"> Comment by butlermatt


This discussion is turning interesting. The package manager seems to be converting to a general purpose framework controller, similar to Rails, Padrino, etc. So as oppose to just a 'gems' functionality, we're creating projects, running a development web server, deploying/finalizing scripts and compiling/minifying. Would this functionality then become integrated with the Dart editor (either adding new functionality or replacing the current existing functionality). I'm certainly not against this direction, however if it is the direction you'll be taking then you may want to consider other features they provide as well from the get go (MVC generation, console servers, etc) rather than seeming like you're just tacking on cool features. Already with serve and deploy commands it seems to be becoming more than just a package manager (at least of the ones I've used, gems and cpan), and more of an all encompassing project manager which, as a subset, also handles/manages the packages of a project. Again, I'm not against the idea, just think that if it's the direction you're going it should be considered that from the beginning and designed as such.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added this to the Later milestone.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Issue #338 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/67586?v=3" align="left" width="48" height="48"hspace="10"> Comment by pq


FWIW: I'm in the process of porting the editor's project template creation to dart (dartbug.com/7856) with an eye towards providing a simple stand-alone commandline tool for quick and easy project bootstrap. If that would meet your needs, feel free to merge this request into that one. In the long run, I'd love to see this tool (and possibly pub too) behind some kind of framework controller (a la the go command --- http://golang.org/doc/articles/go_command.html).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Set owner to @pq.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


At today's hackathon a team struggled because they put their unit tests under the "tests" directory instead of the pub required "test" directory. They wasted a lot of time confused by an import error. Perhaps if pub auto-populated the directory structure this could have been avoided.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


I think it could work like leiningen for clojure (https://github.com/technomancy/leiningen).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This comment was originally written by [email protected]


All I want from this is to generate a bare-bones pubspec.yaml, kind of like npm init in node.js.

I basically want just enough that "pub install" works with all available fields provided.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl


Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl


Removed Oldschool-Milestone-Later label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #1110 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


We'll encourage the community and tools to deliver this.


Added NotPlanned label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #1110 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #1135 has been merged into this issue.

@Zectbumo
Copy link

git clone https://github.com/Zectbumo/dart-enchilada my_project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants