yeoman

Yeoman and handlebars templates

邮差的信 提交于 2019-12-07 15:33:22
问题 Is anybody using yeoman with ember? If so, how do I get yeoman to compile the handlebars templates? If possible I would like to use the rake pipeline. Has anyone come up with a solution to compile the handlebars templates from yeoman? 回答1: Dan Gebhardt has been working on getting Ember handlebars compilation working with yeoman. You can see the fruits of his efforts here: https://github.com/dgeb/grunt-ember-templates 来源: https://stackoverflow.com/questions/12650601/yeoman-and-handlebars

How to ignore files in Yeoman with fs.copyTpl

試著忘記壹切 提交于 2019-12-07 11:43:46
问题 how can i ignore files? i want to exclude all file starting with _ in any subdirectory. i have no success with these two approaches: this.fs.copyTpl( this.templatePath('basicFiles/'), this.destinationPath(''), answers, {ignore:"_*.*"} ); this.fs.copyTpl( [!*.*,this.templatePath('basicFiles/')], this.destinationPath(''), answers ); More general, would like to merge(deep copy) every basic/_exmaple.json into additionalConfig/example.json to desitnationPaht/exmaple.json (merged). Every idea is

Unable to create yeoman webapp

自闭症网瘾萝莉.ら 提交于 2019-12-07 11:15:51
问题 I get this when I try to create a webapp with yeoman . /usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:66 throw err; ^ Error: EACCES, permission denied '/root/.config/configstore/insight-yo.yml' You don't have access to this file. at Object.fs.openSync (fs.js:436:18) at Object.fs.writeFileSync (fs.js:975:15) at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8) at Object

How to integrate PHP with yeoman angular project

风流意气都作罢 提交于 2019-12-07 10:13:54
问题 I'm using yeoman project using angularjs normally I know how to use angularjs with PHP on normal projects. But I'm confused to use php with yeoman. Where should I create .php file and how should I call $http scope in main.js controller? 回答1: If you're using generator-angular, you need two elements: 1/ Have your PHP running as you would normally in a subdirectory like public so public/index.php is loaded when you go to http://localhost/ 2/ Use a Grunt task to compile the individual AngularJS

Yeoman gifsicle error (and others)

淺唱寂寞╮ 提交于 2019-12-07 03:54:14
问题 I'm getting the following error while trying to do yo angular : There are other error messages as well, during scaffolding. I did: npm install -g yo npm install -g generator-angular yo angular I also tried doing npm install after it failed. I also tried using yo webapp . Here is the error: > optipng-bin@0.3.1 postinstall C:\Users\SR71042\Documents\yeoman-app\node_modul es\grunt-contrib-imagemin\node_modules\optipng-bin > node lib/check.js events.js:72 throw er; // Unhandled 'error' event ^

Disable LiveReload with Yeoman

一个人想着一个人 提交于 2019-12-07 03:26:51
问题 When testing in IE8, LiveReload throws errors since web sockets is not supported. Is there a way to configure yeoman to disable LiveReload? 回答1: IE8 isn't supported by Yeoman, for good reason. However, you could do what Allan describes, or you could override the server task, by putting this in your Gruntfile: grunt.registerTask('server', 'yeoman-server'); 回答2: Try to use <!--[if !IE]><!--></body><!--<![endif]--><!--[if IE]></body><!--<![endif]--> instead of </body> . Generator would try to

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

血红的双手。 提交于 2019-12-07 01:00:36
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 deploy to. module.exports = { DOMAIN: 'hidden', SESSION_SECRET: "hidden", // Control debug level for

Run grunt server with various browsers

坚强是说给别人听的谎言 提交于 2019-12-06 18:28:03
问题 Is it possible to specify a particular browser (besides the OS' default) in the gruntfile or at the command prompt? E.g. "grunt server firefox" or the like. My default browser is Chrome, but I want to test/develop my site in multiple browsers. I am using GruntJS within Yeoman. Bryan 回答1: Quick Answer In Gruntfile.js you can add an app parameter: open: { server: { url: 'http://localhost:<%= connect.options.port %>', app: 'firefox' } }, Pull request: https://github.com/jsoverson/grunt-open/pull

Yeoman脚手架搭建angularjs1.6 (mac)

自闭症网瘾萝莉.ら 提交于 2019-12-06 17:08:38
Yeoman是什么? Yeoman按照官方说法,它不只是一个工具,还是一个工作流。它其实包括了三个部分yo、grunt、bower,分别用于项目的启动、文件操作、包管理。 Yo: Yo是一个项目初始化工具,可以生成一套启动某类项目必需的项目文件。 Bower: 一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。 GruntJS: GruntJS是基于JavaScript的命令行构建工具,它可以帮助开发者们自动化重复性的工作。 安装 基于nodejs,需要先安装 node ,安装时要确保 Add to PATH 被安装进去,然后安装依赖的包。 –安装git, http://git-scm.com/downloads ,我是windows版本,安装的时候需要注意勾选Run git from the Windows Command prompt (从Windows命令提示符下运行git)项。 –安装gruntjs,参考之前的文章: 一步一步安装Grunt –Bower是一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。 安装国内cnpm源 sudo npm install cnpm 安装bower: sudo cnpm install -g bower 安装完成后执行:

yeoman generator font awesome

Deadly 提交于 2019-12-06 17:05:57
问题 I created a mobile application with the yeoman mobile-generator. Now I want to add font awesome. I tried this, but not really works in the compiling process. A small advice or experience would be great Okay, it's really a bit unclear. Sorry. The compiling process works, but console says 404 not founds for the fonts. It's not really clear to me how is a good way to do this. Creating the CSS from the scss files, implemeted the .min.css in the index.html with "<-- build: ... -->" or something