Code Monkey home page Code Monkey logo

grunt-init's Introduction

grunt-init Build Status

Grunt-init is a scaffolding tool used to automate project creation.

Introduction

Check out our project scaffolding guide for a primer on how to use grunt-init.

Documentation

The project scaffolding guide has API documentation and usage examples.

Support / Contributing

Before you make an issue, please read our contribution guide.

You can find the grunt team in #grunt on irc.freenode.net.

grunt-init's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-init's Issues

renames not working properly

using the latest rc2 on windows. grunt-init is copying files that are set to false in rename.json. this contradicts the way it is suppose to behave.

i should note its handling the renaming just fine.

Values from defaults.json only applied to build-in prompts

Background

As i create a custom prompt in my template.js like:

 {
    name: 'langcode',
    message: 'The language of the default index.html',
    default: 'en',
    warning: 'It must be an 2 character language code.'
 }

It will always get the value "en" as the default. Even though I added "langcode to my _defaults.json".

Expected behaviour

It should use the value from the defaults.json as its default value if the key "langcode" is present in defaults.json

Extra info

  • same thing happends if I make the defaults a function instead of a string.
  • the defaults.json is loaded because the values are used in different prompts in the same template.js

Ability to skip a prompt

IMHO one of important features that grunt-init lacks is ability to skip a question (prompt) depending on answers for previous questions (results of previous prompts).
For example, consider the following excerpt (actually it is prompts from grunt-init-pack template):

{
    name: "travis",
    message: "Will this project be tested with Travis CI?",
    "default": "Y/n",
    warning: "If selected, you must enable Travis support for this project in https://travis-ci.org/profile",
    sanitize: convertYesNo
},
{
    name: "travis_badge",
    message: "Would you like to include Travis build status badge into README.md?",
    "default": function(value, data, done) {
        done(null, yesRegExp.test(data.travis) ? "Y/n" : "y/N");
    },
    sanitize: convertYesNo
},

When a user answers no for travis prompt, travis_badge prompt should be skipped. Unfortunately it is impossible in current version.

I propose to add support for prompt's options that will allow specifying pre-action and maybe post-action (of course they should be functions). Let’s name those actions before and after. So that when false value (exactly) is returned from before action, the corresponding prompt will be skipped.
What do you think about this?
I can make pull request if this proposal will be approved.

grunt-init falls over on Liquid templates

Trying to use grunt-init to scaffold a project that uses Liquid templates and there's a conflict with Liquids' {% %} syntax throwing the error:

Warning: An error occurred while processing a template (Unexpected string). 

Any way to escape these or something?

enable copy empty directories

I want copy an empty directory from my root folder into the new initialized project. I want do this, to provide an initial directory structure for new projects.

I have such empty directories in the folder 'my-template/root/' but that will not be copied by:

    // Files to copy (and process).
    var files = init.filesToCopy(props);

    // Actually copy (and process) files.
    init.copyAndProcess(files, props);

I tried this:

    // to copy also the empty directories
    init.copy('myDir1/');
    init.copy('myDir2/');

But than grunt-init crashes with:

Error: Unable to read "grunt-init-example/root/myDir1/" file (Error code: EISDIR).

But yes, I know that this is a directory, that is, what I want. Why this is an error?

What have I to do, to get an empty directory to the destination folder?

I use [email protected] and [email protected].

Dependent Questions?

I love grunt-init and am wondering if it is possible to create questions that are only presented based on the answer of a previous question. Anyone know? This would be awesome!

Add a "gallery" of templates

Would be great if grunt-init had a wiki entry or *.md file where is the list of all templates that are available.

For example I'm working in this template (node related) but I'd like to know if anybody else is working in something similar or another scaffold.

Question: Grunt Init & Yeoman

I have a question regarding the relationship of Grunt and Yeoman. According to this wiki page:

In the coming months, Yeoman will completely replace grunt-init.

I am working on building a set of project boilerplates for personal/freelance use as well as for the company I work for. Unfortunately, there are some drawbacks to the opinionated nature of Yeoman that make it unlikely to fly at work (although it is great for my personal work). So I was hoping to use a simple(er) grunt init task. Reading the above made me doubt the decision.

