From 981f22566b50a895c4688b83fff0642b0ead91e4 Mon Sep 17 00:00:00 2001 From: Nikhil Dabas Date: Wed, 10 Aug 2016 13:33:24 +0530 Subject: [PATCH] Update dependencies - 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 --- .gitignore | 5 +- Gruntfile.js | 17 ++----- component.json => bower.json | 3 -- docs/_config.yml | 2 - docs/_layouts/default.html | 73 +++++++++++++++------------- docs/css/docs.css | 92 ++++++++++++++++++++++++++++++++++++ docs/css/docs.less | 70 --------------------------- docs/index.html | 6 +-- package.json | 18 +++---- 9 files changed, 147 insertions(+), 139 deletions(-) rename component.json => bower.json (70%) delete mode 100644 docs/_config.yml create mode 100644 docs/css/docs.css delete mode 100644 docs/css/docs.less diff --git a/.gitignore b/.gitignore index 479bc0b..f03bfe6 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/Gruntfile.js b/Gruntfile.js index f608ea8..419e3e7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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: { @@ -43,16 +43,6 @@ 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" - } - } } }); @@ -60,8 +50,7 @@ module.exports = function(grunt) { 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"]); }; diff --git a/component.json b/bower.json similarity index 70% rename from component.json rename to bower.json index 83db8a9..9d72115 100644 --- a/component.json +++ b/bower.json @@ -4,8 +4,5 @@ "main": "./jquery.toc.js", "dependencies": { "jquery": ">=1.6.3" - }, - "devDependencies": { - "bootstrap": "~2.3.1" } } diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index a1a4e3e..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Jekyll settings -exclude: ["docs.less"] diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 0d1cc99..d4f5ab1 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,45 +1,54 @@ - - - {{ page.title }} - - - - - - - -
- -
+ + + + {{ page.title }} + + + + + + + + + + + + + +
+ +
+
- -
- - {{ content }} - -
+ +

jquery.toc

+
- + {{ content }} + - - - - + + + + + + - diff --git a/docs/css/docs.css b/docs/css/docs.css new file mode 100644 index 0000000..793770c --- /dev/null +++ b/docs/css/docs.css @@ -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; +} diff --git a/docs/css/docs.less b/docs/css/docs.less deleted file mode 100644 index 39634a1..0000000 --- a/docs/css/docs.less +++ /dev/null @@ -1,70 +0,0 @@ -// CSS for docs -// Includes Twitter Bootstrap - -@import "../../components/bootstrap/less/bootstrap.less"; - -/*! - * CSS for Table of Contents jQuery Plugin docs, based on 'Narrow marketing' Bootstrap example - */ - -body { - padding-top: 20px; - padding-bottom: 40px; -} - -// Custom container - -.container-narrow { - margin: 0 auto; - max-width: 700px; -} - -.container-narrow > hr { - margin: 30px 0; -} - -// Main message and download button - -.jumbotron { - margin: 60px 0; - text-align: center; -} - -.jumbotron h1 { - font-size: 72px; - line-height: 1; -} - -.jumbotron .btn { - font-size: 21px; - padding: 14px 24px; -} - -// Supporting content - -.content { - margin: 60px 0; -} - -.content p + h4 { - margin-top: 28px; -} - -// 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; -} - -@import "../../components/bootstrap/less/responsive.less"; diff --git a/docs/index.html b/docs/index.html index 6ca05e1..fe43e8d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,9 +8,9 @@

Table of Contents jQuery Plugin

A minimal, tiny jQuery plugin that will generate a table of contents, using semantic, nested lists with hash-link anchors to headings.

- -

Download

- + +

Download

+

Version 0.3.5 · GitHub Project

diff --git a/package.json b/package.json index 2ed4229..973af8e 100644 --- a/package.json +++ b/package.json @@ -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" } }