Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use grunt-newer with grunt-config? #108

Open
luxmedia opened this issue Dec 22, 2014 · 6 comments
Open

How to use grunt-newer with grunt-config? #108

luxmedia opened this issue Dec 22, 2014 · 6 comments

Comments

@luxmedia
Copy link

Hello, how can i use the grunt-newer plugin within load-grunt-config?

If i follow the instructions i should prefix the tasks (i suppose in my aliases.yaml) with newer:. What i get is the following error:

Running "newer:scripts" (newer) task
Fatal error: The "newer" prefix is not supported for aliases

I think its not as easy as i thought to implement -newer within grunt-config, isn't it?

A second question: Whats about loading tasks/plugins without the grunt- namespace? I tried the wildcard * instead of grunt-* in the grunt-config but without success. "The task could not be found ..."

Regards
Volker

@apla
Copy link

apla commented Jun 27, 2015

same problem. fixed using aliases file

@kyvour
Copy link

kyvour commented Apr 16, 2016

+1

@SolomoN-ua
Copy link
Collaborator

Hi guys, can someone provide an example of configuration, for testing purpose?

@kyvour
Copy link

kyvour commented Apr 17, 2016

newer works OK for me. There is my aliases.yml file:

css:
  description: |
    Task for development.
    The task performs minification for images, compilation of scss files in
    development mode and process styles with postcss plugins.
    You can use this task when you need only rebuild your css.
    To run this task you should use 'grunt css' command.
  tasks:
    - newer:imagemin
    - sass:dev
    - newer:postcss:css

js:
  description: |
    Task for development.
    The task checks javascript files for coding standards and makes some their
    beautification.
  tasks:
    - newer:jshint
    - newer:uglify:beauty

dev:
  description: |
    Task for development.
    The main task for process theme in a development mode.
    This task processes all subtasks for this theme: performs minification for
    images, checks javascript files files for coding standards and makes their
    beautification, compiles scss files in development mode and processes styles
    with postcss plugins.
  tasks:
    - newer:imagemin
    - newer:jshint
    - newer:uglify:beauty
    - sass:dev
    - newer:postcss:css

devcr:
  description: |
    Task for development.
    Task is the same as 'dev' task, but additionally it rebuilds drupal cache.
  tasks:
    - dev
    - shell:cr

@kyvour
Copy link

kyvour commented Apr 17, 2016

I had the same error twice. In the first case I tried to add 'never' to the 'dev' task which called in 'devcr' task and the second time with imagemin task, but there was a typo.

So as I understand, you can't use 'newer' with your custom tasks that contains tasks from grunt plugins

@SolomoN-ua
Copy link
Collaborator

Hi guys, I'm currently trying to investigate this problem... will keep you informed, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants