Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Changing project template or generator
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Devboy  
View profile  
 More options May 6 2011, 6:00 pm
From: Devboy <dominic.grae...@gmail.com>
Date: Fri, 6 May 2011 15:00:36 -0700 (PDT)
Local: Fri, May 6 2011 6:00 pm
Subject: Changing project template or generator
Hi guys,

I am wondering what would be the best way to change the project
generator to a maven-style directory-structure?
Would other generators, like class-generators, be able to work with
different directory-structures?

Cheers,
Dominic


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Bailey  
View profile  
 More options May 6 2011, 6:54 pm
From: Simon Bailey <si...@newtriks.com>
Date: Fri, 6 May 2011 23:54:04 +0100
Local: Fri, May 6 2011 6:54 pm
Subject: Re: [sprouts-users] Changing project template or generator

Hi Dominic,

Maybe trial out building a custom generator (I did a post on this
http://www.newtriks.com/?p=1084), hopefully the class generators would still
be cool?

Cheers,

Simon

On 6 May 2011 23:00, Devboy <dominic.grae...@gmail.com> wrote:

--
Kind Regards,

Simon Bailey

newtriks.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominic Graefen  
View profile  
 More options May 7 2011, 4:53 am
From: Dominic Graefen <dominic.grae...@gmail.com>
Date: Sat, 7 May 2011 10:53:20 +0200
Local: Sat, May 7 2011 4:53 am
Subject: Re: [sprouts-users] Changing project template or generator

Hi Simon,

I came across your post and was not sure if thats what I was looking for.

It looks like the project-generator is baked into the sprout-as3 command.
So i would need to create a new command.

I also saw that options are available, like --src & --test to specify the paths,
but I would have to append them to every generator i want to use.

In buildr we use so called Layouts to define different directory structures for projects:
http://buildr.apache.org/extending.html#layouts

That might be a nice addon for sprouts.

--
Dominic Graefen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Bayes  
View profile  
 More options May 9 2011, 2:45 am
From: Luke Bayes <lba...@google.com>
Date: Sun, 8 May 2011 23:45:48 -0700
Local: Mon, May 9 2011 2:45 am
Subject: Re: [sprouts-users] Changing project template or generator

Hey Dominic,

There isn't a great solution to this problem in Sprouts yet. As you found,
you have 2 options today.

  1) Create a custom project generator, and then custom class, test and
suite generators.
  2) Pass those same arguments every time you call a generator.

Some additional options that I've considered (and various combinations and
permutations) are:

  1) Serialize any parameters that are used on a project generator and use
those values as the defaults for any subsequent generator runs within the
project. This seemed reasonably simple to implement and understand, but
suffers from some potentially surprising behavior as you move from one
project to another. Then it gets into where to put the serialized generator
data...

  2) Provide an option to 'update defaults' on any generator and share
defaults per-project and/or per-system, similarly to the templates
themselves.

It looks like your layout files provide a DSL for persisting those template
values, maybe there's some way to combine your approach with regular command
line usage?

Ideas or thoughts welcomed -

Thanks!

Luke

On Sat, May 7, 2011 at 1:53 AM, Dominic Graefen
<dominic.grae...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominic Graefen  
View profile  
 More options Jun 15 2011, 9:11 am
From: Dominic Graefen <dominic.grae...@gmail.com>
Date: Wed, 15 Jun 2011 15:11:57 +0200
Local: Wed, Jun 15 2011 9:11 am
Subject: Re: [sprouts-users] Changing project template or generator

Hi Luke,

sorry that I am coming back to this so late.

I would love to have some system in sprouts to support different directory-layouts for projects.
A possibility to achieve this would be through the use of configuration files in the project directory,
maybe project/.sprouts/config.rb. If that file is not found we could fallback to ~/.sprouts/config.rb.
Or load both and let the project-config overwrite the system-config.

I've attached the Layout class from buildr so you can have a look at it.

--
Dominic Graefen

  layout.rb
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Bayes  
View profile  
 More options Jun 15 2011, 1:33 pm
From: Luke Bayes <lba...@google.com>
Date: Wed, 15 Jun 2011 10:33:41 -0700
Local: Wed, Jun 15 2011 1:33 pm
Subject: Re: [sprouts-users] Changing project template or generator

Hey Dominic,

Thanks for following up!

The lateness is actually appreciated as now is a better time (for me) to
work on this issue. :-)

I like the direction you're taking with project-specific settings falling
back to user account settings.

As far as naming goes, I'd prefer to indicate that these settings are
associated with 'generators' rather than just 'sprouts'.

Maybe it could be something like:

[PROJECT]/.sprouts/generator_config.rb

For user home settings, I found that it's helpful to store this kind of
information behind a versioned folder so that new versions of Sprouts can
break compatibility without behaving in unexpected ways. I try hard not to
change second-tier revisions unless something significant changed.

So I'd rather see a home dir solution that looks more like:

[USER_HOME]/.sprouts/[SPROUT_VERSION].[SPROUT_REVISION]/generator_config.rb
    e.g. /Users/lbayes/.sprouts/1.1/generator_config.rb

As with Executable locations, we could also support environment vars - which
I believe would supersede both of the previous options. Maybe somthing like:

SPROUT_GENERATOR_CONFIG=/path/to/your/config

This could be provided on the command line, exported from
.bash_profile/.bashrc or set in the system registry if that's how you roll.

I'm open to other names too... Any ideas appreciated.

I considered:

* generators.rb: This seemed too general to me, I like your use of the
'config' term.
* gen_config.rb: This seemed too terse

Other ideas?

Thanks,

Luke

On Wed, Jun 15, 2011 at 6:11 AM, Dominic Graefen
<dominic.grae...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominic Graefen  
View profile  
 More options Jun 15 2011, 2:09 pm
From: Dominic Graefen <dominic.grae...@gmail.com>
Date: Wed, 15 Jun 2011 20:09:28 +0200
Local: Wed, Jun 15 2011 2:09 pm
Subject: Re: [sprouts-users] Changing project template or generator

Hey,

my naming and path-directories were just quickly made up and can be changed at your will :)
Versioning the directories is a good idea to keep older versions working.

I wouldn't put the configuration on the generators level, as directory layouts would also matter to the rake builds.
When we got layouts like this we could also split up the generators for source files and Rakefiles/buildfiles, so they can be generated seperatedly,
this would open the door to bring support for other build-systems like Ant, Maven or Buildr.

Personally I like having default locations/directories for application-configs because i don't need to set anything up.
And keeping track of ENV vars is a pain in the ass :) but using it to overwrite the default config is a way for users to do something out-of-the-box.

If you want to team up on this I would love to help out.

Cheers,

--
Dominic Graefen

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Bailey  
View profile  
 More options Jun 15 2011, 2:30 pm
From: Simon Bailey <newtr...@googlemail.com>
Date: Wed, 15 Jun 2011 19:30:56 +0100
Local: Wed, Jun 15 2011 2:30 pm
Subject: Re: [sprouts-users] Changing project template or generator

This all sounds cool, if I can muck-in in any way even if its testing etc please holla as I would like to keep updated on progress of this and I think it would help further my understanding of sprouts plus ruby and rake?

--
Cheers,

Simon
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »