Giter Club home page Giter Club logo

grunt-docs's Introduction

grunt-docs's People

Contributors

adamstallard avatar alex-seville avatar alexcoady avatar ambar avatar aurelioderosa avatar bomsy avatar cowboy avatar dignifiedquire avatar giraffesyo avatar grimalschi avatar isaacdurazo avatar jackfranklin avatar jamesplease avatar jkveganabroad avatar jsoverson avatar leobalter avatar linssen avatar manuel-woelker avatar mrmartineau avatar ntwb avatar poppinlp avatar shama avatar sibstephen avatar sindresorhus avatar smithclay avatar thanpolas avatar vanquang9387 avatar vctr-dev avatar vladikoff avatar xhmikosr 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  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

grunt-docs's Issues

Change date to 2014

You asked someone to remind you to change the date in the grunt.template section.
:)

Bad example code in grunt.log docs?

The docs for grunt.log have this example at the bottom of the page:

grunt.registerTask('something', 'Do something interesting.', function(arg) {
  var msg = 'Doing something...';
  grunt.verbose.write(msg);
  try {
    doSomethingThatThrowsAnExceptionOnError(arg);
    // Success!
    grunt.verbose.ok();
  } catch(e) {
    // Something went wrong.
    grunt.verbose.or.write(msg).error().error(e.message);
    grunt.fail.warn('Something went wrong.');
  }
});

The line grunt.verbose.or.write(msg).error().error(e.message); seems wrong to me. Wouldn't you want the calls to error to be logged regardless of the verbose setting? As is, the errors will not be logged in verbose mode, which doesn't seem right. Or am I misunderstanding something?

Plugin Authoring page

Work in progress!

  • Explanation of how a Grunt plugin is just a custom task all packaged up and published through npm
  • General plugin structure (files, keywords, dependencies)
  • Example using grunt-init "gruntplugin" template?
  • "Including" other plugins by specifying them as peerDependencies

Note what version new features were introduced in.

For example, the extDot option for file globbing was added in 0.4.3 but the docs don't state this. Someone using an older version of Grunt might be confused as to why it's not working. Would it be possible to, both retroactively and in the future, add something like the following to new methods, options and method signatures?

SO AND SO DESCRIPTION OF THING. [Added in x.y.z]

Eg.

  • ext Replace any existing extension with this value in generated dest paths.
  • extDot Used to indicate where the period indicating the extension is located. Can take either 'first' (extension begins after the first period in the file name) or 'last' (extension begins after the last period), and is set by default to 'first'. [Added in 0.4.3]
  • flatten Remove all path parts from generated dest paths.

when i use the npm to install grunt show error..

When I use npm to install grunt, it show error:
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.
I have reset my $PATH, when I install the nodejs and npm. so I find out the brew , node and npm are all there. why I cannot install the grunt

How to make destination files' names with the source files

I'm filing the question here because it's a question I think it's a general grunt how-to question and not related to the tool itself or any of the modules.

grunt-cli v0.1.9
grunt v0.4.1

I have the following code to convert markdown to HTML. It works but the destination file takes the *.html name. Is there a way to make each HTML file take the name of the source file?

My expectation would be that each HTML file would take the name of its source in the markdown directory.

    markdown: {
      create: {
        files: {
          'html/*.html': ['markdown/**/*.md'],
          },
          options: {
            markdownOptions: {
              gfm: true,
            }
          }
        }
      },

Am I looking at the wrong way to list the files to work on? Any ideas of how I can make this work?

How do you add more scripts to package.json

I want to add another script in addtion to test, so that the final scripts in package.json will look something like:

  "scripts": {
    "test": "grunt test",
    "start": "node index.js"
  },

the following in template.js doesn't work:

            props.scripts = {
                'start': 'node index.js'
            };

what is the suggested method of doing this?

Add doc for the mini-badge.

Hey @vladikoff, @isaacdurazo & @cowboy.

Here is my first stab at the doc for the mini-badge just as a screenshot:

2013-11-02 at 20 24

Here just the copy:


grunt-mini-badge

Do you use Grunt in your projects and want to proudly display that in your project README on Github?

We too! That's why we had our very own Isaac Durazo make a nice mini-badge for you that you can place up top in your README. If you are using the Travis mini-badges ours fits nicely next to it.

Here is how you place it in your README:

First, Download the badge here and place it in the root of your project.

