Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Dhaulagiri-ember-cli-1.13'
- Loading branch information
Showing
17 changed files
with
144 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ dist/ | |
.npmignore | ||
**/.gitkeep | ||
bower.json | ||
Brocfile.js | ||
ember-cli-build.js | ||
testem.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
{ | ||
"name": "ember-sprite", | ||
"dependencies": { | ||
"ember": "1.12.0", | ||
"ember": "1.13.3", | ||
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3", | ||
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3", | ||
"ember-data": "1.0.0-beta.18", | ||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4", | ||
"ember-qunit": "0.3.3", | ||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5", | ||
"ember-qunit": "0.4.1", | ||
"ember-qunit-notifications": "0.0.7", | ||
"ember-resolver": "~0.1.15", | ||
"ember-resolver": "~0.1.18", | ||
"jquery": "^1.11.1", | ||
"loader.js": "ember-cli/loader.js#3.2.0", | ||
"qunit": "~1.17.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* global require, module */ | ||
var EmberApp = require('ember-cli/lib/broccoli/ember-addon'); | ||
|
||
module.exports = function(defaults) { | ||
// Temporary location due to https://github.com/ember-cli/ember-cli/issues/4434 | ||
// Can be moved inside EmberApp() with ember-cli 1.13.2 | ||
defaults.sprite = [ | ||
{ | ||
src: [ | ||
'images/sprite/1x/**/*.png' | ||
], | ||
compositor: 'gm', | ||
spritePath: 'assets/sprite.png', | ||
stylesheetPath: 'assets/sprite.css', | ||
stylesheet: 'tests/dummy/app/styles/sprite.tpl', | ||
stylesheetOptions: { | ||
prefix: 'icon.icon-', | ||
spritePath: '/assets/sprite.png', | ||
pixelRatio: 1 | ||
}, | ||
layoutOptions: { | ||
padding: 0 | ||
}, | ||
layout: 'horizontal' | ||
}, | ||
{ | ||
src: [ | ||
'images/sprite/2x/**/*.png' | ||
], | ||
compositor: 'gm', | ||
spritePath: 'assets/sprite-2x.png', | ||
stylesheetPath: 'assets/sprite-2x.css', | ||
stylesheet: 'tests/dummy/app/styles/sprite-2x.tpl', | ||
stylesheetOptions: { | ||
prefix: 'icon.icon-', | ||
spritePath: '/assets/sprite-2x.png', | ||
pixelRatio: 2 | ||
}, | ||
layoutOptions: { | ||
padding: 0 | ||
}, | ||
layout: 'horizontal' | ||
} | ||
]; | ||
|
||
var app = new EmberApp(defaults, { | ||
// Add options here | ||
}); | ||
|
||
/* | ||
This build file specifes the options for the dummy test app of this | ||
addon, located in `/tests/dummy` | ||
This build file does *not* influence how the addon or the app using it | ||
behave. You most likely want to be modifying `./index.js` or app's build file | ||
*/ | ||
|
||
return app.toTree(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
This file tells node-sprite-generator that for our retina icons we want to | ||
ovveride an icon's background image to use the retina sprite and use the | ||
correct background size from that sprite | ||
*/ | ||
|
||
@media (min--moz-device-pixel-ratio: 2), | ||
(-o-min-device-pixel-ratio: 2/1), | ||
(-webkit-min-device-pixel-ratio: 2), | ||
(min-device-pixel-ratio: 2) | ||
{ | ||
.icon { | ||
background: url('/assets/sprite-2x.png') no-repeat; | ||
background-size: <%= getCSSValue(layout.width) %> <%= getCSSValue(layout.height) %>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
This file tells node-sprite-generator that it should add css rules for each | ||
icon we are generating for our non-retina sprite. We can override the | ||
background image for retina sprites in the sprite-2x.tpl file. | ||
*/ | ||
|
||
.icon { | ||
background: url('<%= options.spritePath %>') no-repeat; | ||
background-size: <%= getCSSValue(layout.width) %> <%= getCSSValue(layout.height) %>; | ||
display: inline-block; | ||
} | ||
|
||
<% layout.images.forEach(function (image) { %> | ||
.<%= image.className %> | ||
{ | ||
background-position: <%= getCSSValue(-image.x) %> <%= getCSSValue(-image.y) %>; | ||
width: <%= getCSSValue(image.width) %>; | ||
height: <%= getCSSValue(image.height) %>; | ||
} | ||
<% }); %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<h2 id="title">Welcome to Ember.js</h2> | ||
<h2 id="title">Welcome to Ember Sprite</h2> | ||
|
||
{{outlet}} | ||
<p> | ||
The icons below will load from either a 1x or 2x sprite depending on your screen resolution (check with your dev tools to verify): | ||
</p> | ||
|
||
<div class="icon icon-star-plus"></div> | ||
<div class="icon icon-star-1"></div> | ||
<div class="icon icon-star"></div> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters