experience-monks / generator-jam3 Goto Github PK
View Code? Open in Web Editor NEWThis is a generator for Jam3 projects
License: MIT License
This is a generator for Jam3 projects
License: MIT License
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.
We should get rid of the .tmp folder. And just have a dev and release folder.
/ui/
/landing/
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.
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.
Release builds would just overwrite files in that folder for the minified versions.
There should be stubbed in code for using the templates and models together in the init functions.
yo jam3:ui 'uiElementName'
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?
Since I haven't seen how this is done lately on projects I look for you @jmckinnell and @miguelmoraleda to set this up.
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.
/app/
index.html
bundle.js
main.css
/assets/
/json/
/images/
/video/
/etc/
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
I'm not sure that the project name should be entered via a prompt.
You need to start with an empty folder anyways. Why not pull the project name from there?
some ramblings / thoughts on texture packing
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)No .gitignore was generated
Create prompts that will save the users answers to the config:
http://yeoman.io/authoring/storage.html
Other functions/generators will then read the config for templating etc.
/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
Guys,
Lets define the list here: https://github.com/Jam3/generator-jam3/wiki/Project-Dependencies
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 );
I think it will happen only if the user is using bower. or using deps in the old libs way.
Currently all the template files are stored in a templates folder with one index.js file that pulls it all together.
There was some discussion about moving these to section folders.
/test/
Can we ensure that only the thing's we're depending on get added to the package.json
Every folder in assets should be watched and act according.
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 the generator with.
generator-generator
Delete the stuff we don't need with jshint etc.
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.
Current generator creates two asset folders:
Project/
assets/
app/
assets/
No .gitignore was generated
/sections/
Landing.js
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.
This plugin should be setup in the grunt file:
Please check and edit https://github.com/Jam3/generator-jam3/wiki/Prompt-Flow
use strict statements should be dropped in from templates
There should be a command to update the project based on the model
in the project.
Should it be yo jam3
or something like yo jam3:update
?
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 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.
/tasks/
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 );
We need to domify (https://www.npmjs.com/package/domify) the result from hbs.compile or use some other method to turn it into proper dom elements.
Coding conventions for LESS should be removed from the readme.md file that gets generated. We should instead link out to a repo which explains CSS coding conventions.
Also a link to https://github.com/Jam3/Javascript-Code-Conventions should be added.
Currently the watch task is not watching things like: index.js
at the root of the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.