yeoman

ReferenceError: can't find variable x when using grunt test in yeoman

狂风中的少年 提交于 2019-12-24 01:56:07
问题 I'm using yeoman, grunt, mocha. I want to do BDD so I make basic unit test and run grunt test in console, which gives me ReferenceError: can't find variable: Creature opening test/index.html in browser works as it should. This is my creature.js file in app/scripts: 'use strict'; var Creature = (function () { function Creature(name) { this.name = name; } Creature.prototype.sayHello = function (message) { return this.name + ' ' + message; }; Creature.prototype.eat = function (item){ return this

yeoman build the compass bootstrap scss images path always prefix '../'

别等时光非礼了梦想. 提交于 2019-12-24 01:07:34
问题 the problem is in bootstrap sass , icon sprites path is all ways prefix '../' before the image, '../../images/../images/glyphicons-halflings-white.png' I hope like this '../images/../images/glyphicons-halflings-white.png' grunt files config : options: { sassDir: '<%= yeoman.app %>/styles', cssDir: '.tmp/styles', imagesDir: 'images', javascriptsDir: '<%= yeoman.app %>/scripts', fontsDir: '<%= yeoman.app %>/styles/fonts', importPath: '<%= yeoman.app %>/components', relativeAssets: true }, How

Calling a yeoman generator after a generator has finished

雨燕双飞 提交于 2019-12-23 12:39:01
问题 I am looking to call another yeoman generator once the first generator has finished installing, this will be based on an answer I give for one of the prompts. I have tried calling it at the end. end: function () { this.installDependencies({ callback: function () { if( this.generator2 ){ shell.exec('yo generator2'); } }.bind(this) }); }, This runs generator2, but I am unable to answer any prompts. These are 2 separate generators, so I cannot make the second a sub generator. 回答1: Use Yeoman

Why is Yeoman not recommended for building websites?

泄露秘密 提交于 2019-12-23 12:18:06
问题 Why is Yeoman not recommended for building websites as they write on their website http://yeoman.io/road.html Clearing up misconceptions […] - Not recommended for building websites […] 回答1: This has been answered on the mailinglist: Yeoman is primarily targeted at improving the workflow for developers creating webapps. That's not to say that it can't be used to scaffold/build sites but we simply wanted to clarify that basic sites are not our target audience. 来源: https://stackoverflow.com

ui-router not rendering views

試著忘記壹切 提交于 2019-12-23 10:07:06
问题 I recently split out a rails app I had and created the front end as a separate app with yeoman. For some reason my views no longer render, for example my app defines: 'use strict'; var actionTrackApp = angular.module('actionTrackApp', [ 'ui.router', 'ngGrid']); actionTrackApp.config(function($locationProvider) { return $locationProvider.html5Mode(true); }); actionTrackApp.config(function($stateProvider){ $stateProvider .state("packageIndex", { url: "/packages", views: { "main": { controller:

grunt execution stops batch script

人盡茶涼 提交于 2019-12-23 09:32:23
问题 I am doing development with cordova and yeoman + angularjs. I have adopted a folder structure as follows (output of dir command on windows): C:\code\cordova\pg-droid-app>dir Volume in drive C is OSDisk Volume Serial Number is 404D-C81B Directory of C:\code\cordova\pg-droid-app 01/01/2015 03:46 PM <DIR> . 01/01/2015 03:46 PM <DIR> .. 01/01/2015 03:10 PM <DIR> pgdroid 01/01/2015 03:50 PM <DIR> pgdroid-app-frontend 01/01/2015 03:50 PM 241 showapp.bat 1 File(s) 241 bytes 4 Dir(s) 65,102,319,616

Yeoman 'grunt test' fails on clean project with 'port already in use'

╄→гoц情女王★ 提交于 2019-12-23 08:56:33
问题 With: Mac OS 10.8.4 Node 0.10.12 npm 1.3.1 grunt-cli 0.1.9 yo 1.0.0-rc.1 bower 0.9.2 generator-angular@0.3.0 I encounter the following error with a clean yo angular project, followed by grunt server then grunt test : Running "connect:test" (connect) task Fatal error: Port 9000 is already in use by another process. I'm new to Yeoman and am stumped. I've deleted my original project and created a new one in a fresh folder just to make sure I wasn't overlooking any invisible configs. I restarted

yodoctor: command not found when installing yo from terminal

一个人想着一个人 提交于 2019-12-23 07:55:24
问题 Below is the error I keep getting. It seems to indicate a "post-install" issue with yodoctor. Sadly yodoctor is the advice given by the yeoman team to help with this issue. I have other node_modules installed (bower, grunt, typescript). sh: yodoctor: command not found npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "-g" "yo" npm ERR! node v5.0.0 npm ERR! npm v3.3.9 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm

Installing Yeoman - “Yo command not found”

霸气de小男生 提交于 2019-12-23 02:32:05
问题 I have installed node.js and set up npm on my Yosemite install using the npm-g_nosudo script. When I then run npm install -g yo I see a bunch of content scroll through my terminal window, with no errors, and it completes. I then type yo and OS X tells me that it can't find the command. Sullys-MacBook-Pro:~ Sully$ npm install -g yo /Users/Sully/npm/bin/yo -> /Users/Sully/npm/lib/node_modules/yo/lib/cli.js > yo@1.4.6 postinstall /Users/Sully/npm/lib/node_modules/yo > yodoctor Yeoman Doctor

HTML comments causing an issue exporting CSS files with Grunt-usemin

泄露秘密 提交于 2019-12-22 22:20:30
问题 I'm using yeoman/grunt to for my build process and I'm running into an issue. I'm trying to build two .css files, one for IE8 and one for everything else. If I place the IE conditional on the outside of the build block, an error is thrown because of the comment within a comment. If I put the IE conditional on the inside it gets stripped out. <!--[if lte IE 8]> <!-- build:css({.tmp,app}) styles/main-old-ie.css --> <link rel="stylesheet" href="styles/main-old-ie.css"> <!-- endbuild --> <![endif