Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
refactor(tabs): simpler code, focus fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Sep 23, 2014
1 parent 5a62764 commit 8448f96
Show file tree
Hide file tree
Showing 51 changed files with 1,159 additions and 2,461 deletions.
7 changes: 3 additions & 4 deletions config/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
return !!module;
}),

componentsModule: "angular.module('ngMaterial', [ 'ng', 'ngAnimate', 'material.services.attrBind', 'material.services.compiler', 'material.services.registry', 'material.services.throttle', 'material.decorators', 'material.services.aria', <%= components.join(',') %>]);\n",
componentsModule: "angular.module('ngMaterial', [ 'ng', 'ngAnimate', 'material.services.attrBind', 'material.services.compiler', 'material.services.registry', 'material.decorators', 'material.services.aria', <%= components.join(',') %>]);\n",

dist: 'dist',

Expand Down Expand Up @@ -64,9 +64,8 @@ module.exports = {
//into the build
js: [
//Utilities
'src/base/iterator.js',
'src/base/utils.js',
'src/base/constants.js',
'src/core/**/*.js',
'!src/core/**/*.spec.js',

// Ink Components
'src/components/animate/effects.js',
Expand Down
7 changes: 1 addition & 6 deletions docs/app/js/demoInclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,7 @@ function($q, $http, $compile, $templateCache) {
.then(function(response) { return response.data; });
}))
.then(function(styles) {
styles = styles
.join('\n') //join styles as one string
.replace(/.+?({|,)\w*$/g, function($1) {
// change ' .selector {' to '.buttonsDemo1 .selector {'
return demoSelector + $1;
});
styles = styles.join('\n'); //join styles as one string

var styleElement = angular.element('<style>' + styles + '</style>');
document.body.appendChild(styleElement[0]);
Expand Down
1 change: 1 addition & 0 deletions docs/app/js/highlight-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DocsApp
if (attr.code) {
code = scope.$eval(attr.code);
}
if (!code) return;
var highlightedCode = hljs.highlight(attr.language || attr.lang, code.trim());
highlightedCode.value = highlightedCode.value.replace(/=<span class="hljs-value">""<\/span>/gi, '');
codeElement.append(highlightedCode.value).addClass('highlight');
Expand Down
19 changes: 16 additions & 3 deletions docs/processors/components-generate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var _ = require('lodash');
var path = require('canonical-path');
var ngModuleData = require('../util/ngModuleData');
var sass = require('node-sass');

module.exports = {
name: 'components-generate',
Expand Down Expand Up @@ -107,14 +108,26 @@ module.exports = {
.remove({ basePath: 'index.html' })
.first();

var moduleDoc = _.find(demoDocs, function(doc) {
return !!doc.module;
});
var moduleDoc = _.find(demoDocs, function(doc) {
return !!doc.module;
});

demo.module = moduleDoc && moduleDoc.module || '';
var files = _.map(demoDocs, generateDemoFile);
var indexFile = generateDemoFile(indexDoc);

// Wrap the css docs in a '.demoModule {' rule and compile with sass.
if (demo.module) {
_.filter(files, { fileType: 'css' })
.forEach(function(file) {
var moduleSelector = '.' + demo.module + ' {';
var content = moduleSelector + '\n' + file.content + '\n}';
file.content = sass.renderSync({
data: content
});
});
}

renderedDocs = renderedDocs
.concat(indexFile)
.concat(files);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.10",
"lodash": "^2.4.1",
"minimist": "^0.1.0"
"minimist": "^0.1.0",
"node-sass": "^0.9.5-rc1"
}
}
47 changes: 0 additions & 47 deletions src/base/constants.js

This file was deleted.

236 changes: 0 additions & 236 deletions src/base/iterator.js

This file was deleted.

Loading

0 comments on commit 8448f96

Please sign in to comment.