Code Monkey home page Code Monkey logo

generator-jam3's People

Contributors

iranreyes avatar jephuff avatar mattdesl avatar namniak avatar neo avatar njam3 avatar wongbsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-jam3's Issues

Make bower optional

There should be a question if you want to bring in bower if so bower.json shouldn't be setup if the user sais false.

Normalize indentation

All indentation should be using 2 spaces. Mainly important for generated templates.

Devs should be encouraged to install EditorConfig plugin for Sublime/whatever to keep style consistent across projects.

The gruntfile might need special attention since its generation seems more involved.

Gruntfile

We need to prune areas of the Gruntfile based on what the user answered.

eg. don't bring in TexturePacker if the user said they don't want to use TP.

Also do we want to precompile handlebars? As I see it this is maybe a divergence from the way other templating libraries work and really if we begin to work with dynamic data from a backend then we'll need to remove the precompilation anyway.

Install NPM dependencies

This should be based on the users prompts.

The following should be installed no matter what:
'bigwheel'

Based on users answers:
'handlebars'
'vue'
'pixi-ears'

Should things like:
'dom-select'
'dom-style'
etc.

be installed?

Remove transforms when they are not needed

If a project is generated without need for brfs / browserify-shim (and whatever other transforms the generator accumulates down the road) we should not include them in the package.json. This will improve bundle time a little bit.

Restructure js/template/less

I'm proposing we do not create a folder per section, instead, just put the main section less file in the sections folder.

sections/Landing/index.less

becomes

sections/Landing.less

Standardized approach to sprites / texture packing

some ramblings / thoughts on texture packing

  • I've enjoyed having raw sprites in Git, it means you can safely roll back to a commit or tag (i.e. "we know it was working 2 days ago") and the site/icons will work fine
  • some projects are more sprite-sheet heavy though and it might not be good to have them commit huge raw assets to github
  • we should approach retina, scaling, @2x, and such in a standard way. @maxtherocket did some of this on AdBlitz a while back and it worked well for that project
  • I am finding on some WebGL projects that sprites should be split based on texture parameters. For example; we might have a bunch of UI icons that need gl.NEAREST for pixel scaling. Others end up needing gl.LINEAR for smooth scaling. This means we need two texture atlases. Maybe more if we aim to support mipmapping on a subset of textures (like bitmap font glyphs)

Create Initial less structure

/less/
        main.less // main.css 
        reset.less // browser reset codes
        global.less // contains global variables for less
        fonts.less // contains code to import fonts

        /sections/
            /Landing/
                index.less

DOM - VUE - Error in the initialization

When you select dom - vue.

In the Landing/index.js the init function is trying to use document.body before it is ready.

Console will trace:

Uncaught TypeError: Cannot read property 'appendChild' of null

due to:

document.body.appendChild( containerVue );

Clean Up package.json

Can we ensure that only the thing's we're depending on get added to the package.json

Add .gitkeep to asset folders

Currently if one person creates a project using the generator and adds the code to a repo and pushes the assets folders such as images, json, etc are not included.

We need to generate a hidden .gitkeep file in those those folders to ensure those folders are added to the repo.

Start Generator

Start the generator with.
generator-generator

Delete the stuff we don't need with jshint etc.

Handle projects which may have a server

Right now all of the code generates front end specific code. It would be good to separate into two folders. Backend and Frontend if the project needs it.

Two asset folders

Current generator creates two asset folders:

Project/
    assets/
    app/
        assets/

.tp-desktop in less

I'm not sure what this is but theres an entry for .tp-desktop in the main.less file.

This less file should be cleaned up and maybe remove the black and red style.

use strict

use strict statements should be dropped in from templates

Cannot run generator

On running, these are printed to console:

to: wrong arguments
toEnd: wrong arguments

After going through the steps:

events.js:72
        throw er; // Unhandled 'error' event
              ^
AssertionError: /projects/jam3npm/jam3-gen-test/Gruntfile.js doesn't exist
    at EditionInterface.module.exports [as read] (/Users/matt/npm/lib/node_modules/generator-jam3/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/read.js:13:3)
    at Base.Object.defineProperty.get (/Users/matt/npm/lib/node_modules/generator-jam3/node_modules/yeoman-generator/lib/base.js:161:33)
    at module.exports.yeoman.generators.Base.extend.writing.grunt (/Users/matt/npm/lib/node_modules/generator-jam3/generators/app/index.js:235:8)
    at /Users/matt/npm/lib/node_modules/generator-jam3/node_modules/yeoman-generator/lib/base.js:409:16
    at processImmediate [as _immediateCallback] (timers.js:354:15)

The app errors out and then nothing happens, and an empty tasks and test folder is written to the project folder.

osx
node v0.10.36
[email protected]

Unit Tests

Unit tests should be created to test the generated files and content.

For instance the unit test could check that index.js is created and it's content is correct.

Clean up promise tree in init

Currently there's a promise tree being created for init for templates.

It's kind of ugly and should be cleaned up.

        promise.resolve()       
        .then( function() {

            return new promise( function( resolve, reject ) {

                var containerVue = document.createElement( 'div' );
                containerVue.className = 'section';
                document.body.appendChild( containerVue );

                this.vue = new vue( {
                    el: containerVue,
                    data: model[ req.route ],
                    template: fs.readFileSync( __dirname + '/Landing.vue', 'utf8' ),
                    ready: resolve
                });
            }.bind( this ));
        }.bind( this ))     
        .then( done );

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.