1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-30 18:24:35 +01:00

Fixed Gulp build pipeline

This commit is contained in:
squidfunk 2017-02-26 11:55:47 +01:00
parent 2c3ca5aeb4
commit 09d579b516
12 changed files with 40 additions and 27 deletions

View File

@ -1,3 +1,15 @@
mkdocs-material-1.1.0 (2017-xx-xx)
* Added static type checking using Facebook's Flow
* Added Disqus integration (optional)
* Added tabs navigation feature (optional)
* Added a high resolution Favicon with the new logo
* Fixed #175: Tables cannot be set to 100% width
* Fixed #173: Dictionary elements have no bottom spacing
* Fixed race conditions in build related to asset revisioning
* Refactored and automated Docker build and PyPI release
* Refactored styles related to tables
mkdocs-material-1.0.5 (2017-02-18) mkdocs-material-1.0.5 (2017-02-18)
* Fixed #153: Sidebar flows out of constrained area in Chrome 56 * Fixed #153: Sidebar flows out of constrained area in Chrome 56

View File

@ -154,28 +154,28 @@ gulp.task("assets:images:clean",
/* /*
* Build application logic * Build application logic
* *
* When revisioning, the build must be serialized due to race conditions * When revisioning assets, the build must be serialized due to possible race
* happening when two tasks try to write manifest.json simultaneously * conditions when two tasks try to write manifest.json simultaneously
*/ */
gulp.task("assets:javascripts:build:application", [ gulp.task("assets:javascripts:build:application", [
args.revision ? "assets:javascripts:build:application" : false,
args.clean ? "assets:javascripts:clean" : false, args.clean ? "assets:javascripts:clean" : false,
args.lint ? "assets:javascripts:lint" : false args.lint ? "assets:javascripts:lint" : false,
args.revision ? "assets:stylesheets:build" : false
].filter(t => t), ].filter(t => t),
load("assets/javascripts/build/application")) load("assets/javascripts/build/application"))
/* /*
* Build custom modernizr * Build custom modernizr
* *
* When revisioning, the build must be serialized due to race conditions * When revisioning assets, the build must be serialized due to possible race
* happening when two tasks try to write manifest.json simultaneously * conditions when two tasks try to write manifest.json simultaneously
*/ */
gulp.task("assets:javascripts:build:modernizr", [ gulp.task("assets:javascripts:build:modernizr", [
"assets:stylesheets:build", "assets:stylesheets:build",
args.revision ? "assets:javascripts:build:application" : false,
args.clean ? "assets:javascripts:clean" : false, args.clean ? "assets:javascripts:clean" : false,
args.lint ? "assets:javascripts:lint" : false args.lint ? "assets:javascripts:lint" : false,
args.revision ? "assets:javascripts:build:application" : false
].filter(t => t), ].filter(t => t),
load("assets/javascripts/build/modernizr")) load("assets/javascripts/build/modernizr"))
@ -261,10 +261,10 @@ gulp.task("assets:clean", [
*/ */
gulp.task("views:build", [ gulp.task("views:build", [
args.clean ? "views:clean" : false,
args.revision ? "assets:images:build" : false, args.revision ? "assets:images:build" : false,
args.revision ? "assets:stylesheets:build" : false, args.revision ? "assets:stylesheets:build" : false,
args.revision ? "assets:javascripts:build" : false, args.revision ? "assets:javascripts:build" : false
args.clean ? "views:clean" : false
].filter(t => t), ].filter(t => t),
load("views/build")) load("views/build"))
@ -285,8 +285,7 @@ gulp.task("mkdocs:build", [
"assets:build", "assets:build",
"views:build", "views:build",
"mkdocs:clean" "mkdocs:clean"
].filter(t => t), ], load("mkdocs/build"))
load("mkdocs/build"))
/* /*
* Clean documentation build * Clean documentation build

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

@ -32,7 +32,7 @@
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-a7dac97dbb.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-954a1bc95b.css">
{% if config.extra.palette %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %} {% endif %}
@ -143,7 +143,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application-8dc3dfc020.js"></script> <script src="{{ base_url }}/assets/javascripts/application-6da1e0a63e.js"></script>
<script>app.initialize({url:{base:"{{ base_url }}"}})</script> <script>app.initialize({url:{base:"{{ base_url }}"}})</script>
{% for path in extra_javascript %} {% for path in extra_javascript %}
<script src="{{ path }}"></script> <script src="{{ path }}"></script>

View File

@ -28,4 +28,5 @@ if [[ ! -d `npm bin` ]]; then
fi fi
# Run command # Run command
`npm bin`/gulp clean && \
`npm bin`/gulp watch --no-lint "$@" `npm bin`/gulp watch --no-lint "$@"

View File

@ -42,14 +42,16 @@ export default class Shadow {
const ref = (typeof el === "string") const ref = (typeof el === "string")
? document.querySelector(el) ? document.querySelector(el)
: el : el
if (!(ref instanceof Node) || if (!(ref instanceof HTMLElement) ||
!(ref.parentNode instanceof HTMLElement) || !(ref.parentNode instanceof HTMLElement))
!(ref.parentNode.previousElementSibling instanceof HTMLElement))
throw new ReferenceError throw new ReferenceError
/* Grab parent and header */ /* Grab parent and header */
this.el_ = ref.parentNode this.el_ = ref.parentNode
this.header_ = ref.parentNode.previousElementSibling if (!(this.el_.parentNode instanceof HTMLElement) ||
!(this.el_.parentNode.previousElementSibling instanceof HTMLElement))
throw new ReferenceError
this.header_ = this.el_.parentNode.previousElementSibling
/* Initialize height and state */ /* Initialize height and state */
this.height_ = 0 this.height_ = 0

View File

@ -112,6 +112,9 @@
max-height: 100%; max-height: 100%;
margin: 0 0.4rem; margin: 0 0.4rem;
overflow-y: auto; overflow-y: auto;
// Hack: putting the scroll wrapper on the GPU massively reduces jitter
// when locking the sidebars into place
backface-visibility: hidden;
// [tablet -]: Adjust margins // [tablet -]: Adjust margins
@include break-to-device(tablet) { @include break-to-device(tablet) {