Browse Source

assets inside pacakge.js for flag and icon

pull/1607/head
Luca Mussi 10 years ago
parent
commit
33d4cbaf5f
2 changed files with 33 additions and 9 deletions
  1. 39
      gulpfile.js
  2. 3
      tasks/admin/templates/package.js

39
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();

3
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

Loading…
Cancel
Save