Skip to content
bearded-avenger edited this page Oct 7, 2014 · 3 revisions

Code compilation and concatenation are taken care of via Grunt. Assuming you already have Grunt installed, CD to the repo directory, and run npm install to install the node dependencies.

Overview

  • watch - use with livereload chrome extension
  • less - less compiling for both admin and front end
  • jshint - linting
  • uglify - concatenation for both admin and frontend
  • phplint - linting
  • cssjanus - rtl support

LESS Compiling

Front End Style

Any assets within /admin/assets/less will be compiled into aesop-admin.css, which is loaded on pages that load the component generator.

grunt less:adminLess

Admin Style

Assets within /public/assets/less will be compiled into ai-core.css, which is loaded on the front end of the site. This CSS file contains the bare necessities to make Aesop components function.

grunt less:coreLess

Extended CSS Style

If a user has add_theme_support for aesop-component-styles, then each individual component file in the array loads a separate CSS file. These are then concatenated into one CSS file and appended after the initial load of the public facing CSS file.

grunt less:publicLess

CSS Janus

CSS Janus is ran on the compiled ai-core.css public file, which produces ai-core-rtl.css and is loaded when a user has enabled rtl support.

grunt cssjanus

JS Concatenation

Front End JS

JS located in public/assets/js/ are concatenated into one JS file ai-core.js.

grunt uglify:adminscripts

Admin JS (generator)

JS files in /admin/assets/js are concatenated into generator.min.js which is loaded on all pages that have the component generator loaded.

grunt uglify:publicscripts

Admin JS (tinymce)

coming soon

File Watching

Install the Live Reload Chrome extension. Run grunt in the directory, then turn on Live Reload by clicking on the icon. Any file saves will automatically reload the browser.