Skip to content

Commit 0e02491

Browse files
committed
Merge pull request #46 from Tarendai/master
Moved to composer submodule approach. Will upload full package as a release
2 parents 8c68692 + 77c3dcf commit 0e02491

File tree

6 files changed

+46
-7
lines changed

6 files changed

+46
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/vendor/
2+
composer.lock
3+
.DS_Store

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,30 @@ before deploying them.
1313

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

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

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

22+
Then install the lessphp dependency using:
23+
24+
composer install
25+
26+
Alternatively, add "icit/wp-less" as a requirement to your composer.json, and add this git repository e.g.:
27+
28+
{
29+
"repositories": [
30+
{
31+
"type": "git",
32+
"url": "https://github.com/sanchothefat/wp-less.git"
33+
}
34+
],
35+
"require": {
36+
"icit/wp-less": "dev-master"
37+
}
38+
}
39+
2240
## Usage:
2341

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

41-
?>
4259
```
4360

4461
Any registered styles with the `.less` suffix will be compiled and the file URL rewritten.

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "icit/wp-less",
3+
"description": "Provides a LESS compiler compatible with wp_enqueue_style() for rapid CSS development in themes and plugins.",
4+
"license": "GPL-2.0+",
5+
"type": "wordpress-plugin",
6+
"authors": [
7+
{
8+
"name": "Robert O'Rourke",
9+
"email": "rob@interconnectit.com"
10+
}
11+
],
12+
"authors": [
13+
{
14+
"name": "Interconnect/IT",
15+
"homepage": "http://interconnectit.com/"
16+
}
17+
],
18+
"require": {
19+
"php": ">5.2.4",
20+
"composer/installers": "~1.0",
21+
"leafo/lessphp": "0.4.0"
22+
}
23+
}

lessc

Lines changed: 0 additions & 1 deletion
This file was deleted.

wp-less.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
// load LESS parser
18-
! class_exists( 'lessc' ) AND require_once( 'lessc/lessc.inc.php' );
18+
! class_exists( 'lessc' ) AND require_once( 'vendor/leafo/lessphp/lessc.inc.php' );
1919

2020

2121
if ( ! class_exists( 'wp_less' ) ) {

0 commit comments

Comments
 (0)