gruntjs

Using two yeoman generators?

北战南征 提交于 2019-12-08 14:52:26
问题 Is it possible to use two generators on one project with yeoman? For example: I want to use the angular-generator but also want to use another generator, whether it be custom or one of the bootstrap generators. I know you can add dependencies through bower, but that doesn't add anything to my workflow(e.g. compiling less), does it? 回答1: Yes, it is not only possible, but common. Example: When you use JS-MV* generator in the project ( generator-angular for instance) you will probably use

Why is the node_modules folder not committed to Git?

泪湿孤枕 提交于 2019-12-08 14:46:33
问题 When I create an AngularJS project with yo angular it creates a node_modules/ directory but puts that directory in .gitignore. When I clone the project elsewhere and run grunt server I get Fatal error: Unable to find local grunt. If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide: The getting started guide doesn't say anything

How to make grunt watch subfolder for handlebars templates (ember.js app with Yeoman)

瘦欲@ 提交于 2019-12-08 13:34:40
问题 When you create an ember app with Yeoman, it create a handlebars templates folder for you (.hbs). The yeoman config is set that way : watch: { ember_templates: { files: '<%= yeoman.app %>/templates/**/*.hbs', tasks: ['ember_templates', 'livereload'] }, When a template is in the folder root, it works When a template is in a subfolder template/mySubfolder the template is not rendered (no html is returned) When a template is missing, ember throw an error So when the template is in a subfolder,

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

Grunt conditional option

社会主义新天地 提交于 2019-12-08 11:50:13
问题 I'm attempting to create a Jade task that will have a build and dev task that have very similar options, except a dev boolean, and a different destination. The simplest way I've been able to achieve this is: jade: { dev: { options: { data: { dev: true, // dev true config: ..., pkg: ..., helpers: ... } }, files: [{ dest: '<%= config.workingDir %>', ... }] }, build: { options: { data: { // no dev config: ..., pkg: ..., helpers: ... } }, files: [{ dest: '<%= config.buildDir %>', ... }] } } There

Is it possible to setup Gulp in a distributed fashion?

淺唱寂寞╮ 提交于 2019-12-08 11:28:01
问题 Here's what I want to do: Create a node package that features the following: gulpfile.js All gulp plugins, tasks, configs. Install this node package (referred to as "my-gulp" from here on) within an Angular app (referred to as "myApp" from here on) via package.json dependencies. gulpfile.js is copied into app root. All Gulp tasks can be run from app. We currently have something similar setup with Grunt (although without the Gruntfile.js copy stuff). It works pretty well to have a common setup

Error installing SailsJS in OpenShift

情到浓时终转凉″ 提交于 2019-12-08 11:20:57
问题 info: Starting app... Grunt :: module.js:340 throw err; ^ Error: Cannot find module '/var/lib/openshift/54a3a0ec4382ecf1130000f1/app-root/runtime/repo/node_modules/sails/node_modules/grunt-cli/bin/grunt' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 回答1: OpenShift needs grunt separately added to package.json, it does not contain it out of box. Try to

Issues Installing Zeppelin on CentOS 6 with Vagrant

ε祈祈猫儿з 提交于 2019-12-08 09:18:26
问题 We are trying to stand up a sandbox/evaluation instance of Zeppelin on a 4-node CentOS 6 cluster with Vagrant and having some issues with dependencies in the build process. Here is the high level script we’re running. (Have tried running this as privileged account and as a user, with the same results.) Recreate Steps Install Hadoop 2.7.0 from Binary Install Spark 1.4.0 from Binary Install Maven 3.3.3 from Binary Run the following: curl --silent --location https://rpm.nodesource.com/setup |

grunt less multiple css files keeping folder structure

百般思念 提交于 2019-12-08 08:59:52
问题 I have a branding application where I would like to have this output: /branding/ /default/ default.css /brand1/ brand1.css /brand2/ brand2.css This one should be output from a branding folder with same structure but with .less files So I would like to do something like this: less: { production: { options: { }, files: { 'dist/branding/**/*.css': 'branding/**/*.less' } } } I just seen examples on this where they all go to same folder, but I want to keep this dynamic because in my case there is

Organize multi-app project with share code

梦想的初衷 提交于 2019-12-08 08:17:41
问题 I have a serious problem (!!!) about organizing my develop environment; I have two apps: app1 and app2. This apps are written using OpenUI5 (but this detail is not important) app1 and app2 are similar and share some code (for example the code to login). I use git (with git-flow) with two remote repo and I have all equal code duplicate. Now I want optimize my develop-flow sharing equal code (login code). This is my first idea: have only one repo contains all my code in a structure of this type