Giter Club home page Giter Club logo

generator-mobile's Introduction

Welcome, Friend!

Yeoman is a robust and opinionated set of tools, libraries, and a workflow that can help developers quickly build beautiful, compelling web apps.

image

Code of Conduct

Everyone in this community (from core members to random committers and volunteers) are asked to please act in accordance with the Yeoman Community Contributor Code of Conduct. We encourage you to follow these social rules which help guide our interactions with each other, and ensure we provide a safe environment for everyone. We aim to make Yeoman a positive, welcoming, open and inclusive project and community.

Code of Conduct

Issue Submission

Make sure you've read the issue submission guidelines before you open a new issue.

Yeoman is composed of a number of different sub-projects, most of which have their own dedicated repository. If you are looking for a repo for a particular piece, you'll find it on the organization page.

Feature requests

Feature requests should be submitted to the repo it concerns. Submit to yeoman/yeoman if you're unsure, otherwise the repositories for our officially maintained generators can be found here.

Contribute

See the contributing docs

Support

Need help or have a question?

Please don't use the issue trackers for support/questions.

Links

Team

Yeoman is beautifully crafted by these people and a bunch of awesome contributors

Addy Osmani Sindre Sorhus Pascal Hartig Stephen Sawchuk Simon Boudrias
Addy Osmani Sindre Sorhus Pascal Hartig Stephen Sawchuk Simon Boudrias
Brian Ford Eddie Monge Paul Irish Hemanth.HM Revath S Kumar
Brian Ford Eddie Monge Paul Irish Hemanth.HM Revath S Kumar
Jimmy Moon Frederick Ros Mickael Daniel Eric Bidelman Matija Marohnić
Jimmy Moon Frederick Ros Mickael Daniel Eric Bidelman Matija Marohnić
Kevin Mårtensson Arthur Verschaeve Michael Kühnel Mehdy Dara Ulises Gascon
Kevin Mårtensson Arthur Verschaeve Michael Kühnel Mehdy Dara Ulises Gascon

Backers

Love Yeoman work and community? Help us keep it alive by donating funds to cover project expenses!
[Become a backer]

License

BSD license Copyright (c) Google

generator-mobile's People

Contributors

addyosmani avatar arthurvr avatar kevva avatar sindresorhus avatar x1ddos 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  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  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  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

generator-mobile's Issues

Error during gulpfile configuration step

Hi, I just tried this generator and I found this:

? Looks good? Yes
     info Getting latest WSK release version ...
     info Found release v0.6.1
     info Fetching https://github.com/google/web-starter-kit/archive/v0.6.1.zip ...
     info This might take a few moments
...................................√ Done
     info Checking dependencies ...
     info Configuring gulpfile.js
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Projects\mobile-wsk\gulpfile.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at readFileAsString (C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\node_modules\yeoman-generator\lib\actions\wiring.js:277:13)
    at module.exports.yeoman.generators.Base.extend.writing.gulpfile (C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\app\index.js:137:27)
    at C:\Users\user\AppData\Roaming\npm\node_modules\generator-mobile\node_modules\yeoman-generator\lib\base.js:395:14
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I noticed that there is a gulpfile.babel.js in the directory so I guess that is a change in WSK that was not reflected here.

Bootstrap Less

Would be nice if 'bootstrap/less/{variables,custom}.less' is also watched.

Also, would be nice if 'grunt' would work out of the box without first having to fix the js files.

Otherwise, very nice generator ;)

integrate sauce-labs for unit testing

Maybe we could look at using grunt-saucelabs + the mocha generator to give developers easier access to cloud testing for their unit tests.

Gaunty to explore!

Refactor the layouts being generated/included

I believe @gauntface already looked into this, but let's verify that there's nothing else we can do to trim down on the layout code being injected into the user's index file.

Note: I reached out to TopCoat about layouts too. They say they're going to implement for us but have no time-frame for it just yet.

wanted version update

I try "np install -g generator-webapp " on windows 8.1 64 bit (6.3.9600)
How i ca nresolve this issue of version ?

seleni5

requirejs:dist fails on missing bootstrap.js

When running grunt on a generator-mobile bootstrap project, the requirejs:dist task fails because it can't find bootstrap.js in the ~/app/scripts/vendor/bootstrap directory.

I created the vendor/bootstrap directory and copied bootstrap.js to that directory to fix the problem. Did I miss an installation step from the README.md?

yo mobile dies at gulpfile.js, writes empty ---------- file permissions

fs.js:568
function strWrapper(err, written) {
^
Error: EACCES, permission denied '/Users/marc/Sites/NYCompost/gulpfile.js'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at Object.fs.readFileSync (fs.js:354:15)
at readFileAsString (/usr/local/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/actions/wiring.js:277:13)
at module.exports.yeoman.generators.Base.extend.writing.gulpfile (/usr/local/lib/node_modules/generator-mobile/app/index.js:137:27)
at /usr/local/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/base.js:395:14
at processImmediate as _immediateCallback

Foundation 5?

Will Generator-Mobile be update to use Foundation 5?

Suggestions & feedback

Thanks for trying out generator-mobile. We hope you've found this experiment in improving the mobile web development workflow useful.

If you had any suggestions for how we could improve the project or had requests for features you would like us to consider adding, please feel free to let us know.

We intend on using what we learn from this project to help us improve generator-webapp, the most commonly used Yeoman generator for new projects.

TypeError: Cannot read property 'bold' of undefined

After fresh install and running 'yo mobile':

TypeError: Cannot read property 'bold' of undefined
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/util/common.js:5:56)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/base.js:91:26)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Seems to be related to generator-webapp issue:
yeoman/generator-webapp#137

Errors installing npm module during yo mobile scaffolding

Not sure if this is npm or yo related or even an "issue"?!...but it also may be causing gulp to later fail on "Error: Cannot find module"
...
✔ You are all set now. Happy coding!
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1

npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! http://github.com/npm/npm/issues

[email protected] install /Users/marc/Sites/NYCompost/site/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
npm WARN deprecated [email protected]: this is merged into the 'tap' module now
npm WARN deprecated [email protected]: this is merged into the 'tap' module now

...

[email protected] install /Users/marc/Sites/NYCompost/site/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

npm ERR! Please include the following file with any support request:
npm ERR! /Users/marc/Sites/NYCompost/site/npm-debug.log

Gulp > Error: Cannot find module 'postcss'

Gulp > Error: Cannot find module 'postcss'
...
schmendrick:site marc$ gulp
[16:11:09] Using gulpfile ~/Sites/NYCompost/site/gulpfile.js
[16:11:09] Starting 'clean'...
[16:11:09] Finished 'clean' after 12 ms
[16:11:09] Starting 'default'...
[16:11:09] Starting 'styles'...
[16:11:14] 'styles' errored after 4.49 s
[16:11:14] Error: Cannot find module 'postcss'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/marc/Sites/NYCompost/site/node_modules/gulp-autoprefixer/node_modules/autoprefixer-core/lib/autoprefixer.js:6:13)
at Object. (/Users/marc/Sites/NYCompost/site/node_modules/gulp-autoprefixer/node_modules/autoprefixer-core/lib/autoprefixer.js:111:4)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
[16:11:14] 'default' errored after 4.5 s
[16:11:14] Error: [object Object]
at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp. (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:129:20)
at Gulp.Orchestrator._emitTaskDone (/Users/marc/Sites/NYCompost/site/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /Users/marc/Sites/NYCompost/site/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/Users/marc/Sites/NYCompost/site/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/marc/Sites/NYCompost/site/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/Users/marc/Sites/NYCompost/site/node_modules/run-sequence/index.js:38:5)
at Gulp.onError (/Users/marc/Sites/NYCompost/site/node_modules/run-sequence/index.js:45:4)
at Gulp.emit (events.js:129:20)
[16:11:15] gulp-ruby-sass: directory
[16:11:18] gulp-ruby-sass: write components.css
write components.css.map
[16:11:22] gulp-ruby-sass: write main.css
write main.css.map

new install > grunt server hangs

after running the following

yo mobile
sudo npm install
grunt:server

my browser does not render anything on the page. Although when running
curl localhost:9000

I see the correct HTML. Any ideas??

Switch over dependencies to use Bower

Because this is a proof-of-concept, we are mostly using static dependencies. We explored using Bower for many of our deps but unfortunately quite a few have their own sub-build process using grunt which requires the user to pre-build before they can actually use something.

We wanted to keep things simple, so static for now. The solution to this is either calling the grunt build process for those deps after we've brought them in (imo, suboptimal) or we can encourage lib authors to ship pre-built versions (not minified) in their bower packages.

Attempting to run `grunt screenshots` results in error

Attempting to run grunt screenshots results in error:

Running "autoshot:default_options" (autoshot) task
Fatal error: Cannot call method 'createPage' of undefined

The following is the output from my system:

yo --version && echo $PATH $NODE_PATH && node -e 'console.log(process.platform, process.versions)' && cat Gruntfile.js
1.0.4
/Users/skube/.node/bin:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/skube/.rvm/bin:/Users/skube/.node/bin/phantomjs
darwin { http_parser: '1.0',
  node: '0.10.21',
  v8: '3.14.5.9',
  ares: '1.9.0-DEV',
  uv: '0.10.18',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1e' }
// Generated on 2013-11-01 using generator-mobile 0.0.2
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
    return connect.static(require('path').resolve(dir));
};

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'

module.exports = function (grunt) {
    // show elapsed time at the end
    require('time-grunt')(grunt);
    // load all grunt tasks
    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    // configurable paths
    var yeomanConfig = {
        app: 'app',
        dist: 'dist'
    };

    grunt.initConfig({
        yeoman: yeomanConfig,
        // TODO: Make this conditional
        watch: {
            coffee: {
                files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
                tasks: ['coffee:dist']
            },
            coffeeTest: {
                files: ['test/spec/{,*/}*.coffee'],
                tasks: ['coffee:test']
            },
            compass: {
                files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
                tasks: ['compass:server']
            },
            livereload: {
                options: {
                    livereload: LIVERELOAD_PORT
                },
                files: [
                    '<%= yeoman.app %>/*.html',
                    '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
                    '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
                    '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
                ]
            }
        },
        autoshot: {
            default_options: {
                options: {
                    // necessary config
                    path: 'screenshots/',
                    filename: '',
                    type: 'PNG',
                    // optional config, must set either remote or local
                    remote: 'http://localhost:<%= connect.options.port %>',
                    viewport: ['320x480','480x320','384x640','640x384','602x963','963x602','600x960','960x600','800x1280','1280x800','768x1024','1024x768']
                }
            }
        },

        connect: {
            options: {
                port: 9000,
                // change this to '0.0.0.0' to access the server from outside
                hostname: 'localhost'
            },
            livereload: {
                options: {
                    middleware: function (connect) {
                        return [
                            lrSnippet,
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, yeomanConfig.app)
                        ];
                    }
                }
            },
            test: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, 'test')
                        ];
                    }
                }
            },
            dist: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, yeomanConfig.dist)
                        ];
                    }
                }
            }
        },
        open: {
            server: {
                path: 'http://localhost:<%= connect.options.port %>'
            },
            nexus4:{
                path: 'http://www.browserstack.com/start#os=android&os_version=4.2&device=LG+Nexus+4&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
            },
            nexus7:{
                path: 'http://www.browserstack.com/start#os=android&os_version=4.1&device=Google+Nexus+7&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
            },
            iphone5:{
                path: 'http://www.browserstack.com/start#os=ios&os_version=6.0&device=iPhone+5&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
            }

        },
        clean: {
            dist: {
                files: [{
                    dot: true,
                    src: [
                        '.tmp',
                        '<%= yeoman.dist %>/*',
                        '!<%= yeoman.dist %>/.git*'
                    ]
                }]
            },
            server: '.tmp'
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: [
                'Gruntfile.js',
                '<%= yeoman.app %>/scripts/{,*/}*.js',
                '!<%= yeoman.app %>/scripts/vendor/*',
                'test/spec/{,*/}*.js'
            ]
        },
        mocha: {
            all: {
                options: {
                    run: true,
                    urls: ['http://localhost:<%= connect.options.port %>/index.html']
                }
            }
        },
        coffee: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/scripts',
                    src: '{,*/}*.coffee',
                    dest: '.tmp/scripts',
                    ext: '.js'
                }]
            },
            test: {
                files: [{
                    expand: true,
                    cwd: 'test/spec',
                    src: '{,*/}*.coffee',
                    dest: '.tmp/spec',
                    ext: '.js'
                }]
            }
        },
        compass: {
            options: {
                sassDir: '<%= yeoman.app %>/styles',
                cssDir: '.tmp/styles',
                generatedImagesDir: '.tmp/images/generated',
                imagesDir: '<%= yeoman.app %>/images',
                javascriptsDir: '<%= yeoman.app %>/scripts',
                /*fontsDir: '<%= yeoman.app %>/styles/fonts',*/
                importPath: '<%= yeoman.app %>/bower_components',
                httpImagesPath: '/images',
                httpGeneratedImagesPath: '/images/generated',
                httpFontsPath: '/styles/fonts',
                relativeAssets: false
            },
            dist: {},
            server: {
                options: {
                    debugInfo: true
                }
            }
        },
        // not used since Uglify task does concat,
        // but still available if needed
        /*concat: {
            dist: {}
        },*/
        requirejs: {
            dist: {
                // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
                options: {
                    // `name` and `out` is set by grunt-usemin
                    baseUrl: yeomanConfig.app + '/scripts',
                    optimize: 'none',
                    // TODO: Figure out how to make sourcemaps work with grunt-usemin
                    // https://github.com/yeoman/grunt-usemin/issues/30
                    //generateSourceMaps: true,
                    // required to support SourceMaps
                    // http://requirejs.org/docs/errors.html#sourcemapcomments
                    preserveLicenseComments: false,
                    useStrict: true,
                    wrap: true
                    //uglify2: {} // https://github.com/mishoo/UglifyJS2
                }
            }
        },
        rev: {
            dist: {
                files: {
                    src: [
                        '<%= yeoman.dist %>/scripts/{,*/}*.js',
                        '<%= yeoman.dist %>/styles/{,*/}*.css',
                        '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',
                        '<%= yeoman.dist %>/styles/fonts/*'
                    ]
                }
            }
        },



        useminPrepare: {
            options: {
                dest: '<%= yeoman.dist %>'
            },
            html: '<%= yeoman.app %>/index.html'
        },
        usemin: {
            options: {
                dirs: ['<%= yeoman.dist %>']
            },
            html: ['<%= yeoman.dist %>/{,*/}*.html'],
            css: ['<%= yeoman.dist %>/styles/{,*/}*.css']
        },
        imagemin: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/images',
                    src: '{,*/}*.{png,jpg,jpeg}',
                    dest: '<%= yeoman.dist %>/images'
                }]
            }
        },
        svgmin: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/images',
                    src: '{,*/}*.svg',
                    dest: '<%= yeoman.dist %>/images'
                }]
            }
        },
        cssmin: {
            dist: {
                files: {
                    '<%= yeoman.dist %>/styles/main.css': [
                        '.tmp/styles/{,*/}*.css',
                        '<%= yeoman.app %>/styles/{,*/}*.css'
                    ]
                }
            }
        },
        htmlmin: {
            dist: {
                options: {
                    /*removeCommentsFromCDATA: true,
                    // https://github.com/yeoman/grunt-usemin/issues/44
                    //collapseWhitespace: true,
                    collapseBooleanAttributes: true,
                    removeAttributeQuotes: true,
                    removeRedundantAttributes: true,
                    useShortDoctype: true,
                    removeEmptyAttributes: true,
                    removeOptionalTags: true*/
                },
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>',
                    src: '*.html',
                    dest: '<%= yeoman.dist %>'
                }]
            }
        },
        // Put files not handled in other tasks here
        copy: {
            dist: {
                files: [{
                    expand: true,
                    dot: true,
                    cwd: '<%= yeoman.app %>',
                    dest: '<%= yeoman.dist %>',
                    src: [
                        '*.{ico,png,txt}',
                        '.htaccess',
                        'images/{,*/}*.{webp,gif}',
                        'styles/fonts/*'
                    ]
                }, {
                    expand: true,
                    cwd: '.tmp/images',
                    dest: '<%= yeoman.dist %>/images',
                    src: [
                        'generated/*'
                    ]
                }]
            }
        },
        concurrent: {
            server: [
                'coffee:dist',
                'compass:server'
            ],
            test: [
                'coffee',
                'compass'
            ],
            dist: [
                'coffee',
                'compass:dist',
                'imagemin',
                'svgmin',
                'htmlmin'
            ]
        },
        bower: {
            options: {
                exclude: ['modernizr']
            },
            all: {
                rjsConfig: '<%= yeoman.app %>/scripts/main.js'
            }
        }
    });

    grunt.registerTask('server', function (target) {
        if (target === 'dist') {
            return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
        }

        grunt.task.run([
            'clean:server',
            'concurrent:server',
            'connect:livereload',
            'open:server',
            'watch'
        ]);
    });

    grunt.registerTask('test', [
        'clean:server',
        'concurrent:test',
        'connect:test',
        'mocha'
    ]);

    grunt.registerTask('build', [
        'clean:dist',
        'useminPrepare',
        'concurrent:dist',
        'requirejs',
        'cssmin',
        'concat',
        'uglify',
        'copy',
        'rev',
        'usemin'
    ]);

    grunt.registerTask('default', [
        'jshint',
        'test',
        'build'
    ]);

    grunt.registerTask('screenshots', [
        'clean:server',
        'concurrent:server',
        'connect:livereload',
        'autoshot'
    ]);

};
``

