Browse Source

Iteration on release tasks

pull/1191/merge
jlukic 10 years ago
parent
commit
1054a4ca21
15 changed files with 7933 additions and 10931 deletions
  1. 1
      .gitignore
  2. 15
      .jshintrc
  3. 2
      dist/components/checkbox.css
  4. 2
      dist/components/checkbox.min.css
  5. 10
      dist/components/divider.css
  6. 2
      dist/components/divider.min.css
  7. 12
      dist/semantic.css
  8. 18596
      dist/semantic.js
  9. 2
      dist/semantic.min.css
  10. 13
      dist/semantic.min.js
  11. 22
      examples/kitchensink.html
  12. 119
      gulpfile.js
  13. 2
      package.json
  14. 64
      tasks/admin/release.js
  15. 2
      tasks/defaults.js

1
.gitignore

@ -5,6 +5,7 @@ src/**/site/
dist/
theme.config
semantic.json
tasks/admin/oauth.js
# Numerous always-ignore extensions
*.diff

15
.jshintrc

@ -0,0 +1,15 @@
{
"browser" : true,
"indent" : false,
"curly" : true,
"immed" : true,
"latedef" : true,
"noarg" : true,
"undef" : true,
"sub" : true,
"loopfunc" : true,
// lax options
"trailing" : false,
"laxbreak" : true
}

2
dist/components/checkbox.css
File diff suppressed because it is too large
View File

2
dist/components/checkbox.min.css
File diff suppressed because it is too large
View File

10
dist/components/divider.css

