From 33d4cbaf5f363afa1c0c717d0b9ba1a673edb48d Mon Sep 17 00:00:00 2001 From: Luca Mussi Date: Mon, 1 Dec 2014 22:10:30 +0100 Subject: [PATCH] assets inside pacakge.js for flag and icon --- gulpfile.js | 39 +++++++++++++++++++++++++------- tasks/admin/templates/package.js | 3 ++- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 23c1447c1..5ba901d3e 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -760,13 +760,29 @@ gulp.task('create repos', false, function(callback) { var fnames; if(isJavascript) { - if(isCSS) + if(isCSS) { fnames = ' \'' + component + '.js\',\n \'' + component + '.css\''; - else + } + else { fnames = ' \'' + component + '.js\''; + } } - else + else { fnames = ' \'' + component + '.css\''; + } + + // Adds flags image as asset for UI-Flag + if (component == 'flag') { + fnames += ',\n \'assets/images/flags.png\''; + } + // Adds fonts as assets for UI-Icon + if (component == 'icon') { + fnames += ',\n \'assets/fonts/icons.eot\''; + fnames += ',\n \'assets/fonts/icons.otf\''; + fnames += ',\n \'assets/fonts/icons.svg\''; + fnames += ',\n \'assets/fonts/icons.ttf\''; + fnames += ',\n \'assets/fonts/icons.woff\''; + } // copy dist files into output folder adjusting asset paths gulp.task(task.repo, false, function() { @@ -1010,7 +1026,7 @@ gulp.task('update git', false, function() { repoURL = 'https://github.com/' + release.org + '/' + repoName + '/', gitOptions = { cwd: outputDirectory }, quietOptions = { args: '-q', cwd: outputDirectory }, - isRepository = fs.existsSync(outputDirectory + '.git/') + isRepository = fs.existsSync(outputDirectory + '.git/'), componentPackage = fs.existsSync(outputDirectory + 'package.json' ) ? require(outputDirectory + 'package.json') : false, @@ -1083,9 +1099,17 @@ gulp.task('update git', false, function() { function tagFiles() { console.log('Tagging new version ', version); git.tag(version, 'Updated version from semantic-ui (automatic)', function (err) { - pushFiles(); + publishMeteor(); }); } + function publishMeteor() { + console.log('Publishing Meteor package version ', version); + //var cmd = new run.Command('meteor publish'); + //cmd.exec(function(error){ + // pushFiles(); + //}); + pushFiles(); + } function pushFiles() { console.log('Pushing files'); git.push('origin', 'master', { args: '', cwd: outputDirectory }, function(error) { @@ -1095,7 +1119,7 @@ gulp.task('update git', false, function() { console.log('Push completed successfully'); stepRepo(); }); - }; + } // set-up path function createRepo() { @@ -1139,8 +1163,7 @@ gulp.task('update git', false, function() { stepRepo(); } }); - }; - + } }; return stepRepo(); diff --git a/tasks/admin/templates/package.js b/tasks/admin/templates/package.js index db371903b..0e8118dba 100644 --- a/tasks/admin/templates/package.js +++ b/tasks/admin/templates/package.js @@ -2,7 +2,8 @@ Package.describe({ name: 'semantic:ui-{component}', summary: 'Semantic UI - {Component}, Single component release of {component}', version: '{package-version}', - git: 'git://github.com/Semantic-Org/UI-{Component}.git' + git: 'git://github.com/Semantic-Org/UI-{Component}.git', + //readme: 'git://github.com/Semantic-Org/UI-{Component}/tree/master/meteor/README.md' }); var where = 'client'; // Adds files only to the client