Giter Club home page Giter Club logo

generator-yui3's Introduction

(NOT STABLE YET)

A Yeoman generator for YUI3 Projects

Installation

sudo npm install -g generator-yui3

Create project

yo yui3 awesomeProject

.generator-yui3.json

Allow you to overwrite default configuration

{
   "project" : "awesomeProject",
   "lang" : ["fr", "en", "es", "de"]
}

This generator scaffold the following YUI3 project structure :

awesomeproject
└── src
    └── awesomeproject-loader
        ├── build.json
        ├── js
        │   └── awesomeproject.js
        ├── scripts
        │   └── meta_join.js
        └── template
            └── meta.js

Create module

yo yui3:module <module_name>

Add template to an existing module <template_name> is optionnal

yo yui3:addtemplate <template_name>

Add lang to an existing module

Without arguments the scaffolder creates all the lang setted in the .generator-yui3.json.

yo yui3:addlang

or

yo yui3:addlang <lang1,lang2>

Use yo yui3:build-module to shift the module

This can be use whenever you are in the module (js, assets, build, meta, ...)

yo yui3:build-module

internals tasks for Shifter

compile handlebars template

yo yui3:handlebars

generator-yui3's People

Contributors

benng avatar charlypoly avatar paulrbr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

generator-yui3's Issues

warnings when trying to add template - missing ruby script?

I'm trying to add templates via $yo yui3:addtemplate in one of my module directories. It seems to work just fine, save for throwing some warnings when i run the $yo yui3:build-module. The first is probably innocuous (duplicate template warning, seems to overwrite fine). The second is a little troubling though, involiving a postexec shifter clean script? Perhaps that should be packaged next to meta_join.js?

$yo yui3:build-module

... shifter stuff seems to work fine ...
stderr: shifter [err] start stderr output from "/path/to/.nvm/v0.11.12/bin/yo" yui3:handlebars

identical templates/navigation-menu.js

shifter [err] end stderr output from "/Users/derekadair/.nvm/v0.11.12/bin/yo" yui3:handlebars
shifter [err] start stderr output from "/usr/bin/ruby" ../../../../../../script/post_shifter_cleaner.rb

/usr/bin/ruby: No such file or directory -- ../../../../../../script/post_shifter_cleaner.rb (LoadError)

shifter [err] end stderr output from "/usr/bin/ruby" ../../../../../../script/post_shifter_cleaner.rb

warnings when trying to add template - missing ruby script?

I'm trying to add templates via $yo yui3:addtemplate in one of my module directories. It seems to work just fine, save for throwing some warnings when i run the $yo yui3:build-module. The first is probably innocuous (duplicate template warning, seems to overwrite fine). The second is a little troubling though, involiving a postexec shifter clean script? Perhaps that should be packaged next to meta_join.js?

$yo yui3:build-module

... shifter stuff seems to work fine ...
stderr: shifter [err] start stderr output from "/path/to/.nvm/v0.11.12/bin/yo" yui3:handlebars

identical templates/navigation-menu.js

shifter [err] end stderr output from "/Users/derekadair/.nvm/v0.11.12/bin/yo" yui3:handlebars
shifter [err] start stderr output from "/usr/bin/ruby" ../../../../../../script/post_shifter_cleaner.rb

/usr/bin/ruby: No such file or directory -- ../../../../../../script/post_shifter_cleaner.rb (LoadError)

shifter [err] end stderr output from "/usr/bin/ruby" ../../../../../../script/post_shifter_cleaner.rb

$myProject/myModule : yo yui3:addlang

Add lang to current module

this command will update meta file and add files into lang/ folder

Example :

$myProject/myModule> yo yui3:addlang de,en,es
$myProject/myModule> "module updated !"

add SASS support

warning

SASS needs ruby.
We'll need to check that sass command exists from node code.

Generation of js file fail when name contain at least a '-'

La création d'un module avec, par exemple le nom "test-module", rend la compression uglify impossible.

Fixer la ligne
"var <%= _.capitalize(name) %> = new Y.Base.create("<%= name %>", Y.Base, [], {"

capitalize('test-module') donne Test-module (qui n'est pas un nom de variable valide)

$myProject/myModule : yo yui3:addtemplate

par defaut "yo yui3:addtemplate" créer un fichier myModuleName.handlebars.html dans le dossier myModuleName/templates.

"yo yui3:addtemplate qqchose" créer un fichier myModuleName-qqchose.handlebars.html dans le dossier myModuleName/templates.

yo yui3:info

give some info about the current entity (project or module)

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.