2014-10-12 1 views
0

나는 운이없는 비누 거품 생성기를 오늘 만들려고 노력하고있다. 나는 두 개의 튜토리얼을 온라인으로 따라 갔고 나는 모든 것을 올바르게했다고 생각했다. 그러나, 나는 발전기를 실행할 때 아무것도하지 않는다. 나는 내가 무엇을 고칠 필요가 있는지 확신하지 못한다. ... 파일은 여기 https://github.com/ryanswapp/slush-swappticon비누 거품 발생기를 만드는 방법

slushfile.js

/* 
* slush-swappticon 
* https://github.com/ryanswapp/slush-swappticon 
* 
* Copyright (c) 2014, Ryan Swapp 
* Licensed under the MIT license. 
*/ 

'use strict'; 

var gulp = require('gulp'), 
    install = require('gulp-install'), 
    conflict = require('gulp-conflict'), 
    template = require('gulp-template'), 
    rename = require('gulp-rename'), 
    _ = require('underscore.string'), 
    inquirer = require('inquirer'); 

function format(string) { 
    var username = string.toLowerCase(); 
    return username.replace(/\s/g, ''); 
} 

var defaults = (function() { 
    var homeDir = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, 
     workingDirName = process.cwd().split('/').pop().split('\\').pop(), 
     osUserName = homeDir && homeDir.split('/').pop() || 'root', 
     configFile = homeDir + '/.gitconfig', 
     user = {}; 
    if (require('fs').existsSync(configFile)) { 
     user = require('iniparser').parseSync(configFile).user; 
    } 
    return { 
     appName: workingDirName, 
     userName: format(user.name) || osUserName, 
     authorEmail: user.email || '' 
    }; 
})(); 

gulp.task('default', function (done) { 
    var prompts = [{ 
     name: 'appName', 
     message: 'What is the name of your project?', 
     default: defaults.appName 
    }, { 
     name: 'appDescription', 
     message: 'What is the description?' 
    }, { 
     name: 'appVersion', 
     message: 'What is the version of your project?', 
     default: '0.1.0' 
    }, { 
     name: 'authorName', 
     message: 'What is the author name?', 
    }]; 
    //Ask 
    inquirer.prompt(prompts, 
     function (answers) { 
      if (!answers.moveon) { 
       return done(); 
      } 
      answers.appNameSlug = _.slugify(answers.appName); 
      gulp.src(__dirname + '/templates/**') 
       .pipe(template(answers)) 
       .pipe(rename(function (file) { 
        if (file.basename[0] === '_') { 
         file.basename = '.' + file.basename.slice(1); 
        } 
       })) 
       .pipe(conflict('./')) 
       .pipe(gulp.dest('./')) 
       .pipe(install()) 
       .on('end', function() { 
        done(); 
       }); 
     }); 
}); 

package.json

{ 
    "name": "slush-swappticon", 
    "description": "A simple AngularJS with ui-router generator", 
    "version": "0.1.1", 
    "homepage": "https://github.com/ryanswapp/slush-swappticon", 
    "author": { 
     "name": "Ryan Swapp", 
     "email": "[email protected]" 
    }, 
    "repository": { 
     "type": "git", 
     "url": "git://github.com/ryanswapp/slush-swappticon.git" 
    }, 
    "bugs": { 
     "url": "https://github.com/ryanswapp/slush-swappticon/issues" 
    }, 
    "licenses": [{ 
     "type": "MIT", 
     "url": "https://github.com/ryanswapp/slush-swappticon/blob/master/LICENSE" 
    }], 
    "main": "slushfile.js", 
    "engines": { 
     "node": ">= 0.10.26", 
     "npm": ">=1.4.3" 
    }, 
    "scripts": { 
     "test": "echo \"No tests\"" 
    }, 
    "dependencies": { 
     "slush": ">=1.0.0", 
     "gulp": "^3.6.2", 
     "gulp-template": "^0.1.1", 
     "gulp-install": "^0.1.4", 
     "gulp-conflict": "^0.1.1", 
     "gulp-rename": "^1.2.0", 
     "underscore.string": "^2.3.3", 
     "inquirer": "^0.4.1", 
     "iniparser": "^1.0.5" 
    }, 
    "keywords": [ 
     "slushgenerator" 
    ] 
} 

답변

0

당신은 moveon 질문이없는 찾을 수 있습니다 당신이 내 문제를 발견 할 수 있는지 알려 주시기 바랍니다 하지만 당신은 여전히 ​​그 대답을 확인하고 있습니다. 다음 코드 부분을 제거하십시오.

if (!answers.moveon) { 
    return done(); 
} 
+0

감사합니다. – Swappticon