Yeoman scafolding

Hi,

With the new 2.5 release comes a option to create bootplate with yeoman and end up with a 'build' environment.
This is already a improvement over the github bootplate cloning but it stil has some issues.

- If I want to use some code repository ( Git / SVN / etc ) I still end up with all the enyo / layout / onyx code in my repository. I'd like to be able to commit my work, and 'assemble' the enyo environment around it.

- switching versions seems not possible

to achieve the first goal I've created a project on git which uses grunt to setup the enyo environment around a project in e.g. git. https://github.com/semanticfire/enyo-grunt-skeleton
this can also be wrapped in Maven for integration in e.g. Jenkins
https://github.com/semanticfire/enyo-grunt-maven-skeleton

I'm not aware I could do the same with the yeoman setup.

Bart

Comments

  • Hi Bart,

    What the yeoman generator creates for you is essentially a customized EnyoJS bootplate, not unlike the bootplate github repo (in fact many of the files come from there).

    The format that the yeoman generator creates the bootplate is Bower-centric. It sets the bower component directory as /lib/. The libraries (onyx, layout, ilib, etc.) are installed via bower to there and a /bower.json configuration is automatically created.

    So, using bower, we can actually do the "assembly" you mention. You can add /lib/ to your gitignore even. Then when the repo is downloaded, al you need to do is:
    bower install
    And all the libraries (even according the version settings) will be installed.

    Obviously this still leaves /enyo/ folder with the Enyo framework itself, and indeed that is a next step we're persuing, relocating it in a future release into /lib/enyo/ so an entire bootplate can be assembled as simply.

    Worth noting, with the libraries, our yeoman generator features a nifty little enyo:lib tool, wherein you can add or remove any bower package, git repo, svn, etc. (also updating the bower.json for assembly :smile: ). For example:

    // all first-party libraries are mapped for easy add/remove
    yo enyo:lib moonstone
    // removes a library with -r tag
    yo enyo:lib -r layout
    // bower package
    yo enyo:lib --remote=jquery
    // git or svn url
    yo enyo:lib --remote=http://github.com/somepath/somerepo.git locallibname

    And about switching versions, that's supported too. :smile: While Bower version install/update commands for specific versions/tags/etc. works perfectly fine on libraries, there's a simpler method included within the yeoman generator.

    yo enyo:update -b=

    That'll update (or downgrade) Enyo framework and all first-party libraries (onyx, layout, moonstone, etc.) to a specific version. If the -b/--build flag is absent, it'll update to the current default stable release. If you want the latest version release (regardless of stability state), you can include a -l/--latest flag.

    Hope that helps explain some of the nice bonuses of generator usage; it's still a new tool so there's a lot to advertise that may be less obvious.

    If you have any questions or input, would love to hear it.
  • Did you look at my approach ?

    can you provide a simple "hello world" git repo which I can clone and assemble enyo + libs inside ? like you can do with my repo ?

    Since I couldn't get that working with above samples
  • edited January 2015
    Hi,

    Yes, I saw your repo, and it is a good approach on its own as a grunt-based initialization layer. The reason we chose Bower over that approach was its modularity, simplicity and expandability with a growing third party ecosystem.

    As an example, here's a created a generic HelloWorld bootplate from the Yeoman generator
    https://github.com/JayCanuck/yeoman-bootplate-helloworld

    Then you just need to do the command bower install and all the libraries (first party and third party) will be installed.

    As I mentioned before, the enyo folder isn't hooked into the system yet (and thus needs to be included in full on a repo for now), though will be added when it's relocated to /lib/enyo
Sign In or Register to comment.