Questions tagged [grunt-init]

grunt-init is a plugin converted from the "init" task in grunt.

grunt-init is a project scaffolding plugin on top of grunt to automate the project creation using templates. It used to be build-in to grunt as "init" task but has been separated in the 0.4 version. grunt-init now needs to be installed separately at global level using npm install -g grunt-init For more details check this

14 questions
11
votes
3 answers

How do I process multiple files as templates with yeoman generator?

I'm working on a custom generator that I originally wrote with grunt-init. One difference I'm noticing is grunt-init automatically processes all the files in root as templates but with yeoman generator you have to do this using .template(). I'm…
user3020693
  • 111
  • 1
  • 3
6
votes
1 answer

Gruntfile.js task can't read package values?

In Gruntfile.js' initConfig function, I have the following: grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd")…
Shane
  • 4,921
  • 5
  • 37
  • 53
3
votes
2 answers

How to run grunt-init from a Grunt task?

I am either blanking out or it is more complex that it should have been. I am trying to run grunt-init from a Grunt task, something like this: grunt.registerTask('init', 'Scaffold various artifacts', function(param) { // analyze `param` and pass…
ZenMaster
  • 12,363
  • 5
  • 36
  • 59
2
votes
2 answers

zsh: command not found: grunt-init

I'm new to gruntjs and am trying to get the grunt-init templates up and running however I constantly get this error: zsh: command not found: grunt-init when I run the install it shows me all of this, so it seems like it is installing fine → npm…
JSturgessMeyers
  • 85
  • 1
  • 2
  • 11
2
votes
1 answer

grunt-init template conditional copy files

I've just started using grunt-init. I have everything working. And I was wondering if there is a way to do conditional copy root files based on prompts which based on answers to previous prompts.
pigcan
  • 93
  • 1
  • 1
  • 6
0
votes
1 answer

How can I duplicate a folder structure multiple times using grunt / grunt-contrib-copy

I have a folder structure that i need to duplicate with custom names to start a project - I've looked at modifying grunt-contrib-copy with a custom function: var gruntCopy = grunt.config.get('copy'); for (var item in gruntCopy) { var files…
0
votes
1 answer

How can update file content based on grunt-init prompt answers?

I have created a custom angularjs project using grunt-init. And want to edit the app module name based on answers given to the prompt while creating the project. But somehow I keep on getting blank string when I use the props object.
Gaurang
  • 313
  • 1
  • 9
0
votes
1 answer

grunt-init template exclude files from init.filesToCopy(props)

I've just started using grunt-init. I have everything working. And I was wondering if there is a way to exclude files from copying based on answers to prompts. 'use strict'; exports.description = 'Create module'; exports.warnOn =…
francesca
  • 559
  • 3
  • 10
  • 19
0
votes
1 answer

Grunt is throwing error messages

I'm trying to run grunt in my project and I keep getting the errors below. I followed the "Getting Started" on the actual Grunt site and I keep getting this. I've also included the code in my Gruntfile This is my gruntfile below: module.exports =…
0
votes
1 answer

grunt-init templatename create nothing on Ubuntu 14.04

I'm using grunt-init to make a new solution file for c# to be used by omnisharp. I have already installed grunt-init using: npm install -g grunt-init and the installantion was successful. The problem is that, every time I run grunt-init…
adipginting
  • 77
  • 1
  • 10
0
votes
0 answers

Variables in grunt-init

I'm trying to create a template project with grunt-init and would like to know if it is possible that grunt changes the content of the file by a values that I write down in other configuration file. Example: Imagine that I have a configuration file…
Adrian
  • 343
  • 2
  • 15
0
votes
1 answer

command line Node.js program using Grunt

Problem: Node.js command line program doesn't run. I followed this tutorial loosely. I run OSX, and let's say the program is filesearch.js. $ filesearch Returns $ /usr/local/bin/filesearch: line 1: /Applications: is a directory $…
ShaharZ
  • 389
  • 5
  • 11
0
votes
1 answer

Grunt-Init Conditional Prompts Template

I am getting started with grunt-init templating and trying to write conditional prompts. I've been kicking this around for a few hours, and have had no real success. It probably doesn't help that javascript isn't my strongest language. I found this…
user2855168
0
votes
1 answer

Grunt-init copyAndProcess function: Can I pass in multiple values to 'noProcess' option?

I'm using grunt-init to build a template for a site structure I repeat regularly. The template.js file uses the init.copyAndProcess function to customize most of files but a few of them get corrupted by the file processing (some fonts and image…
John Morton
  • 335
  • 1
  • 8