1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-12-18 02:15:56 +01:00

Updated npm/bower dependencies and refactored Gulpfile

This commit is contained in:
squidfunk 2016-02-11 12:09:58 +01:00
parent 900cab527c
commit 001fbc130a
17 changed files with 367 additions and 362 deletions

View File

@ -20,11 +20,15 @@
language: node_js language: node_js
# Node.js versions
node_js:
- "4.1"
- "0.11"
# Install dependencies # Install dependencies
before_script: before_script:
# Install gulp and bower # Install bower
- npm install -g gulp
- npm install -g bower - npm install -g bower
# Install project dependencies # Install project dependencies

View File

@ -1,6 +1,8 @@
mkdocs-material-0.x.x (2016-xx-xx) [in progress] mkdocs-material-0.x.x (2016-xx-xx) [in progress]
* Fixed #1: GitHub stars don't work if the repo_url ends with a '/' * Fixed #1: GitHub stars don't work if the repo_url ends with a '/'
* Updated npm and bower dependencies to most recent versions
* Made MkDocs building/serving in build process optional
* Set up continuous integration with travis-ci.org * Set up continuous integration with travis-ci.org
mkdocs-material-0.1.0 (2016-02-09) mkdocs-material-0.1.0 (2016-02-09)

View File

@ -27,7 +27,7 @@
var gulp = require('gulp'); var gulp = require('gulp');
var addsrc = require('gulp-add-src'); var addsrc = require('gulp-add-src');
var args = require('yargs').argv; var args = require('yargs').argv;
var autoprefix = require('autoprefixer-core'); var autoprefix = require('autoprefixer');
var child = require('child_process'); var child = require('child_process');
var clean = require('del'); var clean = require('del');
var collect = require('gulp-rev-collector'); var collect = require('gulp-rev-collector');
@ -35,7 +35,7 @@ var compact = require('gulp-remove-empty-lines');
var concat = require('gulp-concat'); var concat = require('gulp-concat');
var ignore = require('gulp-ignore'); var ignore = require('gulp-ignore');
var gulpif = require('gulp-if'); var gulpif = require('gulp-if');
var mincss = require('gulp-minify-css'); var mincss = require('gulp-cssnano');
var minhtml = require('gulp-htmlmin'); var minhtml = require('gulp-htmlmin');
var minimage = require('gulp-image-optimization'); var minimage = require('gulp-image-optimization');
var modernizr = require('gulp-modernizr'); var modernizr = require('gulp-modernizr');
@ -54,7 +54,7 @@ var vinyl = require('vinyl-paths');
* Locals * Locals
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
/* Application server */ /* MkDocs server */
var server = null; var server = null;
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
@ -204,7 +204,7 @@ gulp.task('assets:views', args.production ? [
*/ */
gulp.task('assets:revisions:clean', function() { gulp.task('assets:revisions:clean', function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}']) return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.include(/-[a-f0-9]{8}\.(ico|css|js|png|jpg|gif)$/)) .pipe(ignore.include(/-[a-f0-9]{8,}\.(ico|css|js|png|jpg|gif)$/))
.pipe(vinyl(clean)); .pipe(vinyl(clean));
}); });
@ -218,7 +218,7 @@ gulp.task('assets:revisions', [
'assets:static' 'assets:static'
], function() { ], function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}']) return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.exclude(/-[a-f0-9]{8}\.(css|js|png|jpg|gif)$/)) .pipe(ignore.exclude(/-[a-f0-9]{8,}\.(css|js|png|jpg|gif)$/))
.pipe(rev()) .pipe(rev())
.pipe(gulp.dest('material')) .pipe(gulp.dest('material'))
.pipe(rev.manifest('manifest.json')) .pipe(rev.manifest('manifest.json'))
@ -268,22 +268,22 @@ gulp.task('assets:watch', function() {
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
/* /*
* Build application server. * Build documentation.
*/ */
gulp.task('server:build', [ gulp.task('mkdocs:build', [
'assets:build' 'assets:build'
], function() { ], function() {
return child.spawnSync('mkdocs', ['build']); return child.spawnSync('mkdocs', ['build']);
}); });
/* /*
* Restart application server. * Restart MkDocs server.
*/ */
gulp.task('server:spawn', function() { gulp.task('mkdocs:serve', function() {
if (server) if (server)
server.kill(); server.kill();
/* Spawn application server */ /* Spawn MkDocs server */
server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']); server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']);
/* Pretty print server log output */ /* Pretty print server log output */
@ -305,23 +305,25 @@ gulp.task('server:spawn', function() {
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
/* /*
* Build assets and application server. * Build assets and documentation.
*/ */
gulp.task('build', [ gulp.task('build', [
'assets:build', 'assets:build'
'server:build' ].concat(args.mkdocs
]); ? 'mkdocs:build'
: []));
/* /*
* Start asset and server watchdogs. * Start asset and MkDocs watchdogs.
*/ */
gulp.task('watch', [ gulp.task('watch', [
'assets:build', 'assets:build',
], function() { ], function() {
return gulp.start([ return gulp.start([
'assets:watch', 'assets:watch'
'server:spawn' ].concat(args.mkdocs
]); ? 'mkdocs:serve'
: []));
}); });
/* /*

View File

@ -1,5 +1,5 @@
{ {
"name": "Material", "name": "mkdocs-material",
"version": "0.1.0", "version": "0.1.0",
"description": "A material design theme for MkDocs", "description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/", "homepage": "http://squidfunk.github.io/mkdocs-material/",
@ -17,15 +17,15 @@
], ],
"private": true, "private": true,
"dependencies": { "dependencies": {
"classlist": "~2014.12.13", "classlist": "^2014.12.13",
"fastclick": "~1.0.6", "fastclick": "^1.0.6",
"lunr.js": "~0.5.10", "lunr.js": "^0.6.0",
"pegasus": "~0.3.1", "pegasus": "^0.3.2",
"respond": "~1.4.2" "respond": "^1.4.2"
}, },
"devDependencies": { "devDependencies": {
"bourbon": "~4.2.2", "bourbon": "^4.2.6",
"quantum-colors": "~1.0.1", "quantum-colors": "^1.0.1",
"quantum-shadows": "~1.0.0" "quantum-shadows": "^1.0.0",
} }
} }

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,12 +34,12 @@
{% if config.extra.logo %} {% if config.extra.logo %}
<link rel="apple-touch-icon" href="{{ base_url }}/{{ config.extra.logo }}"> <link rel="apple-touch-icon" href="{{ base_url }}/{{ config.extra.logo }}">
{% endif %} {% endif %}
{% set icon = icon | default('assets/images/favicon-e565ddfa.ico') %} {% set icon = icon | default('assets/images/favicon-e565ddfa3b.ico') %}
<link rel="shortcut icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}"> <link rel="shortcut icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}">
<link rel="icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}"> <link rel="icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu+Mono"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu+Mono">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-1f184bc3.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-5ffbc5b035.css">
{% for path in extra_css %} {% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}"> <link rel="stylesheet" href="{{ path }}">
{% endfor %} {% endfor %}
@ -103,12 +103,12 @@
</div> </div>
</div> </div>
</main> </main>
<script src="{{ base_url }}/assets/javascripts/modernizr-79394028.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-e5e5f05404.js"></script>
<script> <script>
var base_url = '{{ base_url }}'; var base_url = '{{ base_url }}';
var repo_id = '{{ repo_id }}'; var repo_id = '{{ repo_id }}';
</script> </script>
<script src="{{ base_url }}/assets/javascripts/application-d84ecdee.js"></script> <script src="{{ base_url }}/assets/javascripts/application-c6d2e828bd.js"></script>
{% for path in extra_javascript %} {% for path in extra_javascript %}
<script src="{{ path }}"></script> <script src="{{ path }}"></script>
{% endfor %} {% endfor %}

View File

@ -1,6 +1,6 @@
{ {
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa.ico", "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-d84ecdee.js", "assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-79394028.js", "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-e5e5f05404.js",
"assets/stylesheets/application.css": "assets/stylesheets/application-1f184bc3.css" "assets/stylesheets/application.css": "assets/stylesheets/application-5ffbc5b035.css"
} }

View File

@ -1,5 +1,5 @@
{ {
"name": "Material", "name": "mkdocs-material",
"version": "0.1.0", "version": "0.1.0",
"description": "A material design theme for MkDocs", "description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/", "homepage": "http://squidfunk.github.io/mkdocs-material/",
@ -17,32 +17,29 @@
}, },
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"autoprefixer-core": "^5.1.11", "autoprefixer": "^6.3.2",
"css-mqpacker": "^3.1.0", "css-mqpacker": "^4.0.0",
"del": "^1.1.1", "del": "^2.2.0",
"gulp": "^3.8.11", "gulp": "^3.9.1",
"gulp-add-src": "^0.2.0", "gulp-add-src": "^0.2.0",
"gulp-concat": "^2.5.2", "gulp-concat": "^2.6.0",
"gulp-debug": "^2.0.1", "gulp-cssnano": "^2.1.1",
"gulp-htmlmin": "^1.1.1", "gulp-htmlmin": "^1.3.0",
"gulp-if": "^1.2.5", "gulp-if": "^2.0.0",
"gulp-ignore": "^1.2.1", "gulp-ignore": "^2.0.1",
"gulp-image-optimization": "^0.1.3", "gulp-image-optimization": "^0.1.3",
"gulp-match": "^0.2.1", "gulp-modernizr": "0.0.0",
"gulp-minify-css": "^1.1.0", "gulp-plumber": "^1.1.0",
"gulp-modernizr": "^1.0.0-alpha", "gulp-postcss": "^6.1.0",
"gulp-plumber": "^1.0.0",
"gulp-postcss": "^5.1.3",
"gulp-remove-empty-lines": "0.0.2", "gulp-remove-empty-lines": "0.0.2",
"gulp-rev": "^3.0.1", "gulp-rev": "^7.0.0",
"gulp-rev-collector": "^1.0.0", "gulp-rev-collector": "^1.0.2",
"gulp-sass": "^2.0.3", "gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.5.2", "gulp-sourcemaps": "^1.6.0",
"gulp-sync": "^0.1.4", "gulp-uglify": "^1.5.2",
"gulp-uglify": "^1.2.0", "gulp-util": "^3.0.7",
"gulp-util": "^3.0.4", "node-notifier": "^4.5.0",
"node-notifier": "^4.2.1", "vinyl-paths": "^2.1.0",
"vinyl-paths": "^1.0.0", "yargs": "^3.32.0"
"yargs": "^3.8.0"
} }
} }