kokarn / atom-grunt-runner

Run Grunt tasks from Atom.
MIT License
31 stars 23 forks source link

Is there a way to pass arguments to a grunt task? #77

Open sivakuna-aap opened 8 years ago

sivakuna-aap commented 8 years ago

At the moment, the task starts running the moment a grunt task is selected. Some of grunt tasks we use in the project need options and does this plugin supports this kind of functionality?

kokarn commented 8 years ago

Can't you define that in your Gruntfile.js?

        postcss: {
            options: {
                map: true,
                processors: [
                    require( 'autoprefixer' )(),
                    require( 'postcss-opacity' )()
                ]
            },
            default: {
                src: 'www/css/style.css',
                dest: 'www/css/style.prefix.css'
            }
        }
sivakuna-aap commented 8 years ago

That's how I am doing it, at the moment. Thought if this option is there then it would be great.

kokarn commented 8 years ago

I'm not sure if I understand exactly what you mean but the runner only runs the defined tasks from the Gruntfile. If it has options, those will be included.

sivakuna-aap commented 8 years ago

Ah! I get it now what you mean by options. I was pointing to arguments. Sorry for the confusion. I re-phrase my question - is there a way to pass runtime arguments?

kokarn commented 8 years ago

Not outside of those defined in the Gruntfile, no. Shouldn't be that hard to add if you feel like doing a pull request :)

sivakuna-aap commented 8 years ago

OK