Review recommendation about apple touch icon

It seems like we're recommending to place a file called apple-touch-icon.png in the root of your website. (right here)

This isn't really best practice anymore, because this leads to 2 unnecessary HTTP requests. See h5bp/html5-boilerplate@345925f about this.

So, I would like to see a <link> for the touch icon. And of course we then should include some kind of placeholder icon with the project.

Add in support for responsive images

I believe @addyosmani has some idea of how we can achieve this with a polyfill.

Would be good to implement src-set if it's going to land in Safari (the first browser to support either src-set or picture element). @PaulKinlan was the one to tip off that Safari were doing this.

@addyosmani can you put any details of grunt tasks or polyfills that you are investigation, I might be able to look into it if I get a chance.

Foundation css 404

I am using the latest version installed directly from github.
bower_components/foundation/scss/foundation.css returns 404.
This is probably after the refactoring to move Foundation to bower.

There is no such file here. The Foundation version 4 package installed by bower doesn't have this css file. Please see here,
https://github.com/zurb/bower-foundation/tree/077374c67952aa8856d2fb8aa7a831f60a32bcdd

Foundation version 5 does have this css folder.

This issue can be fixed by upgrading to Foundation 5 and fixing the url in index.html to bower_components/foundation/css/foundation.css

Sysinfo:

Yeoman version 1.1.2
/usr/local/bin:/Users/aroj/bin:/Users/aroj/.rvm/gems/ruby-1.9.3-p286/bin:/Users/aroj/.rvm/gems/ruby-1.9.3-p286@global/bin:/Users/aroj/.rvm/rubies/ruby-1.9.3-p286/bin:/Users/aroj/.rvm/bin:/usr/local/sbin:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
darwin { http_parser: '1.0',
node: '0.10.26',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.25',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1e' }

// Generated on 2014-05-11 using generator-mobile 1.0.0-alpha.1
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,/}.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/*/.js'

module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);

// configurable paths
var yeomanConfig = {
    app: 'app',
    dist: 'dist'
};

grunt.initConfig({
    yeoman: yeomanConfig,
    // TODO: Make this conditional
    watch: {
        coffee: {
            files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
            tasks: ['coffee:dist']
        },
        coffeeTest: {
            files: ['test/spec/{,*/}*.coffee'],
            tasks: ['coffee:test']
        },
        compass: {
            files: ['<%= yeoman.app %>**/*.{scss,sass}'],
            tasks: ['compass:server']
        },
        livereload: {
            options: {
                livereload: LIVERELOAD_PORT
            },
            files: [
                '<%= yeoman.app %>/*.html',
                '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
                '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
                '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
            ]
        }
    },
    autoshot: {
        dist: {
            options: {
                path: '/screenshots/',
                remote : {
                    files: [
                        { src: 'http://localhost:<%= connect.options.port %>', dest: 'app.jpg'}
                    ]
                },
                viewport: ['320x480','480x320','384x640','640x384','602x963','963x602','600x960','960x600','800x1280','1280x800','768x1024','1024x768']
            }
        }
    },

    responsive_images: {
        dev: {
            options: {
                sizes: [
                    {
                        width: 320,
                    },
                    {
                        width: 640
                    },
                    {
                        width: 1024
                    }
                ]
            },
            files: [{
                expand: true,
                cwd: '<%= yeoman.app %>/images',
                src: '{,*/}*.{png,jpg,jpeg}',
                dest: '<%= yeoman.dist %>/images'
            }]
        }
    },
    connect: {
        options: {
            port: 9000,
            // change this to '0.0.0.0' to access the server from outside
            hostname: 'localhost'
        },
        livereload: {
            options: {
                middleware: function (connect) {
                    return [
                        lrSnippet,
                        mountFolder(connect, '.tmp'),
                        mountFolder(connect, yeomanConfig.app)
                    ];
                }
            }
        },
        test: {
            options: {
                middleware: function (connect) {
                    return [
                        mountFolder(connect, '.tmp'),
                        mountFolder(connect, 'test')
                    ];
                }
            }
        },
        dist: {
            options: {
                middleware: function (connect) {
                    return [
                        mountFolder(connect, yeomanConfig.dist)
                    ];
                }
            }
        }
    },
    open: {
        server: {
            path: 'http://localhost:<%= connect.options.port %>'
        }

        ,
        nexus4:{
            path: 'http://www.browserstack.com/start#os=android&os_version=4.2&device=LG+Nexus+4&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
        },
        nexus7:{
            path: 'http://www.browserstack.com/start#os=android&os_version=4.1&device=Google+Nexus+7&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
        },
        iphone5:{
            path: 'http://www.browserstack.com/start#os=ios&os_version=6.0&device=iPhone+5&speed=1&start=true&url=http://rnikitin.github.io/examples/jumbotron/'
        }

    },
    clean: {
        dist: {
            files: [{
                dot: true,
                src: [
                    '.tmp',
                    '<%= yeoman.dist %>/*',
                    '!<%= yeoman.dist %>/.git*'
                ]
            }]
        },
        server: '.tmp'
    },
    browser_sync: {
        dev: {
            bsFiles: {
                src : '<%= yeoman.app %>/styles/style.css'
            },
            options: {
                watchTask: false,
                debugInfo: true,
                // Change to 0.0.0.0 to access externally
                host: 'http://localhost:<%= connect.options.port %>',
                server: {
                    baseDir: '<%= yeoman.app %>'
                },
                ghostMode: {
                    clicks: true,
                    scroll: true,
                    links: true,
                    forms: true
                }
            }
        }
    },
    jshint: {
        options: {
            jshintrc: '.jshintrc',
            reporter: require('jshint-stylish')
        },
        all: [
            '<%= yeoman.app %>/scripts/{,*/}*.js',
            '!<%= yeoman.app %>/scripts/vendor/*',
            'test/spec/{,*/}*.js'
        ]
    },
    mocha: {
        all: {
            options: {
                run: true,
                urls: ['http://localhost:<%= connect.options.port %>/index.html']
            }
        }
    },
    coffee: {
        dist: {
            files: [{
                expand: true,
                cwd: '<%= yeoman.app %>/scripts',
                src: '{,*/}*.coffee',
                dest: '.tmp/scripts',
                ext: '.js'
            }]
        },
        test: {
            files: [{
                expand: true,
                cwd: 'test/spec',
                src: '{,*/}*.coffee',
                dest: '.tmp/spec',
                ext: '.js'
            }]
        }
    },
    compass: {
        options: {
            sassDir: '<%= yeoman.app %>/styles',
            cssDir: '.tmp/styles',
            generatedImagesDir: '.tmp/images/generated',
            imagesDir: '<%= yeoman.app %>/images',
            javascriptsDir: '<%= yeoman.app %>/scripts',
            /*fontsDir: '<%= yeoman.app %>/styles/fonts',*/
            importPath: '<%= yeoman.app %>/bower_components',
            httpImagesPath: '/images',
            httpGeneratedImagesPath: '/images/generated',
            httpFontsPath: '/styles/fonts',
            relativeAssets: false
        },
        dist: {},
        server: {
            options: {
                debugInfo: true
            }
        }
    },
    // not used since Uglify task does concat,
    // but still available if needed
    /*concat: {
        dist: {}
    },*/
    requirejs: {
        dist: {
            // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
            options: {
                // `name` and `out` is set by grunt-usemin
                baseUrl: yeomanConfig.app + '/scripts',
                optimize: 'none',
                // TODO: Figure out how to make sourcemaps work with grunt-usemin
                // https://github.com/yeoman/grunt-usemin/issues/30
                //generateSourceMaps: true,
                // required to support SourceMaps
                // http://requirejs.org/docs/errors.html#sourcemapcomments
                preserveLicenseComments: false,
                useStrict: true,
                wrap: true
                //uglify2: {} // https://github.com/mishoo/UglifyJS2
            }
        }
    },
    rev: {
        dist: {
            files: {
                src: [
                    '<%= yeoman.dist %>/scripts/{,*/}*.js',
                    '<%= yeoman.dist %>/styles/{,*/}*.css',
                    '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',
                    '<%= yeoman.dist %>/styles/fonts/*'
                ]
            }
        }
    },


    modernizr: {

        // Path to the build you're using for development.
        "devFile" : "<%= yeoman.app %>/bower_components/modernizr/modernizr.js",

        // Path to save out the built file.
        "outputFile" : "<%= yeoman.dist %>/scripts/modernizr.js",

        // Based on default settings on http://modernizr.com/download/
        "extra" : {
            "shiv" : true,
            "printshiv" : false,
            "load" : true,
            "mq" : false,
            "cssclasses" : true
        },

        // Based on default settings on http://modernizr.com/download/
        "extensibility" : {
            "addtest" : false,
            "prefixed" : false,
            "teststyles" : false,
            "testprops" : false,
            "testallprops" : false,
            "hasevents" : false,
            "prefixes" : false,
            "domprefixes" : false
        },

        // By default, source is uglified before saving
        "uglify" : true,

        // Define any tests you want to impliticly include.
        "tests" : [],

        // By default, this task will crawl your project for references to Modernizr tests.
        // Set to false to disable.
        "parseFiles" : true,

        // When parseFiles = true, this task will crawl all *.js, *.css, *.scss files, except files that are in node_modules/.
        // You can override this by defining a "files" array below.
        // "files" : [],

        // When parseFiles = true, matchCommunityTests = true will attempt to
        // match user-contributed tests.
        "matchCommunityTests" : false,

        // Have custom Modernizr tests? Add paths to their location here.
        "customTests" : []
    },

    useminPrepare: {
        options: {
            dest: '<%= yeoman.dist %>'
        },
        html: '<%= yeoman.app %>/index.html'
    },
    usemin: {
        options: {
            dirs: ['<%= yeoman.dist %>']
        },
        html: ['<%= yeoman.dist %>/{,*/}*.html'],
        css: ['<%= yeoman.dist %>/styles/{,*/}*.css']
    },
    imagemin: {
        dist: {
            files: [{
                expand: true,
                cwd: '<%= yeoman.app %>/images',
                src: '{,*/}*.{png,jpg,jpeg}',
                dest: '<%= yeoman.dist %>/images'
            }]
        }
    },
    svgmin: {
        dist: {
            files: [{
                expand: true,
                cwd: '<%= yeoman.app %>/images',
                src: '{,*/}*.svg',
                dest: '<%= yeoman.dist %>/images'
            }]
        }
    },
    cssmin: {
        dist: {
            files: {
                '<%= yeoman.dist %>/styles/main.css': [
                    '.tmp/styles/{,*/}*.css',
                    '<%= yeoman.app %>/styles/{,*/}*.css'
                ]
            }
        }
    },
    htmlmin: {
        dist: {
            options: {
                /*removeCommentsFromCDATA: true,
                // https://github.com/yeoman/grunt-usemin/issues/44
                //collapseWhitespace: true,
                collapseBooleanAttributes: true,
                removeAttributeQuotes: true,
                removeRedundantAttributes: true,
                useShortDoctype: true,
                removeEmptyAttributes: true,
                removeOptionalTags: true*/
            },
            files: [{
                expand: true,
                cwd: '<%= yeoman.app %>',
                src: '*.html',
                dest: '<%= yeoman.dist %>'
            }]
        }
    },
    // Put files not handled in other tasks here
    copy: {
        dist: {
            files: [{
                expand: true,
                dot: true,
                cwd: '<%= yeoman.app %>',
                dest: '<%= yeoman.dist %>',
                src: [
                    '*.{ico,png,txt}',
                    '.htaccess',
                    'images/{,*/}*.{webp,gif}',
                    'styles/fonts/*'
                ]
            }, {
                expand: true,
                cwd: '.tmp/images',
                dest: '<%= yeoman.dist %>/images',
                src: [
                    'generated/*'
                ]
            }]
        }
    },
    concurrent: {
        server: [
            'coffee:dist',
            'compass:server'
        ],
        test: [
            'coffee',
            'compass'
        ],
        dist: [
            'coffee',
            'compass:dist',
            'imagemin',
            'svgmin',
            'htmlmin'
        ]
    },
    bower: {
        options: {
            exclude: ['modernizr']
        },
        all: {
            rjsConfig: '<%= yeoman.app %>/scripts/main.js'
        }
    }
});

