yeoman / generator-chromeapp Goto Github PK
View Code? Open in Web Editor NEWScaffold out a Chrome app
Home Page: http://yeoman.io
Scaffold out a Chrome app
Home Page: http://yeoman.io
running the command grunt debug
launches the app the same as grunt debug:server
I expect grunt debug
to launch the app in the app container just like is shown in your animated gif. How do I get Grunt to launch the app in the app container?
follow https://github.com/Polymer/vulcanize/issues/51#issuecomment-52611599
We don't need to mandatory compile task(vulcanize) for loading a ChromeApps on Chrome until now. But for now, If we want to use Polymer? We should do vulcanize before load a ChromeApps.
It lead to change workflow of ChromeApps. It will be origin source is in a src path(not app), do compile to make build files, load the build files to Chrome and make a optimized version for deploying. Like a workflow of native apps development. But It's too burden for me, and one of problems is vulcanize isn't needed if user dosen't use Polymer.
I try to new version of chromeapp-generator which supports polymer and vulcanize for few a month but I couldn't get best result as a yeoman-generators. Best case is we use a polymer while developing without CSP issues... :)
How about changing workflow of generator-chromeapps for ChromeApps @addyosmani @ebidel
I notice that the usual
bower install jquery --save
doesn't add anything to the bower.json file, which it should, I think.
I notice that the line :
"json": "bower.json"
is missing from .bowerrc. Unless I'm missing something (I'm not familiar with yeoman nor the specific grunt plugins used), I think that should be added.
When I run "yo chromeapp", it seems to skip the permissions step when I click enter after entering the chrome app description. Skipping the permissions step, is also the cause for manifest.json not being generated within the app folder.
It is required to run yo chromeapp:permissions to generate the manifest.json after running the initial creation.
What is also somewhat related, at the end of downloading dependencies, the command promt hangs and waits for input .. when I click enter, I get the permissions selection. Selecting any of the permissions (URL permissions), it outputs a message that it DID create the manifest.json, but it didn't.
The "grunt test" task will fail with a timeout error if the bower components is not downloaded within the test folder. It is required for developers to open the test folder and run "bower update", to ensure that both chai and mocha are downloaded. When this is done, the user can run "grunt test" from the root folder successfully.
Either the gruntfile should ensure these components are downloaded, or the readme.md should include detailed instructions for developers.
Getting unrecornized errors from master branch
I've created a new project and I can successfully run it as a chrome app. Then I type grunt debug
and it starts watching file changes. When I change a file it get's detected correctly (command line says something like file "..." changed...
and after a very short time Completed
). But the output files don't get updated.
I've tried to put a unique sample string into index.html
and used a software to find that text in any file of the entire project. But unless the original file none does contain the text I've entered. That means that no files get updated.
I'm working on a Windows machine and node.js 4.
What can I do to at least identify the source of the problem? Thank you for any help
Can you bump the version of grunt-config-htmlmin from ~0.2.0 to ~0.3.0 - polymer conditional attributes need a feature only supported in 0.3.0?
Thanks!
bower annotation block should be wrapped by build block. for example
<!-- build:js scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<!-- endbower -->
<!-- endbuild -->
/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:580
throw e;
^
Error: Cannot find module '../manifest'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/lib/node_modules/generator-chromeapp/app/index.js:6:16)
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)
Ubuntu Gnome 14.10 fresh install
npm -v
1.4.28
node -v
v0.10.37
Hi, when I try to open the chrome app, doesn't show nothing, and try to reload, but show me an alert "the manifest is corrupted or can not read", apparently did not find the background.js file
I created a new project per yo
and selecting the Chromeapp generator
. All went really nice so far, but when I call grunt
I get the following error:
Running "mocha:all" (mocha) task
Testing: http://localhost:9000/index.html
Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.
Aborted due to warnings.
Hello,
I tried yo chromeapp
with basic settings. After the app was created, I typed grunt
, and received the following output:
❯ grunt
Running "newer:jshint" (newer) task
Running "newer:jshint:all" (newer) task
Running "jshint:all" (jshint) task
✔ No problems
Running "newer-postrun:jshint:all:-1:./node_modules/grunt-newer/.cache" (newer-postrun) task
Running "connect:test" (connect) task
Started connect web server on http://localhost:9000
Running "mocha:all" (mocha) task
Testing: http://localhost:9000/index.html
Warning: PhantomJS timed out, possibly due to a missing Mocha run() call. Use --force to continue.
Aborted due to warnings.
Execution Time (2014-11-16 21:50:01 UTC)
jshint:all 89ms 1%
mocha:all 6.2s 98%
Total 6.3s
😞
Here's the output of running grunt connect:
❯ grunt connect
Running "connect:server" (connect) task
Started connect web server on http://localhost:9000
Running "connect:chrome" (connect) task
Fatal error: Port 9000 is already in use by another process.
Execution Time (2014-11-16 21:54:04 UTC)
loading tasks 3ms 9%
connect:server 23ms 68%
connect:chrome 7ms 21%
Total 34ms
Running lsof -i tcp:9000
returned no processes.
When trying to use chromeapp:samples
I'm getting the following error:
What sample would you like to use? identity
create app/assets/screenshot_1280_800.png
create app/identity.js
create app/index.html
create app/main.js
create app/manifest.json
create app/README.md
create app/sample_support_metadata.json
create app/sample_support/google-code-prettify/lang-css.js
create app/sample_support/google-code-prettify/run_prettify.js
create app/sample_support/prettify_theme.css
create app/sample_support/prettify.css
create app/sample_support/prettify.js
create app/sample_support/README.md
create app/sample_support/sample_support.js
create app/sample_support/show_snippets.html
create app/sample_support/show_snippets.js
create app/sample_support/snippets.css
create app/sample_support/standard.css
undefined:14
// client_id below is specifc to the application key. Follow the
^
SyntaxError: Unexpected token /
at Object.parse (native)
at module.exports.yeoman.generators.Base.extend.manifest (/usr/local/lib/node_modules/generator-chromeapp/samples/index.js:186:21)
at /usr/local/lib/node_modules/generator-chromeapp/node_modules/yeoman-generator/lib/base.js:395:14
at processImmediate [as _immediateCallback] (timers.js:358:17)
I just ran the generator and found that the MSG_appName and MSG_appDescription doesn't get updated in the manifest.json file.
The generator asked for them and I entered some text there however it didn't update in the file.
This is a new experimental feature. sub generator for chromeapp samples. This sub-generator will do scaffolding new chromeapp copy from GoogleChrome/chrome-app-samples
Check this scenario:
checkout this https://github.com/ragingwind/generator-chromeapp/tree/samples
To team, Im using rimraf
package to try to delete app
directory if the directory is already exist in target path. As I know Yeoman base generator
using rimraf
internally. Could you make a new interface to use rimraf
like a shelljs
?
cc @mangini
I don't know how to bypass this error :( I tried installing the last generator-mocha, even getting the 0.1.6 one myself, but I still have the same problem.
$ npm install -g generator-chromeapp
npm WARN deprecated [email protected]: the module is now available as 'css-select'
npm WARN deprecated [email protected]: the module is now available as 'css-what'
npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
/usr/local/lib
├── [email protected]
└── UNMET PEER DEPENDENCY generator-mocha@>=0.1.6
npm WARN EPEERINVALID [email protected] requires a peer of generator-mocha@>=0.1.6 but none was installed.
node 5.3.0
`Majors-iMac:js innovator$ npm install -g generator-mocha
/usr/local/lib
└── [email protected]
Majors-iMac:js innovator$ npm install -g generator-chromeapp
npm WARN deprecated [email protected]: the module is now available as 'css-select'
npm WARN deprecated [email protected]: the module is now available as 'css-what'
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
/usr/local/lib
├── [email protected]
└── UNMET PEER DEPENDENCY generator-mocha@>=0.1.6
npm WARN EPEERINVALID [email protected] requires a peer of generator-mocha@>=0.1.6 but none was installed.
Majors-iMac:js innovator$ node -v
v5.0.0
Majors-iMac:js innovator$ npm -v
3.3.9`
I'm using crouton on chrome os and notice that the web page isn't automatically refreshed like it is on other platforms.
I generated a chromeapp project, did npm and bower installs, and ran grunt debug, then opened another tab on the localhost URL. In another shell, I edited the file; I notice a message in the shell running grunt '>> File "app/index.html" changed.' and a 'Completed ... Waiting...' line which makes me think all is ok, but when I go to the tab open on the localhost URL, it doesn't reflect the change. A reload fixes it.
A minor issue and a corner-case (chromeos=crouton), but worth being aware of it, IMO.
@PaulKinlan Would it be useful to get Renato involved in helping us maintain this? It's currently not usable with the latest version of Yeoman but I'd love for it to be supported. I can help onboard him with what is involved if that helps.
follow up of the guide from https://github.com/PolymerElements/polymer-starter-kit/blob/master/docs/chrome-dev-editor.md
I ran :
npm install -g yo
npm install -g generator-chromeapp
and they all seemed to do lots of stuff with no errors.
However, this still failed :
yo chromeapp
which produced the error :
Error chromeapp
You don't seem to have a generator with the name chromeapp installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 1 registered generators run yo with the `--help` option.
If I do as it suggests (ie not use the -g
), then it works, but I would have expected the README to give me those instructions in the first place.
Perhaps it is something specific to my setup?
is there an easy way to include bootstrap and jquery? Where can I add these dependencies?
Related to #51 (comment)
Pete on our team figured out a way to get this working. If we don't support this in this generator yet, might be good to do so :)
https://plus.google.com/+PeteLePage/posts/8ybrXQHaPDH
https://gist.github.com/petele/7325553
grunt-regarde is deprecated. Use grunt-contrib-watch instead.
See: yeoman/generator-webapp@v0.1.7...master#diff-4
Could also need to update to all the other changes we've done in the webapp generator since last time.
After answering no to all questions, the generated manifest.json file has the following entry:
"permissions": [""]
it should be
"permissions": []
cc @ragingwind
Applying Polymer, gulp to Chrome Apps generator, I've played with them for a while. For getting reasonable build task, to make easily and handy, I made a prototype kit before write a this PR. I think that the prototype kit is suitable to start making new version of the Generator.
What is (big) changes:
cca run
instead of livereload
to preview app running on Chrome. Additionally, It is allowed to make a Mobile Chrome Apps using same source.The one of my concern is that it would be fine that enforce using cca and Polymer. I need your any comments or any suggestions. how thought? Feel free to advice me. As you know that my Korean writing is much better than in this proposal.
When running the gruntfile with "grunt debug" and modifying the bower.json file, I get the following error on Windows 8.1:
Warning: Cannot read property 'main' of undefined Use --force to continue.
Aborted due to warnings.
This happens when I create a shiny new project, and all I did was add the angular dependecy: "angular": "1.2.16".
I've done some digging, but don't really known my way around yeoman. This is on a clean install when running yo chromeapp
. The manifest.json file is created in the test directory instead of the the main project/app directory.
The temporary fix is just to move the file into the correct place.
The basic hello world app annoys me no end, I always have to create a new index.js file, there is no reasonable structure to the files either.
I'm using Node v0.11.3
/usr/local/lib/node_modules/generator-chromeapp/node_modules/yeoman-generator/lib/util/common.js:5
'\n `---------´ | ' + 'Welcome to Yeoman,'.yellow.bold + ' |' +
^
TypeError: Cannot read property 'bold' of undefined
at Object.<anonymous> (/usr/local/lib/node_modules/generator-chromeapp/node_modules/yeoman-generator/lib/util/common.js:5:56)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-chromeapp/node_modules/yeoman-generator/lib/base.js:91:26)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
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.