Browse Source

Modifies watch tasks, fixes paths in grunt

pull/258/head
jlukic 11 years ago
parent
commit
12f9a039a7
12 changed files with 80 additions and 403 deletions
  1. 139
      Gruntfile.js
  2. 4
      build/packaged/css/semantic.min.css
  3. 4
      build/packaged/javascript/semantic.min.js
  4. 1
      package.json
  5. 4
      rtl/packaged/css/semantic.min.css
  6. 4
      rtl/packaged/javascript/semantic.min.js
  7. 320
      test/coverage/PhantomJS 1.9.2 (Linux)/index.html
  8. 1
      test/coverage/PhantomJS 1.9.2 (Linux)/prettify.css
  9. 1
      test/coverage/PhantomJS 1.9.2 (Linux)/prettify.js
  10. 1
      test/coverage/coverage-PhantomJS 1.9.2 (Linux)-20131014_005413.json
  11. 3
      test/karma.conf.js
  12. 1
      test/modules/modal.js

139
Gruntfile.js

@ -88,7 +88,7 @@ module.exports = function(grunt) {
setWatchFiles = function(action, filePath) {
var
buildPath = filePath.replace('../src/', '../docs/build/').replace('less', 'css')
buildPath = filePath.replace('src/', 'docs/build/').replace('less', 'css')
;
if(filePath.search('.less') !== -1) {
grunt.config('less.buildDocsCSS.src', filePath);
@ -123,15 +123,15 @@ module.exports = function(grunt) {
},
scripts: {
files: [
'../src/**/*.js'
'src/**/*.js'
],
tasks : ['karma:test:run']
},
src: {
files: [
'../build/examples/**/*',
'../src/**/*.less',
'../src/**/*.js'
'build/examples/**/*',
'src/**/*.less',
'src/**/*.js'
],
tasks : watchTasks
}
@ -144,8 +144,7 @@ module.exports = function(grunt) {
karma: {
test: {
configFile : 'test/karma.conf.js',
background : true,
reporters: 'dots'
background : true
},
travis: {
configFile : 'test/karma.conf.js',
@ -162,28 +161,28 @@ module.exports = function(grunt) {
force: true
},
build : [
'../build/less',
'../build/minified',
'../build/packaged',
'../build/uncompressed'
'build/less',
'build/minified',
'build/packaged',
'build/uncompressed'
],
release : [
'../docs/build',
'../docs',
'../rtl'
'docs/build',
'docs',
'rtl'
]
},
docco: {
generate: {
options: {
css : '../spec/assets/docco.css',
output : '../spec/docs/'
css : 'spec/assets/docco.css',
output : 'spec/docs/'
},
files: [
{
expand : true,
cwd : '../spec/',
cwd : 'spec/',
src : [
'**.commented.js'
]
@ -195,47 +194,47 @@ module.exports = function(grunt) {
cssjanus: {
rtl: {
expand : true,
cwd : '../build/',
cwd : 'build/',
src : [
'**/*.less',
'**/*.css',
],
dest : '../rtl'
dest : 'rtl'
},
},
less: {
options: {
paths : ['../src'],
paths : ['src'],
compress : false,
optimization : 2
},
// optimized for watch, src is built on watch task using callbacks
buildDocsCSS: {
src : '../src',
dest : '../docs/build/uncompressed/',
src : 'src',
dest : 'docs/build/uncompressed/',
rename : preserveFileExtensions
},
buildTestCSS: {
expand : true,
cwd : '../src',
cwd : 'src',
src : [
'**/*.less'
],
dest : '../docs/build/uncompressed/',
dest : 'docs/build/uncompressed/',
rename: preserveFileExtensions
},
buildCSS: {
expand : true,
cwd : '../src',
cwd : 'src',
src : [
'**/*.less'
],
dest : '../build/uncompressed/',
dest : 'build/uncompressed/',
rename: preserveFileExtensions
}
},
@ -248,44 +247,44 @@ module.exports = function(grunt) {
// exact copy for less
{
expand : true,
cwd : '../src/**/*.less',
cwd : 'src/**/*.less',
src : [
'**/*'
],
dest : '../docs/build/less'
dest : 'docs/build/less'
},
// copy everything but less files for uncompressed release
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'**/*.js',
'images/*',
'fonts/*'
],
dest : '../docs/build/uncompressed'
dest : 'docs/build/uncompressed'
},
// copy everything but less for minified release
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'**/*.js',
'images/*',
'fonts/*'
],
dest : '../docs/build/minified'
dest : 'docs/build/minified'
},
// copy assets only for packaged version
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'images/*',
'fonts/*'
],
dest : '../docs/build/packaged'
dest : 'docs/build/packaged'
}
]
},
@ -296,44 +295,44 @@ module.exports = function(grunt) {
// exact copy for less
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'**/*'
],
dest : '../build/less'
dest : 'build/less'
},
// copy everything but less files for uncompressed release
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'**/*.js',
'images/*',
'fonts/*'
],
dest : '../build/uncompressed'
dest : 'build/uncompressed'
},
// copy everything but less for minified release
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'**/*.js',
'images/*',
'fonts/*'
],
dest : '../build/minified'
dest : 'build/minified'
},
// copy assets only for packaged version
{
expand : true,
cwd : '../src/',
cwd : 'src/',
src : [
'images/*',
'fonts/*'
],
dest : '../build/packaged'
dest : 'build/packaged'
}
]
},
@ -343,11 +342,11 @@ module.exports = function(grunt) {
files: [
{
expand : true,
cwd : '../build/',
cwd : 'build/',
src : [
'**'
],
dest : '../rtl'
dest : 'rtl'
}
]
},
@ -357,11 +356,11 @@ module.exports = function(grunt) {
files: [
{
expand : true,
cwd : '../build/',
cwd : 'build/',
src : [
'**'
],
dest : '../docs/build/'
dest : 'docs/build/'
}
]
},
@ -371,11 +370,11 @@ module.exports = function(grunt) {
files: [
{
expand : true,
cwd : '../spec',
cwd : 'spec',
src : [
'**'
],
dest : '../docs/spec/'
dest : 'docs/spec/'
}
]
},
@ -385,11 +384,11 @@ module.exports = function(grunt) {
files: [
{
expand : true,
cwd : '../build/examples',
cwd : 'build/examples',
src : [
'**'
],
dest : '../docs/examples/'
dest : 'docs/examples/'
}
]
}
@ -399,13 +398,13 @@ module.exports = function(grunt) {
compress: {
options: {
archive: '../docs/build/semantic.zip'
archive: 'docs/build/semantic.zip'
},
everything: {
files: [
{
expand : true,
cwd : '../build/',
cwd : 'build/',
src : [
'**'
]
@ -418,12 +417,12 @@ module.exports = function(grunt) {
options: {
},
concatenateCSS: {
src: ["../build/uncompressed/**/*.css"],
dest: "../build/packaged/css/semantic.css"
src: ['build/uncompressed/**/*.css'],
dest: 'build/packaged/css/semantic.css'
},
concatenateJS: {
src: ["../build/uncompressed/**/*.js"],
dest: "../build/packaged/javascript/semantic.js"
src: ['build/uncompressed/**/*.js'],
dest: 'build/packaged/javascript/semantic.js'
},
},
@ -432,11 +431,11 @@ module.exports = function(grunt) {
// copy minified css to minified release
minifyCSS: {
expand : true,
cwd : '../build/uncompressed',
cwd : 'build/uncompressed',
src : [
'**/*.css'
],
dest : '../build/minified',
dest : 'build/minified',
ext : '.min.css'
},
@ -445,8 +444,8 @@ module.exports = function(grunt) {
options : {
banner : '' +
'/*\n' +
'* # <%= package.semantic.name %>\n' +
'* Version: <%= package.semantic.version %>\n' +
'* # <%= package.title %>\n' +
'* Version: <%= package.version %>\n' +
'* http://github.com/jlukic/semantic-ui\n' +
'*\n' +
'*\n' +
@ -458,8 +457,8 @@ module.exports = function(grunt) {
'*/\n'
},
files: {
'../build/packaged/css/semantic.min.css': [
'../build/uncompressed/**/*.css'
'build/packaged/css/semantic.min.css': [
'build/uncompressed/**/*.css'
]
}
}
@ -469,16 +468,16 @@ module.exports = function(grunt) {
minifyJS: {
expand : true,
cwd : '../build/uncompressed',
cwd : 'build/uncompressed',
src : [
'**/*.js'
],
dest : '../build/minified',
dest : 'build/minified',
ext : '.min.js',
banner : '' +
'/*' +
'* # <%= package.semantic.name %>\n' +
'* Version: <%= package.semantic.version %>\n' +
'* # <%= package.title %>\n' +
'* Version: <%= package.version %>\n' +
'* http://github.com/jlukic/semantic-ui\n' +
'*\n' +
'*\n' +
@ -496,8 +495,8 @@ module.exports = function(grunt) {
compress : true,
banner : '' +
'/*' +
'* # <%= package.semantic.name %>\n' +
'* Version: <%= package.semantic.version %>\n' +
'* # <%= package.title %>\n' +
'* Version: <%= package.version %>\n' +
'* http://github.com/jlukic/semantic-ui\n' +
'*\n' +
'*\n' +
@ -509,8 +508,8 @@ module.exports = function(grunt) {
'*/\n'
},
files: {
'../build/packaged/javascript/semantic.min.js': [
'../build/uncompressed/**/*.js'
'build/packaged/javascript/semantic.min.js': [
'build/uncompressed/**/*.js'
]
}
}

4
build/packaged/css/semantic.min.css
File diff suppressed because it is too large
View File

4
build/packaged/javascript/semantic.min.js
File diff suppressed because it is too large
View File

1
package.json

@ -1,5 +1,6 @@
{
"name": "semantic",
"version": "0.5.1",
"title": "Semantic UI",
"description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.",
"homepage": "http://www.semantic-ui.com",

4
rtl/packaged/css/semantic.min.css
File diff suppressed because it is too large
View File

4
rtl/packaged/javascript/semantic.min.js
File diff suppressed because it is too large
View File

320
test/coverage/PhantomJS 1.9.2 (Linux)/index.html

@ -1,320 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for All files</title>
<meta charset="utf-8">
<link rel="stylesheet" href="prettify.css">
<style>
body, html {
margin:0; padding: 0;
}
body {
font-family: Helvetica Neue, Helvetica,Arial;
font-size: 10pt;
}
div.header, div.footer {
background: #eee;
padding: 1em;
}
div.header {
z-index: 100;
position: fixed;
top: 0;
border-bottom: 1px solid #666;
width: 100%;
}
div.footer {
border-top: 1px solid #666;
}
div.body {
margin-top: 10em;
}
div.meta {
font-size: 90%;
text-align: center;
}
h1, h2, h3 {
font-weight: normal;
}
h1 {
font-size: 12pt;
}
h2 {
font-size: 10pt;
}
pre {
font-family: Consolas, Menlo, Monaco, monospace;
margin: 0;
padding: 0;
line-height: 14px;
font-size: 14px;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
div.path { font-size: 110%; }
div.path a:link, div.path a:visited { color: #000; }
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
table.coverage td {
margin: 0;
padding: 0;
color: #111;
vertical-align: top;
}
table.coverage td.line-count {
width: 50px;
text-align: right;
padding-right: 5px;
}
table.coverage td.line-coverage {
color: #777 !important;
text-align: right;
border-left: 1px solid #666;
border-right: 1px solid #666;
}
table.coverage td.text {
}
table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 40px;
}
table.coverage td span.cline-neutral {
background: #eee;
}
table.coverage td span.cline-yes {
background: #b5d592;
color: #999;
}
table.coverage td span.cline-no {
background: #fc8c84;
}
.cstat-yes { color: #111; }
.cstat-no { background: #fc8c84; color: #111; }
.fstat-no { background: #ffc520; color: #111 !important; }
.cbranch-no { background: yellow !important; color: #111; }
.missing-if-branch {
display: inline-block;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: black;
color: yellow;
xtext-decoration: line-through;
}
.missing-if-branch .typ {
color: inherit !important;
}
.entity, .metric { font-weight: bold; }
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
.metric small { font-size: 80%; font-weight: normal; color: #666; }
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
div.coverage-summary th.file { border-right: none !important; }
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
div.coverage-summary th.pct { border-right: none !important; }
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
div.coverage-summary td.pic { min-width: 120px !important; }
div.coverage-summary a:link { text-decoration: none; color: #000; }
div.coverage-summary a:visited { text-decoration: none; color: #333; }
div.coverage-summary a:hover { text-decoration: underline; }
div.coverage-summary tfoot td { border-top: 1px solid #666; }
div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
}
div.coverage-summary .yui3-datatable-sort-indicator {
background: url("http://yui.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
}
div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
background-position: 0 -20px;
}
div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
background-position: 0 -10px;
}
.high { background: #b5d592 !important; }
.medium { background: #ffe87c !important; }
.low { background: #fc8c84 !important; }
span.cover-fill, span.cover-empty {
display:inline-block;
border:1px solid #444;
background: white;
height: 12px;
}
span.cover-fill {
background: #ccc;
border-right: 1px solid #444;
}
span.cover-empty {
background: white;
border-left: none;
}
span.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
</style>
</head>
<body>
<div class="header high">
<h1>Code coverage report for <span class="entity">All files</span></h1>
<h2>
Statements: <span class="metric">100% <small>(0 / 0)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Branches: <span class="metric">100% <small>(0 / 0)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Functions: <span class="metric">100% <small>(0 / 0)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Lines: <span class="metric">100% <small>(0 / 0)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
</h2>
<div class="path"></div>
</div>
<div class="body">
<div class="coverage-summary">
<table>
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Mon Oct 14 2013 01:12:43 GMT-0400 (EDT)</div>
</div>
<script src="prettify.js"></script>
<script src="http://yui.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
<script>
YUI().use('datatable', function (Y) {
var formatters = {
pct: function (o) {
o.className += o.record.get('classes')[o.column.key];
try {
return o.value.toFixed(2) + '%';
} catch (ex) { return o.value + '%'; }
},
html: function (o) {
o.className += o.record.get('classes')[o.column.key];
return o.record.get(o.column.key + '_html');
}
},
defaultFormatter = function (o) {
o.className += o.record.get('classes')[o.column.key];
return o.value;
};
function getColumns(theadNode) {
var colNodes = theadNode.all('tr th'),
cols = [],
col;
colNodes.each(function (colNode) {
col = {
key: colNode.getAttribute('data-col'),
label: colNode.get('innerHTML') || ' ',
sortable: !colNode.getAttribute('data-nosort'),
className: colNode.getAttribute('class'),
type: colNode.getAttribute('data-type'),
allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
};
col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
cols.push(col);
});
return cols;
}
function getRowData(trNode, cols) {
var tdNodes = trNode.all('td'),
i,
row = { classes: {} },
node,
name;
for (i = 0; i < cols.length; i += 1) {
name = cols[i].key;
node = tdNodes.item(i);
row[name] = node.getAttribute('data-value') || node.get('innerHTML');
row[name + '_html'] = node.get('innerHTML');
row.classes[name] = node.getAttribute('class');
//Y.log('Name: ' + name + '; Value: ' + row[name]);
if (cols[i].type === 'number') { row[name] = row[name] * 1; }
}
//Y.log(row);
return row;
}
function getData(tbodyNode, cols) {
var data = [];
tbodyNode.all('tr').each(function (trNode) {
data.push(getRowData(trNode, cols));
});
return data;
}
function replaceTable(node) {
if (!node) { return; }
var cols = getColumns(node.one('thead')),
data = getData(node.one('tbody'), cols),
table,
parent = node.get('parentNode');
table = new Y.DataTable({
columns: cols,
data: data,
sortBy: 'file'
});
parent.set('innerHTML', '');
table.render(parent);
}
Y.on('domready', function () {
replaceTable(Y.one('div.coverage-summary table'));
if (typeof prettyPrint === 'function') {
prettyPrint();
}
});
});
</script>
</body>
</html>

1
test/coverage/PhantomJS 1.9.2 (Linux)/prettify.css

@ -1 +0,0 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

1
test/coverage/PhantomJS 1.9.2 (Linux)/prettify.js
File diff suppressed because it is too large
View File

1
test/coverage/coverage-PhantomJS 1.9.2 (Linux)-20131014_005413.json

@ -1 +0,0 @@
{}

3
test/karma.conf.js

@ -32,8 +32,7 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['spec', 'coverage'],
preprocessors: { '*.js': ['coverage'] },
reporters: ['spec'],
// web server port
port: 9999,

1
test/modules/modal.js

@ -1,4 +1,5 @@
describe("UI Modal", function() {
it("contains spec with an expectation", function() {
expect(true).toBe(true);
});

Loading…
Cancel
Save