Create a dist directory

This directory will contain the built sources (iD.js, iD.css)
and images. On a release branch, we will check in the generated
files. For the osm.us/master deploy, it should run make and use
dist/ as the root.

Paths in css are relative, e.g. url(img/foo.png).
This commit is contained in:
John Firebaugh
2013-04-16 14:53:57 -07:00
parent 5af65fd209
commit aedd5ee46e
62 changed files with 95 additions and 106 deletions
+2 -2
View File
@@ -8,13 +8,13 @@ sprite.sprite('renders', { path: makipath }, function(err, makiSprite) {
if (err) process.exit(1);
// Move image and json files
fs.renameSync(path.join(makipath, makiSprite.filename()), './img/maki-sprite.png');
fs.renameSync(path.join(makipath, makiSprite.filename()), './dist/img/maki-sprite.png');
fs.renameSync(path.join(makipath, 'renders.json'), './data/maki-sprite.json');
// Generate CSS
var template = '.maki-{name}{background-position:{x} {y};width:{w};height:{h};}\n';
var css = "/* This file is generated by make. Do NOT edit manually. */\n\n";
css += ".maki-icon{background-image:url('../img/maki-sprite.png');background-repeat:no-repeat;}\n";
css += ".maki-icon{background-image:url(img/maki-sprite.png);background-repeat:no-repeat;}\n";
makiSprite.images.forEach(function(image) {
if (image.width !== 24) return;