提交 6b40ff2f 编写于 作者: wu-sheng's avatar wu-sheng

Revert "Merge remote-tracking branch 'origin/1.0-beta-analysis-webui-future'"

This reverts commit 9aab22c6, reversing
changes made to 7de4ff39.
上级 6a1b08fd
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Sky Walking</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header" style="background-image: url(images/backgroud.png);">
<h1 class="project-name">Sky Walking</h1>
<h2 class="project-tagline">Distributed Application Tracing System</h2>
<a href="https://github.com/wu-sheng/sky-walking" class="btn">View on GitHub</a>
<a href="https://github.com/wu-sheng/sky-walking/zipball/master" class="btn">Download .zip</a>
<a href="sample-code/uiView.html" class="btn">UI Preview</a>
<a href="sample-code/codeView.html" class="btn">How to trace</a>
</section>
<section class="main-content">
<h3>
<a id="什么是sky-walking" class="anchor" href="#%E4%BB%80%E4%B9%88%E6%98%AFsky-walking" aria-hidden="true"><span class="octicon octicon-link"></span></a>什么是Sky Walking?</h3>
<p>他是一个面向分布式系统的全链路监控追踪系统。用于应用集群的分布式调用情况和服务性能监控,负载分布情况的分析系统。</p>
<h3>
<a id="为什么需要sky-walking" class="anchor" href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81sky-walking" aria-hidden="true"><span class="octicon octicon-link"></span></a>为什么需要Sky Walking?</h3>
<p><img src="images/classicScene.jpeg"/></p>
<p>目前主流的应用系统或者互联网系统,都是由各种不同职责的系统构成的大规模集群(如上图所示),通过分布式调用(rest、webservice、dubbo、dubbox、消息等)的模式,支持前台系统。系统间关系复杂,无法预先设计与规划。调用链路繁多,通过日志分析难度很大。<br/>
<br/>
分布式系统的开发者和维护人员,希望在系统出现业务错误时,得到邮件通知,并能从全局角度追踪调用关系,而不用在庞大的分布式日志中,寻找关联关系和错误原因。<br/>
<br/>
从Google发表自己的Drapper分布式追踪系统的论文发表以来,wiki、淘宝、京东等各家国内外大型互联网公司,都研发了自己的全链路追踪系统。可见此系统在离散的分布式集群中的重要作用。</p>
<p>
另外,针对非分布式应用,应用的性能调优也是开发团队头疼问题,全链路监控可以针对应用的各种本地或远程调用,为提高执行效率提供依据。</p>
<h3>
<a id="sky-walking支持追踪哪些调用" class="anchor" href="#sky-walking%E6%94%AF%E6%8C%81%E8%BF%BD%E8%B8%AA%E5%93%AA%E4%BA%9B%E8%B0%83%E7%94%A8" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sky Walking支持追踪哪些调用?</h3>
<p>Sky Walking已开放底层API的方式,支持对java程序的本地调用、远程调用(同步/异步)、多线程运行的追踪监控<br/>
为了方便使用,计划在初期,开发以下常用的插件,更方便的进行追踪监控<br/>
1.web调用<br/>
2.jdbc调用<br/>
3.dubbo/dubbox<br/>
4.Spring本地方法调用<br/>
5.公司内部封装的内部服务<br/>
6.应用可自行封装的各种调用</p>
<h3>
<a id="sky-walking目前的进展情况" class="anchor" href="#sky-walking%E7%9B%AE%E5%89%8D%E7%9A%84%E8%BF%9B%E5%B1%95%E6%83%85%E5%86%B5" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sky Walking目前的进展情况?</h3>
<p><b>1.0-alpha2(on developing):</b><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.支持链路的识别,分析归类,汇总调用次数、成功率、QPS等指标<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.webui展现链路分析报告<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.log4j和log4j2扩展,能在日志中快速展现tid</p>
<p><b>1.0-alpha1(released):</b><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.支持链路追踪、上下文传递、追踪日志持久化。<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.追踪插件支持web filter, JDBC(MySQL Driver, other driver extend api), dubbo, dubbox(2.8.4/below 2.8.3), apache httpclient(4.2/4.3), spring context<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.webui展现调用轨迹、耗时、状态等。<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.支持异常调用的识别,并通过邮件告警<br/></p>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/wu-sheng/sky-walking">Sky Walking</a> is maintained by <a href="https://github.com/wu-sheng">吴晟</a><a href="https://github.com/ascrutae">张鑫</a><a href="https://github.com/tanzhen84">谭真</a>.</span>
</footer>
</section>
</body>
</html>
<component name="libraryTable">
<library name="Maven: com.alibaba:dubbox:2.8.4">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
......@@ -28,8 +28,8 @@ import java.util.List;
*/
public class CallChainMapperTest {
private static String ZK_QUORUM = "10.1.235.197,10.1.235.198,10.1.235.199";
// private static String ZK_QUORUM = "10.1.241.18,10.1.241.19,10.1.241.20";
//private static String ZK_QUORUM = "10.1.235.197,10.1.235.198,10.1.235.199";
private static String ZK_QUORUM = "10.1.241.18,10.1.241.19,10.1.241.20";
private static String ZK_CLIENT_PORT = "29181";
private static String chain_Id = "1.0a2.1457436000002.860568c.21818.49.82";
// private static String chain_Id = "1.0a2.1453429608422.2701d43.6468.56.1";
......@@ -60,39 +60,11 @@ public class CallChainMapperTest {
return entries;
}
@Test
public void validateSummaryResult() throws IOException, ParseException {
List<ChainInfo> chainInfoList = selectSpecificCallEntranceSpansOnSpecificCallTime("com.ai.aisse.core.service.impl.SynchAisseWorkDataServiceImpl.SynchAisseDataDel()", "2016-01-26/10:00:00", "2016-02-08/10:00:00");
System.out.println("size :" + chainInfoList.size());
Map<String, Integer> summaryResult = new HashMap<String, Integer>();
for (ChainInfo chainInfo : chainInfoList) {
String key = generateKey(chainInfo.getStartDate());
Integer total = summaryResult.get(key);
if (total == null){
total = 0;
}
summaryResult.put(key, ++total);
}
for (Map.Entry<String, Integer> entry : summaryResult.entrySet()){
System.out.println(entry.getKey() + " " + entry.getValue());
}
}
private String generateKey(long startDate) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date(startDate));
return calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1) + "-"
+ calendar.get(Calendar.DAY_OF_MONTH);
}
public static List<ChainInfo> selectSpecificCallEntranceSpansOnSpecificCallTime(String callEntrance, String startDate, String endDate) throws IOException, ParseException {
public static List<ChainInfo> selectSpans() throws IOException, ParseException {
List<ChainInfo> chainInfos = new ArrayList<ChainInfo>();
Table table = connection.getTable(TableName.valueOf(HBaseTableMetaData.TABLE_CALL_CHAIN.TABLE_NAME));
Scan scan = new Scan();
scan.setTimeRange(new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse(startDate).getTime(), new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse(endDate).getTime());
scan.setTimeRange(new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse("2016-01-10/11:55:48").getTime(), new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse("2016-02-10/11:55:48").getTime());
ResultScanner resultScanner = table.getScanner(scan);
Iterator<Result> resultIterator = resultScanner.iterator();
while (resultIterator.hasNext()) {
......@@ -108,10 +80,7 @@ public class CallChainMapperTest {
} catch (Exception e) {
continue;
}
// System.out.println(chainInfo.getCallEntrance());
if (callEntrance.equalsIgnoreCase(chainInfo.getCallEntrance())) {
chainInfos.add(chainInfo);
}
chainInfos.add(chainInfo);
}
return chainInfos;
......@@ -123,7 +92,6 @@ public class CallChainMapperTest {
configuration = HBaseConfiguration.create();
configuration.set("hbase.zookeeper.quorum", ZK_QUORUM);
configuration.set("hbase.zookeeper.property.clientPort", ZK_CLIENT_PORT);
configuration.set("hbase.rpc.timeout", "600000");
connection = ConnectionFactory.createConnection(configuration);
}
......
......@@ -53,7 +53,6 @@
</goals>
</execution>
</executions>
<version>2.4</version>
</plugin>
</plugins>
</build>
......
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar">
<div class="container">
<div class="navbar-header">
<button data-target=".navbar-collapse" data-toggle="collapse" type="button" class="navbar-toggle collapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div role="navigation" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right hidden-sm">
<li>
<a onclick="javascript:void(0);" href="./login.html"><ins>sign in</ins></a>
</li>
<li>
<a onclick="javascript:void(0);" href="#"><ins>sign up</ins></a>
</li>
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-4 col-md-offset-4" style="width:500px;height:200px;">
<img width="500px" src="./image/logo.png" class="img-responsive center-block" />
</div>
</div>
<div class="row">
<div class="input-group col-md-6 col-md-offset-3 ">
<input width="500px" type="text" class="form-control">
<a class="input-group-addon btn btn-primary" href="./searchResult.html">搜索</a>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar">
<div class="container">
<div class="navbar-header">
<button data-target=".navbar-collapse" data-toggle="collapse" type="button" class="navbar-toggle collapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a onclick="javascript:void(0);" href="#" class="navbar-brand hidden-sm">Skywalking-系统守望者</a>
</div>
<div role="navigation" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right hidden-sm">
<li>
<a onclick="javascript:void(0);" href="./login.html"><ins>Sign In</ins></a>
</li>
<li>
<a onclick="javascript:void(0);" href="#"><ins>Sign up</ins></a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="login-panel panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Please Sign In</h3>
</div>
<div class="panel-body">
<form role="form">
<fieldset>
<div class="form-group">
<input type="email" autofocus="" name="email" placeholder="E-mail" class="form-control">
</div>
<div class="form-group">
<input type="password" value="" name="password" placeholder="Password" class="form-control">
</div>
<div class="checkbox">
<label>
<input type="checkbox" value="Remember Me" name="remember">Remember Me
</label>
</div>
<!-- Change this to a button or input when using this as a form -->
<a class="btn btn-lg btn-success btn-block" href="index.html">Login</a>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.
Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
/*!
* Bootstrap's Gruntfile
* http://getbootstrap.com
* Copyright 2013-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
module.exports = function (grunt) {
'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
};
var fs = require('fs');
var path = require('path');
var npmShrinkwrap = require('npm-shrinkwrap');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var getLessVarsData = function () {
var filePath = path.join(__dirname, 'less/variables.less');
var fileContent = fs.readFileSync(filePath, { encoding: 'utf8' });
var parser = new BsLessdocParser(fileContent);
return { sections: parser.parseFile() };
};
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
Object.keys(configBridge.paths).forEach(function (key) {
configBridge.paths[key].forEach(function (val, i, arr) {
arr[i] = path.join('./docs/assets', val);
});
});
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under the <%= pkg.license %> license\n' +
' */\n',
jqueryCheck: configBridge.config.jqueryCheck.join('\n'),
jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'),
// Task configuration.
clean: {
dist: 'dist',
docs: 'docs/dist'
},
jshint: {
options: {
jshintrc: 'js/.jshintrc'
},
grunt: {
options: {
jshintrc: 'grunt/.jshintrc'
},
src: ['Gruntfile.js', 'package.js', 'grunt/*.js']
},
core: {
src: 'js/*.js'
},
test: {
options: {
jshintrc: 'js/tests/unit/.jshintrc'
},
src: 'js/tests/unit/*.js'
},
assets: {
src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
}
},
jscs: {
options: {
config: 'js/.jscsrc'
},
grunt: {
src: '<%= jshint.grunt.src %>'
},
core: {
src: '<%= jshint.core.src %>'
},
test: {
src: '<%= jshint.test.src %>'
},
assets: {
options: {
requireCamelCaseOrUpperCaseIdentifiers: null
},
src: '<%= jshint.assets.src %>'
}
},
concat: {
options: {
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>',
stripBanners: false
},
bootstrap: {
src: [
'js/transition.js',
'js/alert.js',
'js/button.js',
'js/carousel.js',
'js/collapse.js',
'js/dropdown.js',
'js/modal.js',
'js/tooltip.js',
'js/popover.js',
'js/scrollspy.js',
'js/tab.js',
'js/affix.js'
],
dest: 'dist/js/<%= pkg.name %>.js'
}
},
uglify: {
options: {
compress: {
warnings: false
},
mangle: true,
preserveComments: 'some'
},
core: {
src: '<%= concat.bootstrap.dest %>',
dest: 'dist/js/<%= pkg.name %>.min.js'
},
customize: {
src: configBridge.paths.customizerJs,
dest: 'docs/assets/js/customize.min.js'
},
docsJs: {
src: configBridge.paths.docsJs,
dest: 'docs/assets/js/docs.min.js'
}
},
qunit: {
options: {
inject: 'js/tests/unit/phantom.js'
},
files: 'js/tests/index.html'
},
less: {
compileCore: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
},
src: 'less/bootstrap.less',
dest: 'dist/css/<%= pkg.name %>.css'
},
compileTheme: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>-theme.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map'
},
src: 'less/theme.less',
dest: 'dist/css/<%= pkg.name %>-theme.css'
}
},
autoprefixer: {
options: {
browsers: configBridge.config.autoprefixerBrowsers
},
core: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>.css'
},
theme: {
options: {
map: true
},
src: 'dist/css/<%= pkg.name %>-theme.css'
},
docs: {
src: ['docs/assets/css/src/docs.css']
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: ['**/*.css'],
dest: 'docs/examples/'
}
},
csslint: {
options: {
csslintrc: 'less/.csslintrc'
},
dist: [
'dist/css/bootstrap.css',
'dist/css/bootstrap-theme.css'
],
examples: [
'docs/examples/**/*.css'
],
docs: {
options: {
ids: false,
'overqualified-elements': false
},
src: 'docs/assets/css/src/docs.css'
}
},
cssmin: {
options: {
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly
compatibility: 'ie8',
keepSpecialComments: '*',
sourceMap: true,
advanced: false
},
minifyCore: {
src: 'dist/css/<%= pkg.name %>.css',
dest: 'dist/css/<%= pkg.name %>.min.css'
},
minifyTheme: {
src: 'dist/css/<%= pkg.name %>-theme.css',
dest: 'dist/css/<%= pkg.name %>-theme.min.css'
},
docs: {
src: [
'docs/assets/css/ie10-viewport-bug-workaround.css',
'docs/assets/css/src/pygments-manni.css',
'docs/assets/css/src/docs.css'
],
dest: 'docs/assets/css/docs.min.css'
}
},
csscomb: {
options: {
config: 'less/.csscomb.json'
},
dist: {
expand: true,
cwd: 'dist/css/',
src: ['*.css', '!*.min.css'],
dest: 'dist/css/'
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: '**/*.css',
dest: 'docs/examples/'
},
docs: {
src: 'docs/assets/css/src/docs.css',
dest: 'docs/assets/css/src/docs.css'
}
},
copy: {
fonts: {
expand: true,
src: 'fonts/*',
dest: 'dist/'
},
docs: {
expand: true,
cwd: 'dist/',
src: [
'**/*'
],
dest: 'docs/dist/'
}
},
connect: {
server: {
options: {
port: 3000,
base: '.'
}
}
},
jekyll: {
options: {
config: '_config.yml'
},
docs: {},
github: {
options: {
raw: 'github: true'
}
}
},
htmlmin: {
dist: {
options: {
collapseWhitespace: true,
conservativeCollapse: true,
minifyCSS: true,
minifyJS: true,
removeAttributeQuotes: true,
removeComments: true
},
expand: true,
cwd: '_gh_pages',
dest: '_gh_pages',
src: [
'**/*.html',
'!examples/**/*.html'
]
}
},
jade: {
options: {
pretty: true,
data: getLessVarsData
},
customizerVars: {
src: 'docs/_jade/customizer-variables.jade',
dest: 'docs/_includes/customizer-variables.html'
},
customizerNav: {
src: 'docs/_jade/customizer-nav.jade',
dest: 'docs/_includes/nav/customize.html'
}
},
htmllint: {
options: {
ignore: [
'Attribute "autocomplete" not allowed on element "button" at this point.',
'Attribute "autocomplete" is only allowed when the input type is "color", "date", "datetime", "datetime-local", "email", "month", "number", "password", "range", "search", "tel", "text", "time", "url", or "week".',
'Element "img" is missing required attribute "src".'
]
},
src: '_gh_pages/**/*.html'
},
watch: {
src: {
files: '<%= jshint.core.src %>',
tasks: ['jshint:core', 'qunit', 'concat']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
},
less: {
files: 'less/**/*.less',
tasks: 'less'
}
},
sed: {
versionNumber: {
pattern: (function () {
var old = grunt.option('oldver');
return old ? RegExp.quote(old) : old;
})(),
replacement: grunt.option('newver'),
exclude: [
'dist/fonts',
'docs/assets',
'fonts',
'js/tests/vendor',
'node_modules',
'test-infra'
],
recursive: true
}
},
'saucelabs-qunit': {
all: {
options: {
build: process.env.TRAVIS_JOB_ID,
throttled: 10,
maxRetries: 3,
maxPollRetries: 4,
urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
}
}
},
exec: {
npmUpdate: {
command: 'npm update'
}
},
compress: {
main: {
options: {
archive: 'bootstrap-<%= pkg.version %>-dist.zip',
mode: 'zip',
level: 9,
pretty: true
},
files: [
{
expand: true,
cwd: 'dist/',
src: ['**'],
dest: 'bootstrap-<%= pkg.version %>-dist'
}
]
}
}
});
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
require('time-grunt')(grunt);
// Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint']);
var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset;
};
var isUndefOrNonZero = function (val) {
return val === undefined || val !== '0';
};
// Test task.
var testSubtasks = [];
// Skip core tests if running a different subset of the test suite
if (runSubset('core') &&
// Skip core tests if this is a Savage build
process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'csslint:dist', 'test-js', 'docs']);
}
// Skip HTML validation if running a different subset of the test suite
if (runSubset('validate-html') &&
// Skip HTML5 validator on Travis when [skip validator] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
testSubtasks.push('validate-html');
}
// Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
// Skip Sauce if running a different subset of the test suite
runSubset('sauce-js-unit') &&
// Skip Sauce on Travis when [skip sauce] is in the commit message
isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
testSubtasks.push('connect');
testSubtasks.push('saucelabs-qunit');
}
grunt.registerTask('test', testSubtasks);
grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']);
// JS distribution task.
grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']);
// CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);
// Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']);
// Default task.
grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'test']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'sed');
grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); });
// task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
grunt.registerTask('build-customizer-html', 'jade');
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
var banner = grunt.template.process('<%= banner %>');
generateRawFiles(grunt, banner);
});
grunt.registerTask('commonjs', 'Generate CommonJS entrypoint module in dist dir.', function () {
var srcFiles = grunt.config.get('concat.bootstrap.src');
var destFilepath = 'dist/js/npm.js';
generateCommonJSModule(grunt, srcFiles, destFilepath);
});
// Docs task.
grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
grunt.registerTask('lint-docs-css', ['csslint:docs', 'csslint:examples']);
grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']);
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']);
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin', 'compress']);
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
grunt.registerTask('_update-shrinkwrap', function () {
var done = this.async();
npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) {
if (err) {
grunt.fail.warn(err);
}
var dest = 'test-infra/npm-shrinkwrap.json';
fs.renameSync('npm-shrinkwrap.json', dest);
grunt.log.writeln('File ' + dest.cyan + ' updated.');
done();
});
});
};
The MIT License (MIT)
Copyright (c) 2011-2015 Twitter, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# [Bootstrap](http://getbootstrap.com)
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![NuGet](https://img.shields.io/nuget/v/bootstrap.svg)](https://www.nuget.org/packages/Bootstrap)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.
To get started, check out <http://getbootstrap.com>!
## Table of contents
* [Quick start](#quick-start)
* [Bugs and feature requests](#bugs-and-feature-requests)
* [Documentation](#documentation)
* [Contributing](#contributing)
* [Community](#community)
* [Versioning](#versioning)
* [Creators](#creators)
* [Copyright and license](#copyright-and-license)
## Quick start
Several quick start options are available:
* [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.6.zip).
* Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
* Install with [Bower](http://bower.io): `bower install bootstrap`.
* Install with [npm](https://www.npmjs.com): `npm install bootstrap`.
* Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.
* Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.
Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
### What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
```
bootstrap/
├── css/
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap-theme.css
│ ├── bootstrap-theme.css.map
│ ├── bootstrap-theme.min.css
│ └── bootstrap-theme.min.css.map
├── js/
│ ├── bootstrap.js
│ └── bootstrap.min.js
└── fonts/
├── glyphicons-halflings-regular.eot
├── glyphicons-halflings-regular.svg
├── glyphicons-halflings-regular.ttf
├── glyphicons-halflings-regular.woff
└── glyphicons-halflings-regular.woff2
```
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.
## Bugs and feature requests
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
## Documentation
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://getbootstrap.com>. The docs may also be run locally.
### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v3.0.x).
**Note for Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
4. Open `http://localhost:9001` in your browser, and voilà.
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
### Documentation for previous releases
Documentation for v2.3.2 has been made available for the time being at <http://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
## Contributing
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
## Community
Get updates on Bootstrap's development and chat with the project maintainers and community members.
* Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
* Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
* Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
* Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
* Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
* Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
## Versioning
For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
## Creators
**Mark Otto**
* <https://twitter.com/mdo>
* <https://github.com/mdo>
**Jacob Thornton**
* <https://twitter.com/fat>
* <https://github.com/fat>
## Copyright and license
Code and documentation copyright 2011-2015 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBA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iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
{
"extends" : "../js/.jshintrc",
"asi" : false,
"browser" : false,
"es3" : false,
"node" : true
}
/*!
* Bootstrap Grunt task for the CommonJS module generation
* http://getbootstrap.com
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var fs = require('fs');
var path = require('path');
var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
var destDir = path.dirname(destFilepath);
function srcPathToDestRequire(srcFilepath) {
var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
return 'require(\'' + requirePath + '\')';
}
var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
try {
fs.writeFileSync(destFilepath, moduleOutputJs);
} catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
};
/*!
* Bootstrap Grunt task for Glyphicons data generation
* http://getbootstrap.com
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var fs = require('fs');
module.exports = function generateGlyphiconsData(grunt) {
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// buffer
var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8');
var glyphiconsLines = glyphiconsFile.split('\n');
// Use any line that starts with ".glyphicon-" and capture the class name
var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/;
var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' +
'# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
var glyphiconsYml = 'docs/_data/glyphicons.yml';
for (var i = 0, len = glyphiconsLines.length; i < len; i++) {
var match = glyphiconsLines[i].match(iconClassName);
if (match !== null) {
glyphiconsData += '- ' + match[1] + '\n';
}
}
// Create the `_data` directory if it doesn't already exist
if (!fs.existsSync('docs/_data')) {
fs.mkdirSync('docs/_data');
}
try {
fs.writeFileSync(glyphiconsYml, glyphiconsData);
} catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
};
/*!
* Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var Markdown = require('markdown-it');
function markdown2html(markdownString) {
var md = new Markdown();
// the slice removes the <p>...</p> wrapper output by Markdown processor
return md.render(markdownString.trim()).slice(3, -5);
}
/*
Mini-language:
//== This is a normal heading, which starts a section. Sections group variables together.
//## Optional description for the heading
//=== This is a subheading.
//** Optional description for the following variable. You **can** use Markdown in descriptions to discuss `<html>` stuff.
@foo: #fff;
//-- This is a heading for a section whose variables shouldn't be customizable
All other lines are ignored completely.
*/
var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
var SECTION_DOCSTRING = /^[/]{2}#{2}(.+)$/;
var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]*);[ ]*$/;
var VAR_DOCSTRING = /^[/]{2}[*]{2}(.+)$/;
function Section(heading, customizable) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.customizable = customizable;
this.docstring = null;
this.subsections = [];
}
Section.prototype.addSubSection = function (subsection) {
this.subsections.push(subsection);
};
function SubSection(heading) {
this.heading = heading.trim();
this.id = this.heading.replace(/\s+/g, '-').toLowerCase();
this.variables = [];
}
SubSection.prototype.addVar = function (variable) {
this.variables.push(variable);
};
function VarDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function SectionDocstring(markdownString) {
this.html = markdown2html(markdownString);
}
function Variable(name, defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
this.docstring = null;
}
function Tokenizer(fileContent) {
this._lines = fileContent.split('\n');
this._next = undefined;
}
Tokenizer.prototype.unshift = function (token) {
if (this._next !== undefined) {
throw new Error('Attempted to unshift twice!');
}
this._next = token;
};
Tokenizer.prototype._shift = function () {
// returning null signals EOF
// returning undefined means the line was ignored
if (this._next !== undefined) {
var result = this._next;
this._next = undefined;
return result;
}
if (this._lines.length <= 0) {
return null;
}
var line = this._lines.shift();
var match = null;
match = SUBSECTION_HEADING.exec(line);
if (match !== null) {
return new SubSection(match[1]);
}
match = CUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], true);
}
match = UNCUSTOMIZABLE_HEADING.exec(line);
if (match !== null) {
return new Section(match[1], false);
}
match = SECTION_DOCSTRING.exec(line);
if (match !== null) {
return new SectionDocstring(match[1]);
}
match = VAR_DOCSTRING.exec(line);
if (match !== null) {
return new VarDocstring(match[1]);
}
var commentStart = line.lastIndexOf('//');
var varLine = commentStart === -1 ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) {
return new Variable(match[1], match[2]);
}
return undefined;
};
Tokenizer.prototype.shift = function () {
while (true) {
var result = this._shift();
if (result === undefined) {
continue;
}
return result;
}
};
function Parser(fileContent) {
this._tokenizer = new Tokenizer(fileContent);
}
Parser.prototype.parseFile = function () {
var sections = [];
while (true) {
var section = this.parseSection();
if (section === null) {
if (this._tokenizer.shift() !== null) {
throw new Error('Unexpected unparsed section of file remains!');
}
return sections;
}
sections.push(section);
}
};
Parser.prototype.parseSection = function () {
var section = this._tokenizer.shift();
if (section === null) {
return null;
}
if (!(section instanceof Section)) {
throw new Error('Expected section heading; got: ' + JSON.stringify(section));
}
var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) {
section.docstring = docstring;
} else {
this._tokenizer.unshift(docstring);
}
this.parseSubSections(section);
return section;
};
Parser.prototype.parseSubSections = function (section) {
while (true) {
var subsection = this.parseSubSection();
if (subsection === null) {
if (section.subsections.length === 0) {
// Presume an implicit initial subsection
subsection = new SubSection('');
this.parseVars(subsection);
} else {
break;
}
}
section.addSubSection(subsection);
}
if (section.subsections.length === 1 && !section.subsections[0].heading && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection
section.subsections = [];
}
};
Parser.prototype.parseSubSection = function () {
var subsection = this._tokenizer.shift();
if (subsection instanceof SubSection) {
this.parseVars(subsection);
return subsection;
}
this._tokenizer.unshift(subsection);
return null;
};
Parser.prototype.parseVars = function (subsection) {
while (true) {
var variable = this.parseVar();
if (variable === null) {
return;
}
subsection.addVar(variable);
}
};
Parser.prototype.parseVar = function () {
var docstring = this._tokenizer.shift();
if (!(docstring instanceof VarDocstring)) {
this._tokenizer.unshift(docstring);
docstring = null;
}
var variable = this._tokenizer.shift();
if (variable instanceof Variable) {
variable.docstring = docstring;
return variable;
}
this._tokenizer.unshift(variable);
return null;
};
module.exports = Parser;
/*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var fs = require('fs');
var btoa = require('btoa');
var glob = require('glob');
function getFiles(type) {
var files = {};
var recursive = type === 'less';
var globExpr = recursive ? '/**/*' : '/*';
glob.sync(type + globExpr)
.filter(function (path) {
return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
})
.forEach(function (fullPath) {
var relativePath = fullPath.replace(/^[^/]+\//, '');
files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8');
});
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
}
module.exports = function generateRawFilesJs(grunt, banner) {
if (!banner) {
banner = '';
}
var dirs = ['js', 'less', 'fonts'];
var files = banner + dirs.map(getFiles).reduce(function (combined, file) {
return combined + file;
}, '');
var rawFilesJs = 'docs/assets/js/raw-files.min.js';
try {
fs.writeFileSync(rawFilesJs, files);
} catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');
};
{
"paths": {
"customizerJs": [
"../assets/js/vendor/autoprefixer.js",
"../assets/js/vendor/less.min.js",
"../assets/js/vendor/jszip.min.js",
"../assets/js/vendor/uglify.min.js",
"../assets/js/vendor/Blob.js",
"../assets/js/vendor/FileSaver.js",
"../assets/js/raw-files.min.js",
"../assets/js/src/customizer.js"
],
"docsJs": [
"../assets/js/vendor/holder.min.js",
"../assets/js/vendor/ZeroClipboard.min.js",
"../assets/js/vendor/anchor.js",
"../assets/js/src/application.js"
]
},
"config": {
"autoprefixerBrowsers": [
"Android 2.3",
"Android >= 4",
"Chrome >= 20",
"Firefox >= 24",
"Explorer >= 8",
"iOS >= 6",
"Opera >= 12",
"Safari >= 6"
],
"jqueryCheck": [
"if (typeof jQuery === 'undefined') {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
"}\n"
],
"jqueryVersionCheck": [
"+function ($) {",
" 'use strict';",
" var version = $.fn.jquery.split(' ')[0].split('.')",
" if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')",
" }",
"}(jQuery);\n\n"
]
}
}
// Alerts
.alert-variant(@background; @border; @text-color) {
background-color: @background;
border-color: @border;
color: @text-color;
hr {
border-top-color: darken(@border, 5%);
}
.alert-link {
color: darken(@text-color, 10%);
}
}
// Contextual backgrounds
.bg-variant(@color) {
background-color: @color;
a&:hover,
a&:focus {
background-color: darken(@color, 10%);
}
}
// Center-align a block level element
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// Labels
.label-variant(@color) {
background-color: @color;
&[href] {
&:hover,
&:focus {
background-color: darken(@color, 10%);
}
}
}
// Opacity
.opacity(@opacity) {
opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})";
}
// Sizing shortcuts
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册