Yii Framework Forum: Grunt Tasks For Yii Project - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Grunt Tasks For Yii Project Install via Yo - lots of handy tools Rate Topic: -----

#1 User is offline   LokisHat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 25-April 14

Posted 18 June 2014 - 07:49 AM

I've created a Yo generator that creates a pre-built Gruntfile.js and package.json in your projects root directory which has a number of tools I've found useful for managing your Yii project.

GitHub Page: https://github.com/O...r-gruntfile-yii
Generator Package Page: https://www.npmjs.or...r-gruntfile-yii

Once installed (using the instructions on either of those pages above) you can run tasks like:

grunt -h #show tasks

Run all default tasks (PHP Lint, PHP CS, PHP Mess Detector, PHPCPD, etc
grunt

Run PHP Code Sniffer on all components, controller & models
grunt phpcs 

As above but only on models
grunt phpcs:models

As above but only on controllers
grunt phpcs:controllers

Run PHP Mess Detector on controllers
grunt phpmd:controllers

Run PHP Copy/Paste Detector on models
grunt phpcpd:models

Run PHP Mess Detector on all compnents, controller & models
grunt phpmd


Many, many more - check the grunt file and feel free to edit to your needs.

Feel free to contribute with ideas, issues, bugs and pull requests.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users