-
Notifications
You must be signed in to change notification settings - Fork 56
Compiling Code
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.
- 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
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
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
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 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 located in public/assets/js/ are concatenated into one JS file ai-core.js.
grunt uglify:adminscripts
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
coming soon
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.