Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- create test cases - add export to javascript - update docs - fix syntax and formatting - change javascript output formatting * - fix tests and add missing fixtures
- Loading branch information
Showing
9 changed files
with
70 additions
and
0 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
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,6 @@ | ||
'use strict'; | ||
|
||
var getTemplatedStylesheet = require('./templatedStylesheet'), | ||
path = require('path'); | ||
|
||
module.exports = getTemplatedStylesheet(path.join(__dirname, '/templates/javascript.tpl')); |
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,8 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
<% layout.images.forEach(function (image, idx) { if (image.className.indexOf('-') >= 0) { %>'<%= image.className %>'<% } else { %><%= image.className %><% } %>: { x: <%= image.x %>, y: <%= image.y %>, width: <%= image.width %>, height: <%= image.height %> }<% if (idx !== layout.images.length - 1) { %>,<% } %> | ||
<% }); %> | ||
}; | ||
|
||
module.exports = SPRITES; |
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,10 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
foo: { x: 0, y: 0, width: 150, height: 12 }, | ||
bar: { x: 0, y: 12, width: 150, height: 24 }, | ||
test: { x: 0, y: 36, width: 150, height: 12 } | ||
|
||
}; | ||
|
||
module.exports = SPRITES; |
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,10 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
oof: { x: 0, y: 0, width: 150, height: 12 }, | ||
rab: { x: 0, y: 12, width: 150, height: 24 }, | ||
tset: { x: 0, y: 36, width: 150, height: 12 } | ||
|
||
}; | ||
|
||
module.exports = SPRITES; |
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,10 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
foo: { x: 0, y: 0, width: 75, height: 6 }, | ||
bar: { x: 0, y: 6, width: 75, height: 12 }, | ||
test: { x: 0, y: 18, width: 75, height: 6 } | ||
|
||
}; | ||
|
||
module.exports = SPRITES; |
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,10 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
'prefix-foo': { x: 0, y: 0, width: 150, height: 12 }, | ||
'prefix-bar': { x: 0, y: 12, width: 150, height: 24 }, | ||
'prefix-test': { x: 0, y: 36, width: 150, height: 12 } | ||
|
||
}; | ||
|
||
module.exports = SPRITES; |
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,10 @@ | ||
'use strict'; | ||
|
||
var SPRITES = { | ||
foo: { x: 0, y: 0, width: 150, height: 12 }, | ||
bar: { x: 0, y: 12, width: 150, height: 24 }, | ||
test: { x: 0, y: 36, width: 150, height: 12 } | ||
|
||
}; | ||
|
||
module.exports = SPRITES; |
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,5 @@ | ||
'use strict'; | ||
|
||
var testTemplatedStylesheet = require('./testTemplatedStylesheet'); | ||
|
||
testTemplatedStylesheet('javascript', 'js'); |