Skip to content

Import/upgrade basic grunt tools into 3.x skeleton. #129

@beporter

Description

@beporter

Old README.md.template block:

### CSS Changes

* CSS is managed via LESS source files.
* LESS source files are located in `webroot/less/`.
* Run `grunt less` to process the `webroot/less/` files and output compiled CSS files in `webroot/css/`.
* **Commit both the .less and the .css changes** back to the repo as you work.
    * (Until a CDN is set up, static assets will be served from the app server directly.)

.less files of note:

* `global.less` is included everywhere in the site.
* `public.less` is referenced in only the default (public) layout and will override anything in global.
* `admin.less` is referenced only in the admin layout and will also override global.
* LESS resources can be broken out into logical files and `@import`ed into global, public or admin collections as appropriate.
* By default, bootstrap is `<link>`ed separately in the default.ctp layout, but can be rolled into global.less if desired.


### Other grunt Commands

* _(no args)_ or `watch` - Starts the file watcher and auto-executes tests for any php file that changes (and has a test file associated with it.) Also watches .less files and compiles them into CSS on change.
* `less` - Compiles .less files into CSS.
* `test` - Executes the Mocha Javascript test suite.

These were good basic tools to have available in all projects and I lament their loss in the current Cake 3 skeleton.

The run-tests-on-save command in particular is going to need some new logic written for it, since we're engaging PHPUnit directly in Cake 3 projects instead of going through the Cake TestShell that was available in 2 but that's not insurmountable since the src/ and tests/ directories still mirror each other nicely.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions