Replaced yarn with npm 5.6

This commit is contained in:
squidfunk 2018-02-21 21:06:11 +01:00
parent dbd0006b01
commit 3f61b651a6
12 changed files with 13810 additions and 7297 deletions

View File

@ -26,5 +26,5 @@ CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
# Perform install and prune of NPM dependencies if package.json changed
if $(echo "$CHANGED" | grep --quiet package.json); then
echo -e "\x1B[33m!\x1B[0m Updating dependencies"
yarn install
npm install
fi

1
.gitignore vendored
View File

@ -24,7 +24,6 @@
# NPM-related
/node_modules
/npm-debug.log*
/yarn-error.log
# Files generated by build
/build

View File

@ -33,19 +33,18 @@ git:
# Cache dependencies
cache:
pip: true
yarn: true
directories:
- node_modules
# Install dependencies
install:
- yarn install
- npm install
- pip install --user -r requirements.txt
# Perform build and release
script:
- yarn run lint
- yarn run build
- npm run lint
- npm run build
# Deploy artifacts
after_success:

View File

@ -26,7 +26,7 @@ all: clean lint | build
# Install dependencies
node_modules:
yarn install
npm install
# -----------------------------------------------------------------------------
# Targets
@ -34,7 +34,7 @@ node_modules:
# Build theme for distribution with Webpack
material: $(shell find src) .babelrc webpack.config.js
$(shell yarn bin)/webpack --env.prod
$(shell npm bin)/webpack --env.prod
# -----------------------------------------------------------------------------
# Rules
@ -49,12 +49,12 @@ clean:
# Lint source files
lint: node_modules
$(shell yarn bin)/eslint --max-warnings 0 .
$(shell yarn bin)/stylelint `find src/assets -name *.scss`
$(shell npm bin)/eslint --max-warnings 0 .
$(shell npm bin)/stylelint `find src/assets -name *.scss`
# Rebuild theme on changes with Webpack
watch-webpack: node_modules clean
$(shell yarn bin)/webpack --watch
$(shell npm bin)/webpack --watch
# Serve documentation with MkDocs
watch-mkdocs: clean

View File

@ -183,8 +183,7 @@ the Material theme and recompile it. This is fairly easy.
### Environment setup
In order to start development on the Material theme, a [Node.js][8] version of
at least 8 is required, as well as the package manager [yarn][9] which is a
better version of `npm`. First, clone the repository:
at least 8 is required. First, clone the repository:
``` sh
git clone https://github.com/squidfunk/mkdocs-material
@ -195,23 +194,22 @@ Next, all dependencies need to be installed, which is done with:
``` sh
cd mkdocs-material
pip install -r requirements.txt
yarn install
npm install
```
[8]: https://nodejs.org
[9]: https://yarnpkg.com/
### Development mode
The development server can be started with:
``` sh
yarn run watch
npm run watch
```
This will also start the MkDocs development server which will monitor changes
on assets, templates and documentation. Point your browser to
[localhost:8000][10] and you should see this documentation in front of you.
[localhost:8000][9] and you should see this documentation in front of you.
For example, changing the color palette is as simple as changing the
`$md-color-primary` and `$md-color-accent` variables in
@ -228,14 +226,14 @@ $md-color-accent: $clr-teal-a700;
directory are automatically generated from the `src` directory and will be
overriden when the theme is built.
[10]: http://localhost:8000
[9]: http://localhost:8000
### Build process
When you've finished making your changes, you can build the theme by invoking:
``` sh
yarn run build
npm run build
```
This triggers the production-level compilation and minification of all

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z--0-9-",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||null==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z--0-9-",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});

File diff suppressed because one or more lines are too long

View File

@ -172,7 +172,7 @@
{% endblock %}
</div>
{% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application.a46cbbdf.js"></script>
<script src="{{ base_url }}/assets/javascripts/application.5e40439f.js"></script>
{% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}

13791
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

7274
yarn.lock

File diff suppressed because it is too large Load Diff