So my question is, what is the roadmap for this project?

And thanks for the great work!

Cannot call method 'apply' of undefined

I recently moved to grunt-cli and ditched global grunt v0.3.x. I'm trying to install grunt-init globally and ran into an issue where it wasn't being added to the PATH because of the missing bin file or what have you, so I found issue 29 (#29), uninstalled grunt-init, ran npm cache clear and reinstalled [email protected] so the shell is at least recognizing the grunt-init command, but not when I try to run grunt-init --help (or any other grunt-init command) I get a fatal error

$ grunt-init --help
Fatal error: Cannot call method 'apply' of undefined

or trying to scaffold a template

$ grunt-init gruntfile
Running "init:gruntfile" (init) task
Warning: Cannot call method 'apply' of undefined Use --force to continue.

Aborted due to warnings.

Any ideas?

grunt version

$ grunt --version
grunt-cli v0.1.6

and Grunt Init version

$ grunt-init --version
grunt-init v0.2.0rc3
grunt v0.4.0rc5

I'm stumped.

No template names

grunt-init is not working to me: I have just npm installed its latest version (globally) and I'm unable to issue the following command:

$ grunt-init gruntplugin

I'm trying to do that because I following this guide: https://github.com/gruntjs/grunt/wiki/Creating-plugins

The appearing error message tells me the "gruntplugin" template name is invalid, then lists available names and there aren't any.

Scripting Grunt-Init

Bower supports usage through a public API.
It would be great to have the same capabilities for grunt-init.
I would like to use grunt-init from inside another program which would include enhancing the search path for template directories.

Should binary files be treated as noProcess by default?

Currently copyAndProcess attempts to process binary file data, e.g., images, as templates when copying them to the new project. This can be fixed by setting the noProcess option. However, it is very unlikely that someone would ever want to process binary file data as a text template - perhaps the default should be not to process them as templates?

cc @davidpfahler

copyAndProcess converts line ending to system specific line ending, I don't want that!

I working on windows. but all files I work with have unix like line ending.
But if I create some files with a grunt-init script which use copyAndProcess, all files have system specific line endings. I don't want that! Thats makes the generated files and so also grunt-init useless for me.

How can I specify, that I want always '\n' as line ending?

May be the problem is the internal use of grunt.template.process.

automate git pull of scaffold project before creating copy of project

Hello,

I work in a team where we build multiple projects each month. Every project uses grunt, I look after the team and have built a project scaffold that the team use, initiating each project with a grunt-init.

As I update the project scaffold, I need to get everyone in my team to git pull origin master inside .grunt-init/[scaffold-name]. They are TERRIBLE at remembering to do this and I have had to go through their generated scaffold to manually add in changes many times.

What would be awesome is when they ran the command grunt-init [scaffold-name] the process ran git pull origin master before copying the project. This could be an option set in the grunt-init settings file.

What do you think?

/t

Installation not working on OSX

Hello.

I've just tried installing grunt init. The npm install seems to go fine but I cannot seem to run the grunt-init command.

Here is my install log:

sudo npm install -g grunt-init npm http GET https://registry.npmjs.org/grunt-init npm http 304 https://registry.npmjs.org/grunt-init npm http GET https://registry.npmjs.org/semver npm http GET https://registry.npmjs.org/prompt npm http 304 https://registry.npmjs.org/semver npm http 304 https://registry.npmjs.org/prompt npm http GET https://registry.npmjs.org/async npm http GET https://registry.npmjs.org/pkginfo npm http GET https://registry.npmjs.org/colors npm http GET https://registry.npmjs.org/winston npm http 304 https://registry.npmjs.org/pkginfo npm http 304 https://registry.npmjs.org/async npm http 304 https://registry.npmjs.org/colors npm http 304 https://registry.npmjs.org/winston npm http GET https://registry.npmjs.org/eyes npm http GET https://registry.npmjs.org/stack-trace npm http GET https://registry.npmjs.org/loggly npm http 304 https://registry.npmjs.org/loggly npm http 304 https://registry.npmjs.org/stack-trace npm http 304 https://registry.npmjs.org/eyes npm http GET https://registry.npmjs.org/timespan npm http GET https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/timespan npm http 304 https://registry.npmjs.org/request [email protected] /usr/local/lib/node_modules/grunt-init ├── [email protected] └── [email protected] ([email protected], [email protected], [email protected], [email protected])

I can't see any kind of symlink in /usr/local/bin

I've already got grunt-cli installed fine.

Running:
Node 0.8.8
OSX Lion
oh-my-zsh shell

It looks like the bin isn't being copied/symlinked during install?

My /usr/local/lib/node_modules/grunt-init looks like this:

-rw-rw-rw- 1 nobody staff 40 3 Oct 20:57 AUTHORS
-rw-rw-rw- 1 nobody staff 0 3 Oct 20:57 CHANGELOG
-rw-rw-rw- 1 nobody staff 937 8 Oct 23:58 Gruntfile.js
-rw-rw-rw- 1 nobody staff 1076 3 Oct 20:57 LICENSE-MIT
-rw-rw-rw- 1 nobody staff 94 3 Oct 20:57 README.md
drwxrwxrwx 5 nobody staff 170 18 Dec 13:14 docs
drwxr-xr-x 5 nobody staff 170 18 Dec 13:14 node_modules
-rw-rw-rw- 1 nobody staff 1159 18 Dec 13:14 package.json
drwxrwxrwx 5 nobody staff 170 18 Dec 13:14 tasks
drwxrwxrwx 3 nobody staff 102 3 Oct 20:57 test

Grunt init flag to accept all defaults without user input

Similar to apt-get install -y, just take the defaults for all values and don't prompt user for input. Would help during debugging of Grunt init templates.

Would like to apply a grunt template to a client and test it with the following command bash rm -rf * && grunt-init -y ~/PathToTemplate && grunt test

init.prompt error on undefined property

I create a file a template.js file at ~/.grunt-init/test/template.js with the following contents:

exports.template = function(grunt, init, done) {
  init.process({}, [
    init.prompt('name', 'test'),
    init.prompt('hello', 'goodbye')
  ], function(err, props) {
    console.log(props);
  });
};

When I run grunt-init test it throws an error on the hello property:

Warning: Cannot set property 'name' of undefined Use --force to continue.

Running the command with --stack produces the following:

TypeError: Cannot set property 'name' of undefined
    at Object.exports.init.exports.prompt (/usr/local/lib/node_modules/grunt-init/tasks/lib/prompt.js:142:17)
    at Object.exports.template (/Users/donaldchea/.grunt-init/test/template.js:5:10)
    at Object.module.exports (/usr/local/lib/node_modules/grunt-init/tasks/init.js:458:27)
    at Object.task.registerTask.thisTask.fn (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt/task.js:78:16)
    at Object.Task.start._running (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/util/task.js:282:30)
    at Task.runTaskFn (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/util/task.js:235:24)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/util/task.js:281:12)
    at Task.start (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/util/task.js:290:5)
    at Object.grunt.tasks (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt.js:155:8)
    at Object.module.exports [as cli] (/usr/local/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt/cli.js:38:9)

It seems to be related to the _.clone. It's getting passed undefined because exports.prompts[name] doesn't exist (in this case, exports.prompts.hello).

Updating that line and defaulting it to an empty object if it's undefined seems to fix it:

var option = grunt.util._.clone(exports.prompts[name]) || {};

I'm not sure if that's the correct fix but when I run it with that in place, the console.log produces the following:

{ name: 'test',
  hello: 'goodbye',
  js_safe_name: 'test',
  js_test_safe_name: 'myTest' }

Add super basic support for loading a non-default template

This would probably help a lot. Maybe allow something like this:

grunt-init /path/to/tasks/init/custom-template.js

To do what this does:

grunt-init --tasks /path/to/tasks custom-template

Which is to support a custom init template.

gitignore turns into .npmignore after running grunt-init

I have a template that contains a .gitignore in the root/ folder. After I run the grunt-init scaffolding, this file turns into a .npmignore file. Is this done intentionally? Possibly a way to turn this off?

Otherwise, I guess I will have to run script to rename it back.

make into stand-alone, globally installable module?

If this was a stand-alone module, then grunt won't need to depend on it anymore. Which means the transition to grunt + init to grunt + yeoman will be much easier, and development of grunt will be easier too.

@tkellen do you want to take a stab at making this a stand-alone, globally installable module, that has a bin and just contains grunt as a dependency?

