Skip to content

Create a 'none' theme. #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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