Skip to content

Commit

Permalink
Merge pull request #5 from MattMSumner/master
Browse files Browse the repository at this point in the history
Create a 'none' theme.
  • Loading branch information
Gaurav0 committed Apr 6, 2015
2 parents c278090 + a87097a commit e79a323
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ you may do so by editing your Brocfile.js like this:
'theme': 'ui-darkness'
}
});

The list of available standard themes (with JQuery UI 1.11.1):

* base
Expand Down Expand Up @@ -56,6 +56,9 @@ The list of available standard themes (with JQuery UI 1.11.1):
* ui-lightness
* vader

If you'd prefer not to include any of the above jquery-ui themes, you can set
the theme to 'none'.

## Included Components

At the moment, ember-cli-jquery-ui includes nine of the eleven jquery ui widgets wrapped in components:
Expand Down
26 changes: 14 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ module.exports = {

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

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

cssFiles.forEach(function(file) {
if (/^.*\.css$/.test(file) && !/^.*\.min\.css$/.test(file))
app.import(path.join(cssFileDir, file));
});
cssFiles.forEach(function(file) {
if (/^.*\.css$/.test(file) && !/^.*\.min\.css$/.test(file))
app.import(path.join(cssFileDir, file));
});

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

imgFiles.forEach(function(file) {
app.import(path.join(imgFileDir, file), {
destDir: "/assets/images"
imgFiles.forEach(function(file) {
app.import(path.join(imgFileDir, file), {
destDir: "/assets/images"
});
});
});
}
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-cli-jquery-ui",
"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.",
"version": "0.0.14",
"version": "0.0.15",
"exampleAppUrl": "http://ember-cli-jquery-ui-example.herokuapp.com/",
"directories": {
"doc": "doc",
Expand Down

0 comments on commit e79a323

Please sign in to comment.