rename.json template reading does not parse properly

When trying to create a rename.json that uses false, things are not parsed correctly.

If you look at this line of code, it makes it so that the destination path needs to be the value false (not the string 'false').
https://github.com/gruntjs/grunt-init/blob/master/tasks/init.js#L302

But, the parsing of rename.json does not seem to support templates outside of actual values in the json.

So, this gets parsed correctly, but will end up with a file named "false".

"requirements.txt": "{%= (python_dependencies.length > 0) ? 'requirements.txt' : 'false' %}"

But, this raises an error, "Unable to parse "rename.json" file (Unexpected token %)"

"requirements.txt": {%= (python_dependencies.length > 0) ? '"requirements.txt"' : 'false' %}

I have been trying to dig in the code a bit to see what specific part is causing this issues. Any help would be appreciated.

Thanks for an awesome project!

Error: Arguments to path.join must be strings while building gruntplugin template

While trying to grunt-init gruntplugin I am getting the following error:
Fatal error: Arguments to path.join must be strings

This only seems to happen if I provide custom value to Project git repository question. If I leave it at default, the script finishes successfully.

UPDATE: Further testing revealed and @jchris confirmed that this is related to a misspelled value in the Licenses question. Not sure, however, why it would fail for BSD-3-Clause.

I have no idea where to look in the code base, but here's the full stack trace that is shown upon the error. If there's more info I can provide just let me know.

Thanks for your help!

