Skip to content

Commit

Permalink
Merge pull request #46 from Tarendai/master
Browse files Browse the repository at this point in the history
Moved to composer submodule approach. Will upload full package as a release
  • Loading branch information
roborourke committed Oct 1, 2013
2 parents 8c68692 + 77c3dcf commit 0e02491
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/
composer.lock
.DS_Store
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,30 @@ before deploying them.

If you are using git to clone the repository, do the following:

git clone --recursive git://github.com/sanchothefat/wp-less.git wp-less
git clone git://github.com/sanchothefat/wp-less.git wp-less

If you are downloading the `.zip` or `.tar`, don't forget to download the [lessphp
dependency too](https://github.com/leafo/lessphp) and copy it into the `lessc`
folder.

Then install the lessphp dependency using:

composer install

Alternatively, add "icit/wp-less" as a requirement to your composer.json, and add this git repository e.g.:

{
"repositories": [
{
"type": "git",
"url": "https://github.com/sanchothefat/wp-less.git"
}
],
"require": {
"icit/wp-less": "dev-master"
}
}

## Usage:

You can either install the script as a standard plugin or use it as an include within a theme or plugin.
Expand All @@ -38,7 +56,6 @@ if ( ! is_admin() )
// you can also use .less files as mce editor style sheets
add_editor_style( 'editor-style.less' );

?>
```

Any registered styles with the `.less` suffix will be compiled and the file URL rewritten.
Expand Down
23 changes: 23 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "icit/wp-less",
"description": "Provides a LESS compiler compatible with wp_enqueue_style() for rapid CSS development in themes and plugins.",
"license": "GPL-2.0+",
"type": "wordpress-plugin",
"authors": [
{
"name": "Robert O'Rourke",
"email": "[email protected]"
}
],
"authors": [
{
"name": "Interconnect/IT",
"homepage": "http://interconnectit.com/"
}
],
"require": {
"php": ">5.2.4",
"composer/installers": "~1.0",
"leafo/lessphp": "0.4.0"
}
}
1 change: 0 additions & 1 deletion lessc
Submodule lessc deleted from 00fdb9
2 changes: 1 addition & 1 deletion wp-less.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


// load LESS parser
! class_exists( 'lessc' ) AND require_once( 'lessc/lessc.inc.php' );
! class_exists( 'lessc' ) AND require_once( 'vendor/leafo/lessphp/lessc.inc.php' );


if ( ! class_exists( 'wp_less' ) ) {
Expand Down

0 comments on commit 0e02491

Please sign in to comment.