grunt.registerTask('server', function (target) {
    grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
    grunt.task.run(['serve:' + target]);
});

grunt.registerTask('serve', function (target) {
    if (target === 'dist') {
        return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
    }

    grunt.task.run([
        'clean:server',
        'concurrent:server',
        'connect:livereload',
        'open:server',
        'watch'
    ]);
});

grunt.registerTask('test', [
    'clean:server',
    'concurrent:test',
    'connect:test',
    'mocha'
]);

grunt.registerTask('build', [
    'clean:dist',
    'useminPrepare',
    'concurrent:dist',
    'requirejs',
    'cssmin',
    'responsive_images:dev',
    'concat',
    'uglify',
    'copy',
    'rev',
    'usemin'
]);

grunt.registerTask('default', [
    'jshint',
    'test',
    'build'
]);

grunt.registerTask('screenshots', [
    'clean:server',
    'concurrent:server',
    'connect:livereload',
    'autoshot'
]);

};

foundation has "use strict" related errors out the box

As a new user to mobile/foundation I should be able to get started with a sensible boilerplate with no errors...

mkdir yo-mobile-foundation && cd $_ && yo mobile

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Out of the box I include HTML5 Boilerplate, jQuery and Modernizr.
[?] Would you like to include a mobile-first UI framework? Foundation
[?] Would you like to include layout boilerplate for your selection? Yes
[?] Would you like to generate multi-resolution images for srcset? Yes
[?] Would you like to remove click delays in touch UIs (eg iOS)? Yes
[?] Would you like screenshots of your site at various viewport sizes? Yes
[?] Would you like to use BrowserStack for device testing? No
[?] Would you like to include RequireJS (for AMD support)? No
[?] Would you like to convert your images to WebP? Yes
[?] Would you like to include a polyfill for async localStorage? Yes
[?] Would you like to include boilerplate for the Fullscreen API? Yes
[?] Should builds only include Modernizr feature-detects you actually use? Yes

.....MORE STUFF....

$ grunt
.....MANY STRICT RELATED ERRORS LIKE...
[L5:C5] E007: Missing "use strict" statement.
[L741:C23] W109: Strings must use singlequote.
[L12:C5] E007: Missing "use strict" statement.
[L21:C22] W003: 'isFullScreen' was used before it was defined.
ETC...ETC...
Warning: Task "jshint:all" failed. Use --force to continue.

Aborted due to warnings.

Result:
Above errors out the box

Expected:
Framework related jshint errors should be silenced and/or I should be able to opt out of running jshint on Foundation itself (esp. since it fails miserably)

On a new Macbook Air w/latest stuffs and:

yo --version
1.1.2

EDIT: This happens when selecting No Framework too, and looking closer the errors are sometimes related to app/scripts/fastclick.js...ERROR and app/scripts/fullscreensnippet.js...ERROR.

Cannot create

/usr/local/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/util/common.js:5
'\n `---------´ | ' + 'Welcome to Yeoman,'.yellow.bold + ' |' +
^
TypeError: Cannot read property 'bold' of undefined
at Object. (/usr/local/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/util/common.js:5:56)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/generator-mobile/node_modules/yeoman-generator/lib/base.js:91:26)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)

Auto-install ruby deps

Should this generator have Gemfile since it requires the sass gem? On a fresh install I got this error:

gulp-ruby-sass: stderr: /Users/jayw/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'sass' (>= 0) among 93 total gem(s) (Gem::LoadError)

Assuming Bundler & RVM, create Gemfile:

ruby '2.2.0'
source 'https://rubygems.org'

group :development do
  gem 'sass', '~>3.4.0'
end

and .ruby-version:

2.2.0

and .ruby-gemset:

generator-mobile

do a bundle install and all should be peachy.

Confused about Gruntfile versions in repo vs generated

This is probably me not understanding something, but I'm confused about the versions.

When I start yo and then select Run the mobile generator (1.0.0-alpha.1) it will download a bunch of stuff and appear not to have any issues. However, when I look at the Gruntfile.js created and compare it to the Gruntfile in this repo they are not identical. Shouldn't they be?

For example, on line 58 of the Gruntfile the repo has:

path: '<%= yeoman.dist %>/screenshots/',

but in my generated Gruntfile it shows:

path: '/screenshots/',

Edit: this is just a guess, but is there a typo in the repo where it should be <%%= yeoman.dist %> instead?

Error: shasum check failed when running npm install

I have a similar 'shasum' error on the completely different machines (Osx and Ubuntu) when running 'npm install' in the project root (generator mobile). Sometimes it trows an error on Grunt package, sometimes it trows an error on the Responsive images package (as below).

I've tried to reinstall Nodejs, Npm and Yeoman on both machines to make sure i'm running latest stable versions. Also tried to use some older versions of Nodejs and Npm to make sure it isn't a version conflict. I also did 'npm cache clean' several times, in fact yesterday i tried it on a fresh new installation of Ubuntu with the same negative result.

From what i heard the Npm registry is kinda 'buggy' atm, but i'm not sure if this problem is my fault. Would be great to get some insights or directions where to look for solutions.

Here is the error:

npm http 200 https://registry.npmjs.org/grunt-responsive-images/-/grunt-responsive-images-0.0.6.tgz
npm Error: shasum check failed
npm ERR! Expected: 313e82e3ef9dc07d15409eea1b12b25448d2cce0
npm ERR! Actual:   e74135ce47e851b3be11716fad1e068b06593be7
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)

Update USAGE file

The usage file hasn't been updated since the project was cloned from generator-webapp

grunt fails due to warnings

When I try to perform an initial build, after running 'yo mobile', I get the following -

Warning: Task "jshint:all" failed. Use --force to continue.
Aborted due to warnings.

Default Autoshot path to screenshots is root

This may seem like a little thing but having the default path of autoshot as /screenshots/ in the Gruntfile.js is a little confusing for new comers. I wasn't sure if things were working properly since I couldn't see any dir inside my project. It wasn't until I looked at the root of my drive (i.e. C:\) that I found it.

Seems to me it should be set as simply screenshots/ as default.

integrate grunt-browserstack

We should bring this behind a prompt with conditionals, but it could be a sub-generator. Basically, make it easy for people to get started with browserstack testing. They will need a proper commercial account however.

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.