Please answer the following:
[?] Project name (grunt-npm-publish) 
[?] Description (The best Grunt plugin ever.) 
[?] Version (0.1.0) 
[?] Project git repository (git://github.com/BeBe/grunt-npm-publish.git) git://github.com/Dreamscapes/grunt-npm-publish.git
[?] Project homepage (https://github.com/Dreamscapes/grunt-npm-publish) 
[?] Project issues tracker (https://github.com/Dreamscapes/grunt-npm-publish/issues) 
[?] Licenses (MIT) BSD-3-Clause
[?] Author name (Robert Rossmann) 
[?] Author email ([email protected]) 
[?] Author url (none) https://github.com/Alaneor
[?] What versions of grunt does it require? (~0.4.2) 
[?] What versions of node does it run on? (>= 0.8.0) 
[?] Do you need to make any changes to the above before continuing? (y/N) 

Writing .gitignore...OK
Writing .jshintrc...OK
Writing Gruntfile.js...OK
Writing README.md...OK
Writing tasks/npm_publish.js...OK
Writing test/expected/custom_options...OK
Writing test/expected/default_options...OK
Writing test/fixtures/123...OK
Writing test/fixtures/testing...OK
Writing test/npm_publish_test.js...OK
Fatal error: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.file.isPathAbsolute (/usr/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt/file.js:397:28)
    at Object.grunt.util._.extend.copy (/usr/lib/node_modules/grunt-init/tasks/init.js:343:25)
    at /usr/lib/node_modules/grunt-init/tasks/init.js:381:16
    at Array.forEach (native)
    at Object.grunt.util._.extend.copyAndProcess (/usr/lib/node_modules/grunt-init/tasks/init.js:367:28)
    at /Users/BeBe/.grunt-init/gruntplugin/template.js:80:10
    at /usr/lib/node_modules/grunt-init/tasks/lib/prompt.js:124:13

Add grunt-init-packagefile

Works the same way as grunt-init-gruntfile except it produces a package.json file.

grunt-init-node already does a great job of this but it works from the standpoint of scaffolding a new project.

grunt-init-packagefile would work from the standpoint of adding a package.json file to an existing project that's adding NPM support or projects that can't fall into the opinionated folder/file structure of a typical node application.

Question: Is there a sample of using glob replace in rename.json?

I'm trying to create a rename.json file that will do a search/replace on multiple files at once using the glob matching. Is this possible?

For example:

Files in template could be Test1.js, Test2.js, ..., Test9.js. I'd like to replace Test with a prompt in each one. So if my prompt was named 'Company', I would like to rename files Company1.js, Company2.js, ..., Company9.js using a single rename.json entry such as this:

{
"Test_.js" : "{%= Company %}_.js"
}

instead of putting a single entry for each of the 9 files.

Using grunt-init in other projects -- distributing with custom templates?

I'm working on a developing a small custom generator & build tool, to clean up and consolidate some processes already built in grunt.

Ideally, I'd be able to make a new project leveraging grunt-init to distribute a custom bundle of templates which can be updated easily via npm.

For example:

$ npm install custom-init -g
$ custom-init specialtemplate
...
$ npm update -g 
// specialtemplate is updated

The only current way to get a user custom templates involves two global dependencies, grunt-init and a user files dir. The user files lose the convenience of npm, and make the system generally less updatable and modular.

I'm wondering if you can consider adding features to grunt-init to make it more suitable for use in distributable modules. For instance, reading a config or a pre-defined templates directory outside of grunt-init itself.

Automate npm install of generated Gruntfile.js dependencies

It feels wrong having to manually install the grunt plugins for a given scaffolding rather than having an option to install all the dependencies along with creating a new scaffolding.

Essentially, any grunt.loadNpmTasks in the Gruntfile.js should be converted to a command-line npm install.

Example:

After running grunt-init jquery, the following loadNpmTasks exist in the Gruntfile.js:
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-contrib-watch');

The desire is to turn these into:
npm install grunt-contrib-clean grunt-contrib-concat grunt-contrib-uglify grunt-contrib-qunit grunt-contrib-jshint grunt-contrib-watch

I realize that it might not be possible to maintain/detect the need for sudo, but perhaps a flag to grunt-init (-s) could be used to indicate sudo use.

grunt-init is not added to PATH

When installing grunt-init, it is not added to the PATH as said in the documentation. Installing it as a regular user or with sudo makes no difference. I check /etc/paths, /etc/paths.d/ and ~/.bash_profile but there's no new entry added.

There is no bin folder in /usr/local/lib/node_modules/grunt-init and thus no symlink in /usr/local/bin or /usr/local/lib/node_modules/.bin to start the grunt-init task.

I'm working on a Mac, but apparently it seems to be also on Windows, as a new post on stackoverflow implies: http://stackoverflow.com/questions/14071915/grunt-init-not-recognised-added-to-path-windows

Just to say: I use dotfiles (http://dotfiles.github.com) and chown'ed the /usr/local/lib/node_modules to be owned by my user. These are the two things I can think off, that might relate with this issue.

Is the location of the project templates configurable?

I've read through the documentation/source and I know by default it looks in the tasks/init dir as well as the users /.grunt/tasks/init dir for tasks.

What I'm trying to do is build a deployable solution with some prepackaged templates to choose from. How would I go about doing this without modifying grunt source?

Thank you

noProcess globbing patterns

Hi wonderful grunt people :)

I'm not quite sure I understand how the noProcess option gets used in the copyAndProcess method.

I have the following code:

init.copyAndProcess(files, props, {noProcess: '{node_modules,vendor}/**'});

But get the following error

Writing source/vendor/kriswallsmith/assetic/README.md...
Warning: An error occurred while processing a template (Unexpected string). Use --force to continue.

Surely that file shouldn't be processed at all because it should match vendor/**?


Versions:

grunt-cli v0.1.9
grunt v0.4.1

Conditional prompts

I hate to ask an "is it possible" question but I can't seem to find a yes anywhere so I'm going to assume it isn't possible. I'd like to have conditional prompts. Such as only show these prompts if this function returns true (in which this function has the values from the previous prompts).

A dialog along these lines is what I'm looking for:

# Asking which preprocessor to use...
$ Stylesheet preprocessor (sass/none) [none] ? 
sass

# Iff sass was chosen...
$ SASS standard library (compass/bourbon/none) [none] ?
# ... else it would default to none

Thanks and apologies if this is possible and I'm just being blind about seeing how.

Dark text for questions in grunt-init

I'm embarrassed to say that I wasn't able to quickly figure out where the color for the text of option names was set. In the color scheme I'm using - Solarized - option names, like "Project Name" are displayed in an almost unreadable black. I've included a screenshot as an example.

I'm using iTerm2. Let me know if I can clarify at all -- it'd be great to get this changed to a readable color. If it turns out to be due to some weird local setting on my part, please accept my preemptive apology.

Change ~/.grunt-init/ directory structure for better shareability

Right now, init templates can't be used in a "standalone" way, that is, if I am creating a template in a repo like this

my-proj-repo
├── README.md
├── my-proj
│   └── root
│   ├── Gruntfile.js
│   └── js
│   └── main.js
└── my-proj.js

I can't just include it in ~/.grunt-init/, because the template dir and the template.js have to be in the top level of the directory

I am proposing the following workflow

  • cd ~/.grunt-init
  • git clone https://github.com/myorg/my-proj-repo
  • cd ~/projects/newone
  • grunt-init my-proj-repo

However, there's still a bit of redundancy in the repo at that point. Perhaps, at that point, a structure like

my-init-template
├── README.md
├── template
│   ├── Gruntfile.js
│   └── js
│   └── main.js
└── template.js

(renaming the root dir to template dir, and the arbitrarily named .js file to simply template.js)

would make sense, and then people could simply clone my-init-template into ~/.grunt-init, and invoke it however they named that clone.

Thoughts

Init path error in windows

Init task get wrong agruments in https://github.com/gruntjs/grunt-init/blob/v0.2.0/tasks/init.js#L34

C:\Users\popomore\tmp>grunt-init C:\Users\popomore\.grunt-init\arale
Running "init:C:\Users\popomore\.grunt-init\arale" (init) task
Loading "C" init template...ERROR

A valid init template name must be specified.

Available templates
 arale  Create Arale module.

Templates that exist in the C:\Users\popomore\.grunt-init directory may be run
with "grunt-init TEMPLATE". Templates that exist in another location may be run
with "grunt-init /path/to/TEMPLATE". A template is a directory that must
contain, at the very minimum, a template.js file.

For more information, see http://gruntjs.com/project-scaffolding

Fatal error: A valid init template name must be specified.

Why use ~/.grunt-init?

Why must the templates be installed in ~/.grunt-init? Can't they be bundled with the task itself, like how yeoman generators do it? It seems like this adds an unnecessary step to someone using my grunt init task.

grunt-init cannot find template on different drive in Windows

Environment:

  • Windows
  • HDD separated at least to 2 logical disks (c: and d:)

How to reproduce the problem:

  • save a template somewhere in disk c: but not in user directory %USERPROFILE%\.grunt-init\ ; for example, in c:\grunt-init\gruntplugin
  • switch to some directory in disk d: and run the following command: grunt-init c:\grunt-init\gruntplugin

There will be error message about not found template.
The problem takes place because : char is treated as task's arguments separator by grunt.

The workaround is the following: escape : char.
For example: grunt-init c\:\grunt-init\gruntplugin

Include the required contrib projects in the template Gruntfile

The Gruntfile.js create by the init task is not runable because it requires several grunt-contrib tasks added to the devDependancies along with the load calls

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');

Add a deprecation message

I spent time writing a full generator using grunt-init, just to learn once I was done that grunt-init will someday die in favour of yeoman.

I think it should put a message in the repository description so people can choose wether they really want to use grunt-init or maybe start right away with Yeoman.

Bug with image

When copying files spoil all the images.
Before:
screenshot 2
After
screenshot 1
With other files all okay.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.