After you published that project to Github click through to the raw version of the mini-badge image file.

2013-11-02 at 20 10

And copy the URL.

Then insert the following code snippet into your README file just underneath the Headline and replace the copied link with the link in the snippet or replace the parts in caps with the correct names:

![Grunt Mini-Badge](https://raw.github.com/USERNAME-OR-ORG-NAME/REPO-NAME/master/grunt-mini-badge.png)

Let us know if you are using it on Twitter or on IRC in the #grunt channel.


Any feedback or thoughts?

Documentation unclear regarding array behaviour: `grunt.config.merge`

When merging an array property:

src: {
  prop: ['a', 'b']
}

overlay: {
  prop: ['c']
}

grunt.config.set('myConfig', src);
grunt.config.merge({ src: overlay.prop });

This produces {src: {prop: ['c', 'b']}}. I was expecting it to produce {src: {prop: ['c']}}, as the overlay.prop property should replace the src.prop property, right?

one to one in directory file maps

I was hoping to see how to describe a one to one file map so as to compile all my Coffee Script files into corresponding JavaScript files side by side in their respective folders. In particular, not to copy the JavaScript into a different root folder tree or concatenate the result into a single file or across several distinct files. Or any other complexity. The documentation does not seem to be clear on this particular point.

Grunt Error

Hello. I am running Windows 7 Pro. I have followed this article for references:
http://www.ghosthorses.co.uk/production-diary/installing-grunt-on-os-x-and-windows-7/#grunt_win7
and
http://gruntjs.com/getting-started

When I run npm uninstall -g grunt, it looks in the c:\users\appdata\roaming\npm\npm_modules folder where grunt is not installed but grunt-cli is. The grunt file is in grunt-cli\bin\ folder. I can copy the grunt file from bin to the npm_modules and the uninstall works.

I will then run the next command npm install -g grunt-cli, I would delete the orginal grunt-cli folder and the command re-creates it.

When I type grunt in the command prompt, it says it cant find grunt. I noticed it is looking again in the c:\users\appdata\roaming\npm\npm_modules folder. So I copy the grunt and grunt.cmd file to that folder and the command runs but now I get the error shown in the screenshot. I do have a .js file in a folder on my desktop. Am i suppose to edit the CMD file to point to that folder or do I have to specify the .js file?

error

install grunt from a package.json

Hi,
I copy a file package.json, then I made npm install.
But I have this mistake:

Tasks directory "tasks" not found.

I don't undestand what's mean ?

Thanks

Questions concerning the 0.4.2 announcement blog post

@cowboy @vladikoff

  • Will some plugins now fail because they expect the built-in helper functions and have "grunt": "~0.4.1" or "grunt": "0.4.x" as a dependency or ist is failsafe in place? If some could potentially fail that should be mentioned in the blog post
  • Is it enough to mention the Grunt collection deprecation and usage of peerDependency in the changelog? I think it could be beneficial to mention this change and to link to the peerDependency documentation or this Node.js blog post about them: http://blog.nodejs.org/2013/02/07/peer-dependencies/

Also I personally would love to see longer blog post that tell a little more about the story. That answers questions like: why are these deprecations happening. Continuously talking about the steps that have been taken towards 0.5.0. Just to massage the community and make them understand whats happening. Also since Grunt is getting more Node-y taking everybody along and make them learn how things are done in Node. What are the conventions Grunt is adopting now? Etc. etc.

In essence: The release blog posts are sparse. It would be nice if they were a little friendlier, expand on the Grunt story some more and take everybody along for the ride. Actively include the community in what is happening. Maybe be even somewhat celebratory, a new release is a great thing after all! :)

Thoughts?

"Brand Guide" information on recommended usage of the Grunt logo

I hate to ask this, but it seems to be a reality in corporate environments that this needs to be asked.

The Grunt web site needs to have an explicit statement about whether the Grunt logo can be used, and under what limitations, if any.

I'm publishing some internal training presentations in my enterprise, and I have a feeling I'm going to be forced to remove the Grunt logo from all of them, unless I can convince the legal team that this is reasonable. Without a legal statement addressing the ability to reuse the logo, I'm relatively certain they're going to tell me to remove it.

Grunt badge showing up as dead link in all my github readmes

I'm not sure exactly when this happened, but all of the grunt badge images I've used in my readmes are now showing as dead links. All were added to the readmes using the documented markdown:

[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)

The following is an attempt to use the above markdown in this issue, which also shows up as a dead image: Built with Grunt

While this might ultimately be a Github issue (though I don't really know), I figured it would be of importance to the grunt team as this is a great way of advertising its own usage, a means I use a lot throughout my repos.

Documentation - Configuring tasks is old

HI,

Today I was studing for a new setup of my Gruntfile, and googling about uglify and concat i found this page:
http://gruntjs.com/configuring-tasks

It tell to me to use both concat and uglify, but I know that uglify from a version that I don't know supports the concat. I think it's and old page but I'm not pretty sure, probably I missed something.

Instead, if i'm right, seemed right to call your attention because is a well indexed page on Google and I think that many people read it.

if I'm wrong because I don't understand the documentation and it explain other things that I can't figure out... Sorry. My bad.

Happy to lend a hand

By

grunt.template.today year

grunt.template.today('yyyy') // '2013'

(somebody remind me to update this date every year so the docs appear current)

You're welcome ;-)

Grammar/typo

http://gruntjs.com/getting-started

cmd+f for the following:

If you already have installed Grunt and is now searching for some quick reference, please checkout our Gruntfile example and how to configure a task.

In particular "...and is now searching..."

Replace Gruntfile with Gruntfile.js

All the docs mention "Gruntfile" - but where exactly does it actually say that this means "Gruntfile.js"? Not even the tasks error message mentions it...

A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.

If you start completely from scratch, this might be frustrating...

documentation on dynamic expansion

Could the documentation be improved to explain how dynamic expansion works as well some real live examples please. I understand most experienced devs will be able to look at the source and figure things out but I and perhaps others too, learn best by examples.

It would be useful to show how the the rename function works which is what I'm mainly interested in and how it is different from ext as i'm trying to dealing with files names which a period in them i.e. my.filename.png.

Waiting...Verifying property watch exists in config...Warning: undefined Fatal error: undefined

grunt -v --statck ,it shows the error message so many times,why?
Running "watch" task
Waiting...Verifying property watch exists in config...OK
Verifying property watch.build.files exists in config...OK
Warning: watch ENOSYS

Running "watch" task
Waiting...Verifying property watch exists in config...OK
Verifying property watch.build.files exists in config...OK
Warning: watch ENOSYS

Running "watch" task
Waiting...Verifying property watch exists in config...OK
Verifying property watch.build.files exists in config...OK
Warning: watch ENOSYS

Running "watch" task
Waiting...Verifying property watch exists in config...OK
Verifying property watch.build.files exists in config...OK
Warning: watch ENOSYS

Running "watch" task
Waiting...Verifying property watch exists in config...Warning: undefined
Fatal error: undefined

my Gruntfils.js is
watch: {
build: {
files: ['aa.js'],
tasks: ['uglify'],
options: {
spawn: false,
}
}
}

Provide some grunt-shell examples in the official tutorials

Coders who tend to lean on Makefiles (myself included) could benefit a lot from learning grunt. However, there doesn't seem to be much documentation for how to actually accomplish the same things in grunt. Could we please provide a few, brief examples of writing dependent shell tasks with a Gruntfile.js?

Missing grunt-file exit code was 99, documentation details exit code 2

http://gruntjs.com/api/exit-codes says missing grunt file should return exit code 2.

I ran the following and got exit code 99:

$ grunt --no-color --gruntfile ["web/app/themes/roots/Gruntfile.js"] build
grunt-cli: The grunt command line interface. (v0.1.13)

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:

http://gruntjs.com/getting-started
$ echo $?
99

nonull

There is a mistake in the 'files' section of the configuring task. Or else, it is very confusing.

"When a match is not found, return a list containing the pattern itself. Otherwise, an empty list is returned if there are no matches."

In my opinion the line should be "When a match is (..) found, retun a list containing the pattern itself..."

Definition of multi tasks

Throughout the docs there are multiple references to "multi tasks", but it is not definied/explained anywhere.

Fatal error: Unable to find local grunt.

Pretty much my user experience with grunt:

>grunt
grunt-cli: The grunt command line interface. (v0.1.11)

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:

http://gruntjs.com/getting-started

Ok, then:

>sudo npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http 304 https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/resolve
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
[email protected] /usr/local/lib/node_modules/grunt-cli
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
> grunt

Same as above

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.