@ -21,6 +21,7 @@
height: 0em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.05em;
color: rgba(0, 0, 0, 0.85);
-webkit-user-select: none;
-moz-user-select: none;
@ -70,10 +71,11 @@
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.ui.horizontal.divider:before {
margin-left: -51.5%;
margin-left: -webkit-calc(-50% - 1em );
margin-left: calc(-50% - 1em );
}
.ui.horizontal.divider:after {
margin-left: 1.5%;
margin-left: 1em;
}
/*--------------
@ -143,11 +145,11 @@
}
.ui.stackable.grid .ui.vertical.divider:before,
.ui.grid .stackable.row .ui.vertical.divider:before {
margin-left: -51.5%;
margin-left: -51%;
}
.ui.stackable.grid .ui.vertical.divider:after,
.ui.grid .stackable.row .ui.vertical.divider:after {
margin-left: 1.5%;
margin-left: 1em;
}
}

2
dist/components/divider.min.css

@ -8,4 +8,4 @@
* http://opensource.org/licenses/MIT
*
*/
.ui.divider{margin:1rem 0;line-height:1;height:0;font-weight:700;text-transform:uppercase;color:rgba(0,0,0,.85);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ui.divider:not(.vertical):not(.horizontal){border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.grid>.ui.divider{font-size:1rem}.ui.horizontal.divider{position:relative;height:auto;margin:'';overflow:hidden;line-height:1;text-align:center}.ui.horizontal.divider:after,.ui.horizontal.divider:before{position:absolute;content:'';z-index:3;width:50%;top:50%;height:0;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.horizontal.divider:before{margin-left:-51.5%}.ui.horizontal.divider:after{margin-left:1.5%}.ui.vertical.divider{position:absolute;z-index:2;top:50%;left:50%;margin:0;padding:0;width:auto;height:50%;line-height:0;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ui.vertical.divider:after,.ui.vertical.divider:before{position:absolute;left:50%;content:'';z-index:3;border-left:1px solid rgba(0,0,0,.1);border-right:1px solid rgba(255,255,255,.2);width:0;height:-webkit-calc(100% - 1rem);height:calc(100% - 1rem)}.ui.vertical.divider:before{top:-100%}.ui.vertical.divider:after{top:auto;bottom:0}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider,.ui.stackable.grid .ui.vertical.divider{position:relative;margin:1rem 0;left:50%;height:auto;overflow:hidden;line-height:1;text-align:center}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{position:absolute;left:auto;content:'';z-index:3;width:50%;top:50%;height:0;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:before{margin-left:-51.5%}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:after{margin-left:1.5%}}.ui.divider>.icon{margin:0;font-size:1rem;height:1em;vertical-align:middle}.ui.hidden.divider{border-color:transparent!important}.ui.divider.inverted,.ui.horizontal.inverted.divider,.ui.vertical.inverted.divider{color:#fff}.ui.divider.inverted,.ui.divider.inverted:after,.ui.divider.inverted:before{border-top-color:rgba(0,0,0,.15)!important;border-bottom-color:rgba(255,255,255,.15)!important;border-left-color:rgba(0,0,0,.15)!important;border-right-color:rgba(255,255,255,.15)!important}.ui.fitted.divider{margin:0}.ui.clearing.divider{clear:both}.ui.section.divider{margin-top:2rem;margin-bottom:2rem}.ui.divider{font-size:1rem}
.ui.divider{margin:1rem 0;line-height:1;height:0;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgba(0,0,0,.85);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ui.divider:not(.vertical):not(.horizontal){border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.grid>.ui.divider{font-size:1rem}.ui.horizontal.divider{position:relative;height:auto;margin:'';overflow:hidden;line-height:1;text-align:center}.ui.horizontal.divider:after,.ui.horizontal.divider:before{position:absolute;content:'';z-index:3;width:50%;top:50%;height:0;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.horizontal.divider:before{margin-left:-webkit-calc(-50% - 1em);margin-left:calc(-50% - 1em)}.ui.horizontal.divider:after{margin-left:1em}.ui.vertical.divider{position:absolute;z-index:2;top:50%;left:50%;margin:0;padding:0;width:auto;height:50%;line-height:0;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ui.vertical.divider:after,.ui.vertical.divider:before{position:absolute;left:50%;content:'';z-index:3;border-left:1px solid rgba(0,0,0,.1);border-right:1px solid rgba(255,255,255,.2);width:0;height:-webkit-calc(100% - 1rem);height:calc(100% - 1rem)}.ui.vertical.divider:before{top:-100%}.ui.vertical.divider:after{top:auto;bottom:0}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider,.ui.stackable.grid .ui.vertical.divider{position:relative;margin:1rem 0;left:50%;height:auto;overflow:hidden;line-height:1;text-align:center}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{position:absolute;left:auto;content:'';z-index:3;width:50%;top:50%;height:0;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(255,255,255,.2)}.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:before{margin-left:-51%}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:after{margin-left:1em}}.ui.divider>.icon{margin:0;font-size:1rem;height:1em;vertical-align:middle}.ui.hidden.divider{border-color:transparent!important}.ui.divider.inverted,.ui.horizontal.inverted.divider,.ui.vertical.inverted.divider{color:#fff}.ui.divider.inverted,.ui.divider.inverted:after,.ui.divider.inverted:before{border-top-color:rgba(0,0,0,.15)!important;border-bottom-color:rgba(255,255,255,.15)!important;border-left-color:rgba(0,0,0,.15)!important;border-right-color:rgba(255,255,255,.15)!important}.ui.fitted.divider{margin:0}.ui.clearing.divider{clear:both}.ui.section.divider{margin-top:2rem;margin-bottom:2rem}.ui.divider{font-size:1rem}

12
dist/semantic.css
File diff suppressed because it is too large
View File

18596
dist/semantic.js
File diff suppressed because it is too large
View File

2
dist/semantic.min.css
File diff suppressed because it is too large
View File

13
dist/semantic.min.js
File diff suppressed because it is too large
View File

22
examples/kitchensink.html

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Properities -->
<title>Homepage Example - Semantic</title>
<title>Kitchen Sink - Semantic</title>
<link rel="stylesheet" type="text/css" href="../dist/semantic.css">
<link rel="stylesheet" type="text/css" href="kitchensink.css">
@ -235,25 +235,25 @@
<div class="grouped fields">
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="small">
<input type="radio" name="radio1" value="small">
<label>Choice 1</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="medium">
<input type="radio" name="radio1" value="medium">
<label>Choice 2</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="large">
<input type="radio" name="radio1" value="large">
<label>Choice 3</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="x-large">
<input type="radio" name="radio1" value="x-large">
<label>Choice 4</label>
</div>
</div>
@ -271,25 +271,25 @@
<div class="grouped fields">
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="small">
<input type="radio" name="radio2" value="small">
<label>Choice A</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="medium">
<input type="radio" name="radio2" value="medium">
<label>Choice B</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="large">
<input type="radio" name="radio2" value="large">
<label>Choice C</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" value="x-large">
<input type="radio" name="radio2" value="x-large">
<label>Choice D</label>
</div>
</div>
@ -513,7 +513,7 @@
<a href="/elements/label.html">Label</a>
</h4>
<div class="ui image label">
<img src="images/avatar/small/justen.jpg">
<img src="images/wireframe/square-image.png">
email@address.com
<i class="delete icon"></i>
</div>
@ -1139,7 +1139,7 @@
<a href="/modules/checkbox.html">Checkbox</a>
</h4>
<div class="ui checkbox">
<input type="checkbox" name="fun">
<input type="checkbox" name="fun" checked="checked">
<label>Checkbox</label>
</div>

119
gulpfile.js

@ -12,11 +12,11 @@ var
gulp = require('gulp-help')(require('gulp')),
// node components & oddballs
console = require('better-console'),
del = require('del'),
fs = require('fs'),
extend = require('extend'),
fs = require('fs'),
path = require('path'),
console = require('better-console'),
wrench = require('wrench'),
// gulp dependencies
@ -51,11 +51,23 @@ var
questions = require('./tasks/questions'),
settings = require('./tasks/gulp-settings'),
// admin
release = require('./tasks/admin/release'),
git = require('gulp-git'),
githubAPI = require('github'),
oAuthToken = fs.existsSync('./tasks/admin/oauth.js')
? require('./tasks/admin/oauth')
: false,
github,
// local
runSetup = false,
overwrite = true,
config,
package,
github,
// derived
base,
@ -145,9 +157,8 @@ gulp.task('default', false, [
'check install'
]);
gulp.task('watch', 'Watch for site/theme changes (Default Task)', function () {
gulp.task('watch', 'Watch for site/theme changes (Default Task)', function(callback) {
console.clear();
console.log('Watching source files');
if(!fs.existsSync(config.files.theme)) {
@ -346,6 +357,7 @@ gulp.task('build', 'Builds all files from source', function(callback) {
.pipe(gulp.dest(output.compressed))
.pipe(print(log.created))
.on('end', function() {
callback();
gulp.start('package compressed css');
})
;
@ -604,30 +616,107 @@ gulp.task('build-docs', false, function () {
});
/* Release */
gulp.task('release', false, function() {
// gulp bump
// Ask for release type (minor, major, patch)
// Bump package.json
// Bump composer.json
if(!oAuthToken) {
module.error('Must add node include tasks/admin/oauth.js with oauth token for GitHub');
}
github = new githubAPI({
version : '3.0.0',
debug : true,
protocol : 'https',
timeout : 5000
});
github.authenticate({
type: "oauth",
token: oAuthToken
});
// gulp build
gulp.start('release components');
// release-component
// #Create SCSS Version
// #Create RTL Release
});
/* Bump Version */
gulp.task('bump', false, function () {
// bump package.json
// bump composer.json
});
/* Release */
gulp.task('release', false, function() {
/*--------------
Internal
---------------*/
// gulp.task('release components', false, ['build'], function() {
gulp.task('release components', false, function() {
var
stream,
index,
outputDirectory,
repo,
repoURL,
component,
capitalizedComponent
;
});
gulp.task('release all', false, function () {
github.repos.get({
user : release.owner,
repo : release.repo
}, function(error, response) {
if(error) {
console.log(error);
}
else {
console.log(JSON.stringify(response));
}
});
// Create SCSS Version
for(index in release.components) {
// Create RTL Release
// current component in stack
component = release.components[index];
// Create Node Release
// derived values
outputDirectory = release.folderRoot + component;
capitalizedComponent = component.charAt(0).toUpperCase() + component.slice(1);
repo = release.repoRoot + capitalizedComponent;
repoURL = 'https://github.com/' + release.owner + '/' + repo;
// Create Bower Releases
// create files in folder
stream = gulp.src(output.compressed + component + '.*')
.pipe(plumber())
.pipe(flatten())
.pipe(gulp.dest(outputDirectory)) // pipe to output directory
;
// create bower.json *ignore*
// check if is a repo locally
});
// if not try creating repo
// after create add remote to git
git.addRemote('origin', repoURL, function(error) {
if(error) {
console.error('Unable to add remote');
}
});
// create tagged version
}
// Copy dist/components/{name}(.css|.min.css|.min.js|.js) to "../ui-{name}/"
// (manually copy over asset changes)
});

2
package.json

@ -17,12 +17,14 @@
"url": "https://github.com/Semantic-Org/Semantic-UI/issues"
},
"dependencies": {
"gulp-git": "^0.5.3",
"jquery": "x.x.x"
},
"devDependencies": {
"better-console": "^0.2.3",
"del": "^0.1.3",
"extend": "^2.0.0",
"github": "^0.2.2",
"gulp": "^3.8.8",
"gulp-autoprefixer": "^1.0.1",
"gulp-batch": "^1.0.1",

64
tasks/admin/release.js

@ -0,0 +1,64 @@
/*******************************
Release Settings
*******************************/
// release settings
module.exports = {
owner : 'Semantic-Org',
repo : 'Semantic-UIs',
// root name for repos
repoRoot : 'UI-',
folderRoot : '../ui-',
// components that get separate repositories for bower/npm
components : [
"reset",
"site",
"button",
"divider",
"flag",
"header",
"icon",
"image",
"input",
"label",
"list",
"loader",
"rail",
"reveal",
"segment",
"step",
"breadcrumb",
"form",
"grid",
"menu",
"message",
"table",
"card",
"comment",
"feed",
"item",
"statistic",
"accordion",
"checkbox",
"dimmer",
"dropdown",
"modal",
"nag",
"popup",
"progress",
"rating",
"search",
"shape",
"sidebar",
"sticky",
"tab",
"transition",
"video",
"api",
"form"
]
};

2
tasks/defaults.js

@ -40,7 +40,7 @@ module.exports = {
// file paths
files: {
composer : 'composer.json',
config : './semantic.json',
config : './semantic.json',
npm : './package.json',
site : './src/site',
theme : './src/theme.config'

Loading…
Cancel
Save