Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Update bower configuration
- Update grunt
- Update grunt plugins
- Use Bootstrap from CDN and remove local dependency
- Remove LESS build step, plain CSS is fine
- Update docs to use Bootstrap 3.x
  • Loading branch information
ndabas committed Aug 10, 2016
1 parent 411de77 commit 981f225
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 139 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Bower components
components/
bower_components/

# NPM components
node_modules/

# Build atrifacts
# Build artifacts
docs/assets/
docs/css/*.min.css
docs/lib/jquery.toc/
docs/_site/
17 changes: 3 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function(grunt) {
}
},
options: {
banner: "/*! Table of Contents jQuery Plugin - jquery.toc * Copyright 2013 Nikhil Dabas * http://www.apache.org/licenses/LICENSE-2.0 */\n"
banner: "/*! Table of Contents jQuery Plugin - jquery.toc * Copyright (c) 2013-2016 Nikhil Dabas * http://www.apache.org/licenses/LICENSE-2.0 */\n"
}
},
compress: {
Expand All @@ -43,25 +43,14 @@ module.exports = function(grunt) {
{expand: true, cwd: "docs/lib/jquery.toc/", src: ["*"], dest: "jquery.toc/"}
]
}
},
less: {
docs: {
options: {
yuicompress: true
},
files: {
"docs/css/docs.min.css": "docs/css/docs.less"
}
}
}
});

grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-compress");
grunt.loadNpmTasks('grunt-contrib-less');

grunt.registerTask("default", ["copy", "jshint", "uglify", "compress", "less"]);

grunt.registerTask("default", ["copy", "jshint", "uglify", "compress"]);

};
3 changes: 0 additions & 3 deletions component.json → bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"main": "./jquery.toc.js",
"dependencies": {
"jquery": ">=1.6.3"
},
"devDependencies": {
"bootstrap": "~2.3.1"
}
}
2 changes: 0 additions & 2 deletions docs/_config.yml

This file was deleted.

73 changes: 41 additions & 32 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Table of Contents jQuery Plugin - jquery.toc.js - A minimal, tiny jQuery plugin that will generate a table of contents, drawing from headings on the page.">
<meta name="author" content="Nikhil Dabas">
<link href="css/docs.min.css" rel="stylesheet" type="text/css">
</head>
<body>

<div class="container-narrow">

<div class="masthead">

<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Table of Contents jQuery Plugin - jquery.toc.js - A minimal, tiny jQuery plugin that will generate a table of contents, drawing from headings on the page.">
<meta name="author" content="Nikhil Dabas">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="css/docs.css" rel="stylesheet" type="text/css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body>

<div class="container">

<div class="header clearfix">
<nav>
<ul class="nav nav-pills pull-right">
<li class="active"><a href="#">Home</a></li>
<li><a href="http://github.com/ndabas/toc">GitHub Project</a></li>
<li role="presentation" class="active"><a href="#">Home</a></li>
<li role="presentation"><a href="http://github.com/ndabas/toc">GitHub Project</a></li>
</ul>
<h3 class="muted">jquery.toc</h3>
</div>

<hr>

{{ content }}

<hr>
</nav>
<h3 class="text-muted">jquery.toc</h3>
</div>

<div class="footer">
<p>&copy; <a href="http://www.nikhildabas.com/">Nikhil Dabas</a> 2013</p>
</div>
{{ content }}

<div class="footer">
<p>&copy; <a href="http://www.nikhildabas.com/">Nikhil Dabas</a> 2013-2016</p>
</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="lib/jquery.toc/jquery.toc.js" type="text/javascript"></script>
<script src="lib/google-code-prettify/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="lib/jquery.toc/jquery.toc.js" type="text/javascript"></script>
<script src="lib/google-code-prettify/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
window.prettyPrint && prettyPrint();
});
</script>
</script>

</body>

</body>
</html>
92 changes: 92 additions & 0 deletions docs/css/docs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*!
* CSS for Table of Contents jQuery Plugin docs, based on the 'Narrow jumbotron' Bootstrap example
*/

body {
padding-top: 20px;
padding-bottom: 40px;
}

.header,
.content
.footer {
padding-right: 15px;
padding-left: 15px;
}

.header {
padding-bottom: 20px;
border-bottom: 1px solid #e5e5e5;
}

.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
}

.footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}

@media (min-width: 768px) {
.container {
max-width: 730px;
}
}

.jumbotron {
margin: 60px 0;
text-align: center;
background-color: #fff;
}

.jumbotron h1 {
font-size: 72px;
line-height: 1;
}

.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}

.content {
margin: 60px 0;
}

.content p + h4 {
margin-top: 28px;
}

@media screen and (min-width: 768px) {
.header,
.content,
.footer {
padding-right: 0;
padding-left: 0;
}

.header {
margin-bottom: 30px;
}
}

/* google-code-prettify */

.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .prettyprint .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }

.prettyprint {
padding: 8px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
70 changes: 0 additions & 70 deletions docs/css/docs.less

This file was deleted.

6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ <h1>Table of Contents jQuery Plugin</h1>
<p class="lead">
A minimal, tiny jQuery plugin that will generate a table of contents, using
semantic, nested lists with hash-link anchors to headings.</p>
<p><a class="btn btn-large btn-success" href="assets/jquery.toc.zip">Download</a></p>

<p><a class="btn btn-lg btn-success" href="assets/jquery.toc.zip">Download</a></p>

<p>
<span class="muted">Version 0.3.5</span> &middot;
<a href="http://github.com/ndabas/toc">GitHub Project</a></p>
Expand Down
18 changes: 6 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@
"url": "https://github.com/ndabas/toc.git"
},
"author": "Nikhil Dabas",
"licenses": [
{
"type": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"license": "Apache-2.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-uglify": "~0.1.2",
"grunt-contrib-jshint": "~0.2.0",
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-compress": "~0.4.1",
"grunt-contrib-less": "~0.5.0"
"grunt": "^1.0.1",
"grunt-contrib-compress": "^1.3.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0"
}
}

0 comments on commit 981f225

Please sign in to comment.