Skip to content
Permalink
Browse files

Meteor packaging

  • Loading branch information
mizzao committed Nov 30, 2015
1 parent 47edf57 commit 91412dd6e5859d174b6dd59ecb557f567f42fbe7
Showing with 45 additions and 0 deletions.
  1. +1 −0 css/faces
  2. +44 −0 package.js
@@ -0,0 +1,44 @@
Package.describe({
name: 'pakastin:deck-of-cards',
version: '0.1.4',
// Brief, one-line summary of the package.
summary: 'HTML5 Deck of Cards',
// URL to the Git repository containing the source code for this package.
git: 'https://github.com/pakastin/deck-of-cards.git',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});

Package.onUse(function(api) {
api.versionsFrom('1.2.1');
api.use('ecmascript');
api.use('stylus');

api.addFiles('dist/deck.js', 'client', { bare: true });
api.addFiles('css/card.styl', 'client');

// Add card faces and backs
api.addAssets('css/faces/back.png', 'client');

// 52 deck cards
for( var i = 0; i < 4; i++ ) {
for( var j = 1; j <= 13; j++ ) {
api.addAssets('css/faces/' + i + '_' + j + '.svg', 'client');
}
}

// 3 jokers
for( var k = 1; k <= 3; k++ ) {
api.addAssets('css/faces/4_' + k + '.svg', 'client');
}

api.export(['Deck'], ['client']);
});

Package.onTest(function(api) {
api.use('ecmascript');
api.use('tinytest');

api.use('pakastin:deck-of-cards');
});

0 comments on commit 91412dd

Please sign in to comment.
You can’t perform that action at this time.