yeoman-generator

Yeoman: Call Sub-Generator With User-Supplied Arguments

狂风中的少年 提交于 2019-12-20 08:43:01
问题 I'm writing my first Yeoman generator, which prompts the user for various inputs and conditionally creates files based on their responses. I need to be able to call a subroutine (could be a Yeoman sub-generator) based on user input, and pass arguments to it. The reason I want to use named functions (which are not automatically run) is that sometimes the user's response should invoke a number of functions combined, and sometimes the function should be run alone. What I have tried: I figured

grunt usemin doesnt affect the html file(index.html)

眉间皱痕 提交于 2019-12-19 17:37:51
问题 i have a grunt script that uses usemin but the weird thing is is that the index.html file is not affected by usemin at all! it means that my file still has all the <!-- build:css styles/main.css --> <link rel="stylesheet" href="styles/style.css"> <link rel="stylesheet" href="styles/bs-growl-notifications.css"> <!-- endbuild --> the weirdest part in the log is this(it does nothing although it found the blocks-see full log): Processing as HTML - dist/index.html Update the HTML to reference our

How to upgrade jhipster sub-generator?

吃可爱长大的小学妹 提交于 2019-12-13 07:32:30
问题 I have an existing project running on hipster 3.6.1, and I wanted to upgrade it to 3.12.2. I followed the process of upgrade described in jhipster website, but the hipster_upgrade branch generated still mentions the old version of the sub-generator. Forced update using npm While running the following command npm install -g generator-jhipster , it shows me the following npm WARN deprecated node-uuid@1.4.7: use uuid module instead npm WARN deprecated npmconf@2.1.2: this package has been

Repeating Prompts with a Yeoman Generator

江枫思渺然 提交于 2019-12-12 09:18:13
问题 I am creating a Yeoman Generator to automate creation of few database tables. I need to provide users with a prompt to add multiple columns (combination of ColumnName and DataType below). I have a template saved in my disk where I bind the dynamic names from the user inputs and based upon this template, the final script is generated by the Yeoman Generator. Can you suggest how to prompt user to enter repetitive combinations of ColumnName/DataType he wants to enter? var prompts = [{ type:

Rename a newly-created directory using Yeoman (mem-fs-editor)

家住魔仙堡 提交于 2019-12-12 05:33:00
问题 I'm trying to rename a folder in the destination directory. The directory structure inside my templates folder looks like this: root/ ├── generators │ └── app │ ├── templates │ │ └── app │ │ └── widget │ │ ├── widget.controller.ts │ │ ├── widget.service.ts │ │ └── widget.module.ts │ └── index.js └── .yo-rc.json I'm trying to rename the widget directory (in destinationPath ) to a name that the user enters during the prompting stage. Here's how I'm attempting this: module.exports = generators

Grunt Serve watch throws EBUSY warning over mongod.lock

断了今生、忘了曾经 提交于 2019-12-12 03:27:11
问题 I have an app I am building using the full stack angular yeoman generator. I start mongod passing the path to my data folder: [my local path]/[my new app name]/server/data In my app i then run the grunt serve task. The app boots up correctly however the watch task throws a warning and then fails to do any live reloads it also causes the app in the browser to continuously load. The warning I get it: EBUSY, resource busy or locked "[my local path]/[my new app name]/server/data/mongod.lock" Not

Avoid conflicts in Yeoman generator

我怕爱的太早我们不能终老 提交于 2019-12-11 09:59:26
问题 I'd like to replace a partial in my app with a template when scaffolding with Yeoman. Everything seems to work out fine, but I get this conflict error during the scaffold. this.template( 'conditional-files/html/_signup.email.html', 'app/html/partials/_main.signup.html' ); conflict app/html/partials/_main.signup.html [?] Overwrite app/html/partials/_main.signup.html? (Ynaxdh) Is there a way to avoid this? I looked into passing a {status: 'force'} but that didn't seem to work. 回答1: A couple of

Gulp and wire dep not injecting file type *.*.js files

泄露秘密 提交于 2019-12-11 08:18:52
问题 I am facing below issue - I have Yeomen generator and wiredep to inject bower dependencies in index.html file. I have installed angular tree view by bower then noticed that lib files and css file of angular tree view are not getting injected in index file. After debugging for while found that the lib file of angular tree view has one extras dot (angular.treeview.js) same with the css file as well So how to inject that file in index.html i have below task in inject.js file in gulp folder to

ComposeWith in yeoman generator not emitting an end event and thus not driving 'on' method

落爺英雄遲暮 提交于 2019-12-11 04:06:28
问题 Background I am creating a scaffolding generator for an Angular SPA (single page application). It will rely on the environment set up by the standard angular generator ('yo angular'), and also rely on the standard angular subgenerators to generate a few extra services and controllers necessary to the app. In other words, I'm "decorating" a basic angular app. The generator will work fine if the user has previously installed an angular app (I look for marker files and set a booleon

Copy all files but change the name of some automatically in yeoman

删除回忆录丶 提交于 2019-12-11 02:09:30
问题 I am trying to create a yeoman generator where I have to copy from templatePath to destinationPath some files and folders, but I would want to have some of this files with a variable that yeoman could change by one of the user's inputs. like: "<%=name%>-plugin.php" -> "hello-plugin.php" I saw some references that this can be done but I can't find how. I am doing right now: //Copy the configuration files app: function () { this.fs.copyTpl( this.templatePath('**'), this.destinationPath(), {