Browse Source

added package.js files into components repos

pull/1607/head
Luca Mussi 10 years ago
parent
commit
a49bbc393f
6 changed files with 73 additions and 7 deletions
  1. 1
      .gitignore
  2. 7
      README.md
  3. 43
      gulpfile.js
  4. 12
      meteor/README.md
  5. 1
      tasks/admin/release.js
  6. 16
      tasks/admin/templates/package.js

1
.gitignore

@ -34,3 +34,4 @@ Thumbs.db
nbproject
*.sublime-project
*.sublime-workspace
.build*

7
README.md

@ -60,6 +60,13 @@ gulp help // list all commands
* Android 4
* Blackberry 10
## Meteor
To use Semantic with the [Meteor.js](https://www.meteor.com) framework, run
$ meteor add semantic:ui
Learn more about the [Meteor integration in the README](meteor/README.md).
### Reaching Out
If you'd like to start a conversation about Semantic feel free to reach out by e-mail [jack@semantic-ui.com](mailto:jack@semantic-ui.com)

43
gulpfile.js

@ -720,7 +720,10 @@ gulp.task('create repos', false, function(callback) {
formExport : /\$\.fn\.\w+\s*=\s*function\(fields, parameters\)\s*{/g,
settingsExport : /\$\.fn\.\w+\.settings\s*=/g,
settingsReference : /\$\.fn\.\w+\.settings/g,
jQuery : /jQuery/g
jQuery : /jQuery/g,
// meteor
mversion : '{package-version}',
mfiles : '{package-files}',
},
replace : {
// readme
@ -737,7 +740,9 @@ gulp.task('create repos', false, function(callback) {
formExport : 'module.exports = function(fields, parameters) {\n var _module = module;\n',
settingsExport : 'module.exports.settings =',
settingsReference : '_module.exports.settings',
jQuery : 'require("jquery")'
jQuery : 'require("jquery")',
// meteor
mversion : version
}
},
task = {
@ -745,14 +750,24 @@ gulp.task('create repos', false, function(callback) {
repo : component + ' create repo',
bower : component + ' create bower.json',
readme : component + ' create README',
readme : component + ' create README',
npm : component + ' create NPM Module',
notes : component + ' create release notes',
composer : component + ' create composer.json',
package : component + ' create package.json'
package : component + ' create package.json',
meteor : component + ' create package.js',
}
;
var fnames;
if(isJavascript) {
if(isCSS)
fnames = ' \'' + component + '.js\',\n \'' + component + '.css\'';
else
fnames = ' \'' + component + '.js\'';
}
else
fnames = ' \'' + component + '.css\'';
// copy dist files into output folder adjusting asset paths
gulp.task(task.repo, false, function() {
return gulp.src(release.source + component + '.*')
@ -890,6 +905,19 @@ gulp.task('create repos', false, function(callback) {
;
});
// create package.js
gulp.task(task.meteor, false, function() {
return gulp.src(release.templates.meteor)
.pipe(plumber())
.pipe(flatten())
.pipe(replace(regExp.match.name, regExp.replace.name))
.pipe(replace(regExp.match.titleName, regExp.replace.titleName))
.pipe(replace(regExp.match.mversion, regExp.replace.mversion))
.pipe(replace(regExp.match.mfiles, fnames))
.pipe(gulp.dest(outputDirectory))
;
});
// synchronous tasks in orchestrator? I think not
gulp.task(task.all, false, function(callback) {
runSequence([
@ -899,7 +927,8 @@ gulp.task('create repos', false, function(callback) {
task.readme,
task.package,
task.composer,
task.notes
task.notes,
task.meteor
], callback);
});
@ -909,8 +938,8 @@ gulp.task('create repos', false, function(callback) {
}
runSequence(tasks, callback);
});
gulp.task('register repos', false, function(callback) {
var
index = -1,
@ -951,7 +980,7 @@ gulp.task('register repos', false, function(callback) {
stepRepo();
});
*/
}
};
stepRepo();
});

12
meteor/README.md

@ -0,0 +1,12 @@
Packaging Semantic-UI for [Meteor.js](http://meteor.com), the most popular full-stack JavaScript framework on GitHub.
# Meteor
If you're new to Meteor, here's what the excitement is all about - [watch the first two minutes](https://www.youtube.com/watch?v=fsi0aJ9yr2o); you'll be hooked by 1:28.
That screencast is from 2012. In the meantime, Meteor has become a mature JavaScript-everywhere web development framework with numerous [advantages](http://www.meteorpedia.com/read/Why_Meteor) over all other single-page application frameworks.
# WIP
This is only a stub file...

1
tasks/admin/release.js

@ -18,6 +18,7 @@ module.exports = {
bower : './tasks/admin/templates/bower.json',
composer : './tasks/admin/templates/composer.json',
package : './tasks/admin/templates/package.json',
meteor : './tasks/admin/templates/package.js',
readme : './tasks/admin/templates/README.md',
notes : './RELEASE-NOTES.md'
},

16
tasks/admin/templates/package.js

@ -0,0 +1,16 @@
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'
});
var where = 'client'; // Adds files only to the client
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.addFiles([
{package-files}
], where);
});
Loading…
Cancel
Save