Skip to content

Commit e79a323

Browse files
committed
Merge pull request Gaurav0#5 from MattMSumner/master
Create a 'none' theme.
2 parents c278090 + a87097a commit e79a323

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ you may do so by editing your Brocfile.js like this:
2727
'theme': 'ui-darkness'
2828
}
2929
});
30-
30+
3131
The list of available standard themes (with JQuery UI 1.11.1):
3232

3333
* base
@@ -56,6 +56,9 @@ The list of available standard themes (with JQuery UI 1.11.1):
5656
* ui-lightness
5757
* vader
5858

59+
If you'd prefer not to include any of the above jquery-ui themes, you can set
60+
the theme to 'none'.
61+
5962
## Included Components
6063

6164
At the moment, ember-cli-jquery-ui includes nine of the eleven jquery ui widgets wrapped in components:

index.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,23 @@ module.exports = {
1919

2020
app.import(path.join(app.bowerDirectory, 'jquery-ui', 'jquery-ui.js'));
2121

22-
var cssFileDir = path.join(app.bowerDirectory, 'jquery-ui', 'themes', theme);
23-
var cssFiles = fs.readdirSync(cssFileDir);
22+
if (theme != 'none') {
23+
var cssFileDir = path.join(app.bowerDirectory, 'jquery-ui', 'themes', theme);
24+
var cssFiles = fs.readdirSync(cssFileDir);
2425

25-
cssFiles.forEach(function(file) {
26-
if (/^.*\.css$/.test(file) && !/^.*\.min\.css$/.test(file))
27-
app.import(path.join(cssFileDir, file));
28-
});
26+
cssFiles.forEach(function(file) {
27+
if (/^.*\.css$/.test(file) && !/^.*\.min\.css$/.test(file))
28+
app.import(path.join(cssFileDir, file));
29+
});
2930

30-
var imgFileDir = path.join(app.bowerDirectory, 'jquery-ui', 'themes', theme, 'images');
31-
var imgFiles = fs.readdirSync(imgFileDir);
31+
var imgFileDir = path.join(app.bowerDirectory, 'jquery-ui', 'themes', theme, 'images');
32+
var imgFiles = fs.readdirSync(imgFileDir);
3233

33-
imgFiles.forEach(function(file) {
34-
app.import(path.join(imgFileDir, file), {
35-
destDir: "/assets/images"
34+
imgFiles.forEach(function(file) {
35+
app.import(path.join(imgFileDir, file), {
36+
destDir: "/assets/images"
37+
});
3638
});
37-
});
39+
}
3840
}
3941
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ember-cli-jquery-ui",
33
"description": "A simple addon to add jquery-ui as a dependency to your app. Also includes a small library of components wrapping JQuery UI widgets.",
4-
"version": "0.0.14",
4+
"version": "0.0.15",
55
"exampleAppUrl": "http://ember-cli-jquery-ui-example.herokuapp.com/",
66
"directories": {
77
"doc": "doc",

0 commit comments

Comments
 (0)