yeoman

Dynamic path in Yeoman build comment tag

帅比萌擦擦* 提交于 2019-12-08 13:09:46
问题 Is there a way to get dynamic path into the Yeoman build tag, e.g. for <!-- build:js scripts/modernizr.js --> The use-case would be to push in a different path in the layout for differently nested pages, either / to webroot or ../../ to an upper level, e.g. something like <!-- build:js <%= config.path.script %>/modernizr.js --> Related topic has already been discussed in a question of Yeoman/Grunt usemin subfolders, but what about a more graceful/flexible solution? Ideas? 回答1: If you compile

NODE_PATH matches the npm root

十年热恋 提交于 2019-12-08 11:10:47
问题 I get this error when I try scaffolding a project using yeoman with this command. npm install generator-gulp-webapp --global The error: Yeoman Doctor Running sanity checks on your system ✖ NODE_PATH matches the npm root npm global root value is not in your NODE_PATH I am using Ubuntu 15.04 and have not installed npm and node with the sudo command. 回答1: It seems installing with sudo npm install generator-gulp-webapp --global solved the problem. 来源: https://stackoverflow.com/questions/31234873

How do you access environment variables on the front end when using Yeoman's angular-fullstack generator?

元气小坏坏 提交于 2019-12-08 08:24:26
问题 I'm using Yeoman's angular-fullstack generator. I want to access some environment variables in a front end controller ( main.controller.js ). The only way I know how to set environment variables is the following: server/config/environment/local.env.js 'use strict'; // Use local.env.js for environment variables that grunt will set when the server starts locally. // Use for your api keys, secrets, etc. This file should not be tracked by git. // // You will need to set these on the server you

Grunt fail build “Arguments to path.join must be strings” error

给你一囗甜甜゛ 提交于 2019-12-08 06:14:55
问题 Updated to Node 0.10.0, now while Grunt server still works, Grunt (build) and Grunt Test return "Arguments to path.join must be strings" error on Running "useminPrepare:html" (useminPrepare) task, effectively failing to build. Set up: Node: 0.10.0 Yeoman: 1.0.0-beta.3 Grunt: grunt-cli v0.1.6, grunt v0.4.0rc7 I know there's some fix been made, but tried all suggested solutions (npm cache clear, Grunt reinstall, etc.) with no success. Any help appreciated. 回答1: This question has been answered

Grunt keeps removing my absolute paths

馋奶兔 提交于 2019-12-08 00:06:53
问题 I have references to some external JS files in my index.html like this: <!-- build:js(app) /scripts/vendor.js --> <!-- bower:js --> <script src="/bower_components/jquery/jquery.js"></script> <script src="/bower_components/angular/angular.js"></script> <script src="/bower_components/jquery-ui/ui/jquery-ui.js"></script> <!-- endbower --> <!-- endbuild --> Every time I run grunt serve (generator-angular-fullstack), the initial slashes are removed ( "/bower_components/..." → "bower_components/...

Puppet installing packages, but these do not seem to work

旧时模样 提交于 2019-12-07 19:29:21
问题 I have the following puppet file. It seems to have installed everything without errors, but commands such as yo or bower dont seem to work. Any idea why? class yeoman { Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } $yeomanPackages = ["git", "rubygems", "libjpeg-turbo-progs", "optipng", "phantomjs", "python-software-properties" ] package { $yeomanPackages: ensure => "installed", require => Exec['apt-get update'], } exec { "apt-get update": command => "/usr/bin/apt-get

Grunt: jit-grunt: Plugin for the “protractor” task not found

一曲冷凌霜 提交于 2019-12-07 19:05:32
问题 I am new to yeoman/grunt/bower and I am working on setting up a angularjs project with: yo angular I made some changes to gruntfile myself and recently I found protractor very useful and I wanted to add that to my project. I followed a lot of instructions online (like this one Integrating Protractor with Yeoman via Grunt 2 years ago) but I still cannot get protractor properly installed. Here is my Gruntfile.js : (only showed relevant parts) 'use strict'; module.exports = function (grunt) { //

Yeoman Generator: CLI+File Instead of Prompt

北战南征 提交于 2019-12-07 18:15:53
问题 I've been using a few Yeoman Generators that prompt me for user input. I'd prefer to put my inputs in a JSON file though. I can see that yo-rc.json gets generated afterwards, but I'd like to use that (or a file like it) as an input to Yeoman. Example using JHipster: Current Behavior $ yo jhipster Welcome to the JHipster Generator v2.16.1 ? (1/15) What is the base name of your application? (jhipster) helpme ? (2/15) What is your default Java package name? com.mycompany.helpme ... # Yeoman

Generate Angularjs app with latest unstable branch?

*爱你&永不变心* 提交于 2019-12-07 17:49:20
问题 Just started using Yeoman and loving it. However, I am building an app that depends on some Angular 1.1.x features ( ng-trim and ng-animate ), and the Angular-generator uses the latest stable branch as its default, which doesn't include these features. In Yeoman, is there any way to generate an Angular app with the latest 'unstable' branch? 回答1: One solution is to update your bower.json and use an unofficial build of angular unstable: "dependencies": { "angular": "atizo/bower-angular-unstable

Using Yeoman from Intellij (Idea 12)

走远了吗. 提交于 2019-12-07 16:27:12
问题 Using OSX 10.8.4, Idea 12. Node v0.10.17, yo v1.0.3 When attempting to use Yeoman as an external tool in I get /usr/local/bin/yo angular env: node: No such file or directory When I run the same command from bash it works correctly. What am I missing in my Intellij configuration? Here's how I have it setup ... Program: /usr/local/bin/yo Parameters: angular 回答1: I just came across this for a different project. I fixed it by opening the executing .js file (/usr/local/lib/node_modules/[ project