Git Product home page Git Product logo

grunt-init-jquery's Introduction

grunt-init-jquery

Create a jQuery plugin with grunt-init, including QUnit unit tests.

Installation

If you haven't already done so, install grunt-init.

Once grunt-init is installed, place this template in your ~/.grunt-init/ directory. It's recommended that you use git to clone this template into that directory, as follows:

git clone https://github.com/gruntjs/grunt-init-jquery.git ~/.grunt-init/jquery

(Windows users, see the documentation for the correct destination directory path)

Usage

At the command-line, cd into an empty directory, run this command and follow the prompts.

grunt-init jquery

Note that this template will generate files in the current directory, so be sure to change to a new directory first if you don't want to overwrite existing files.

grunt-init-jquery's People

Contributors

bantic avatar cowboy avatar davetayls avatar hkdobrev avatar jamesmgreene avatar jzaefferer avatar shama avatar sindresorhus avatar vladikoff avatar

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

Watchers

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

grunt-init-jquery's Issues

use grunt-init /path/to/template

use
grunt-init /path/to/template

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

how to valid template name?

use rename.json?

Fatal error: Arguments to path.join must be strings

After running grunt-init --force --stack jquery and answering questions here's what I got:

Writing .gitignore...OK
Writing .jshintrc...OK
Writing CONTRIBUTING.md...OK
Writing Gruntfile.js...OK
Writing README.md...OK
Writing libs/jquery-loader.js...OK
Writing libs/jquery/jquery.js...OK
Writing libs/qunit/qunit.css...OK
Writing libs/qunit/qunit.js...OK
Writing src/.jshintrc...OK
Writing src/eyeline.js...OK
Writing test/.jshintrc...OK
Writing test/eyeline.html...OK
Writing test/eyeline_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/local/lib/node_modules/grunt-init/node_modules/grunt/lib/grunt/file.js:397:28)
    at Object.grunt.util._.extend.copy (/usr/local/lib/node_modules/grunt-init/tasks/init.js:343:25)
    at /usr/local/lib/node_modules/grunt-init/tasks/init.js:381:16
    at Array.forEach (native)
    at Object.grunt.util._.extend.copyAndProcess (/usr/local/lib/node_modules/grunt-init/tasks/init.js:367:28)
    at /Users/hkdobrev/.grunt-init/jquery/template.js:73:10
    at /usr/local/lib/node_modules/grunt-init/tasks/lib/prompt.js:124:13

Add options to collection method

Hi!
I opened this at yeoman/jquery-generator and was told to open it here as well given that project's based off grunt-init-jquery.

Essentially, it's a bit weird that the static method is given its own default options object scaffold but the collection method isn't. While modifying the scaffold to work with the static method is pretty trivial, it might confuse neophyte jQuery developers looking to grunt-init-jquery for implementing best practices (Especially considering I've seen the default options idiom used quite extensively for collection-based plugins).

Thus, the suggestion is to either:

a. Implement the default options scaffold object more globally, so it works with both the collection and static methods
b. Give the collection method its own default options scaffold

Let me know if you want me to write a pull request. Thanks!

Fatal error in Windows XP even if the template is installed correctly

Im having a similar issue as the user before, except under "Available templates" it list
jquery creaet a Jquery plugin, including QUnit unit test.

then I get a fatal error.

Im using Command Prompt for Windows Xp
Node version
V0.10.21

grunt version
grunt-cli v.0.1.13
grunt v0.4.0-rc8

Please help. Im not sure why I cant use "grunt-init jquery" to install package

generated _.jquery.json does not match specs

'repository' is not one of the fields for the _.jquery.json file
The GitHub API provides the repository location when it does the "Post-Receive Hook"
http://plugins.jquery.com/docs/publish/

The 'download' field is neither output nor prompted for, but somehow the init script generates download links on the README.md file. It would be nice to make that consistent.

'keywords' (optional) is output as an empty array --there is no prompt to populate it

other fields that could be added, even if empty (so that the project owner could at least see that there are some blanks that could be filled in)
'docs' (optional) no output, no prompt
'demo' (optional) no output, no prompt
'maintainers' (optional) no output, no prompt

jQuery plugin specs http://plugins.jquery.com/docs/package-manifest/

No text for questions

I am using iTerm and oh my zsh. when running grunt-init jquery in an empty folder. the please answer the following: section does not have any text for the questions... See image

screen shot 2013-06-14 at 3 37 21 pm

Please help me what to do... I just did the git clone that is in readme today...

Fatal error in Windows even if the template is installed correctly

I've installed node.js via .msi and grunt-cli, grunt-init via npm. Then cloned this repo in %USER_PROFILE%/grunt-init.

But when I try to create a new project here's what I am getting:

C:\Users\Name\jqueryGrunt>grunt-init jquery
Running "init:jquery" (init) task
Loading "jquery" init template...ERROR

A valid init template name must be specified.

Available templates
 grunt-init-jquery  Create a jQuery plugin, including QUnit unit tests.

Templates that exist in the C:\Users\Just\.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.

C:\Users\Name\jqueryGrunt>

Here is node.js version

>node -v
v0.10.0

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.