Skip to content
Snippets Groups Projects
Commit 3f61b651 authored by squidfunk's avatar squidfunk
Browse files

Replaced yarn with npm 5.6

parent dbd0006b
No related branches found
No related tags found
No related merge requests found
...@@ -26,5 +26,5 @@ CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" ...@@ -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 # Perform install and prune of NPM dependencies if package.json changed
if $(echo "$CHANGED" | grep --quiet package.json); then if $(echo "$CHANGED" | grep --quiet package.json); then
echo -e "\x1B[33m!\x1B[0m Updating dependencies" echo -e "\x1B[33m!\x1B[0m Updating dependencies"
yarn install npm install
fi fi
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
# NPM-related # NPM-related
/node_modules /node_modules
/npm-debug.log* /npm-debug.log*
/yarn-error.log
# Files generated by build # Files generated by build
/build /build
......
...@@ -33,19 +33,18 @@ git: ...@@ -33,19 +33,18 @@ git:
# Cache dependencies # Cache dependencies
cache: cache:
pip: true pip: true
yarn: true
directories: directories:
- node_modules - node_modules
# Install dependencies # Install dependencies
install: install:
- yarn install - npm install
- pip install --user -r requirements.txt - pip install --user -r requirements.txt
# Perform build and release # Perform build and release
script: script:
- yarn run lint - npm run lint
- yarn run build - npm run build
# Deploy artifacts # Deploy artifacts
after_success: after_success:
......
...@@ -26,7 +26,7 @@ all: clean lint | build ...@@ -26,7 +26,7 @@ all: clean lint | build
# Install dependencies # Install dependencies
node_modules: node_modules:
yarn install npm install
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Targets # Targets
...@@ -34,7 +34,7 @@ node_modules: ...@@ -34,7 +34,7 @@ node_modules:
# Build theme for distribution with Webpack # Build theme for distribution with Webpack
material: $(shell find src) .babelrc webpack.config.js material: $(shell find src) .babelrc webpack.config.js
$(shell yarn bin)/webpack --env.prod $(shell npm bin)/webpack --env.prod
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Rules # Rules
...@@ -49,12 +49,12 @@ clean: ...@@ -49,12 +49,12 @@ clean:
# Lint source files # Lint source files
lint: node_modules lint: node_modules
$(shell yarn bin)/eslint --max-warnings 0 . $(shell npm bin)/eslint --max-warnings 0 .
$(shell yarn bin)/stylelint `find src/assets -name *.scss` $(shell npm bin)/stylelint `find src/assets -name *.scss`
# Rebuild theme on changes with Webpack # Rebuild theme on changes with Webpack
watch-webpack: node_modules clean watch-webpack: node_modules clean
$(shell yarn bin)/webpack --watch $(shell npm bin)/webpack --watch
# Serve documentation with MkDocs # Serve documentation with MkDocs
watch-mkdocs: clean watch-mkdocs: clean
......
...@@ -183,8 +183,7 @@ the Material theme and recompile it. This is fairly easy. ...@@ -183,8 +183,7 @@ the Material theme and recompile it. This is fairly easy.
### Environment setup ### Environment setup
In order to start development on the Material theme, a [Node.js][8] version of 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 at least 8 is required. First, clone the repository:
better version of `npm`. First, clone the repository:
``` sh ``` sh
git clone https://github.com/squidfunk/mkdocs-material git clone https://github.com/squidfunk/mkdocs-material
...@@ -195,23 +194,22 @@ Next, all dependencies need to be installed, which is done with: ...@@ -195,23 +194,22 @@ Next, all dependencies need to be installed, which is done with:
``` sh ``` sh
cd mkdocs-material cd mkdocs-material
pip install -r requirements.txt pip install -r requirements.txt
yarn install npm install
``` ```
[8]: https://nodejs.org [8]: https://nodejs.org
[9]: https://yarnpkg.com/
### Development mode ### Development mode
The development server can be started with: The development server can be started with:
``` sh ``` sh
yarn run watch npm run watch
``` ```
This will also start the MkDocs development server which will monitor changes This will also start the MkDocs development server which will monitor changes
on assets, templates and documentation. Point your browser to 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 For example, changing the color palette is as simple as changing the
`$md-color-primary` and `$md-color-accent` variables in `$md-color-primary` and `$md-color-accent` variables in
...@@ -228,14 +226,14 @@ $md-color-accent: $clr-teal-a700; ...@@ -228,14 +226,14 @@ $md-color-accent: $clr-teal-a700;
directory are automatically generated from the `src` directory and will be directory are automatically generated from the `src` directory and will be
overriden when the theme is built. overriden when the theme is built.
[10]: http://localhost:8000 [9]: http://localhost:8000
### Build process ### Build process
When you've finished making your changes, you can build the theme by invoking: When you've finished making your changes, you can build the theme by invoking:
``` sh ``` sh
yarn run build npm run build
``` ```
This triggers the production-level compilation and minification of all This triggers the production-level compilation and minification of all
......
This diff is collapsed.
This diff is collapsed.
!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-Za-zA-Z0-90-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-Za-zA-Z0-90-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")}});
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% 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" %} {% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %} {% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %} {% if languages | length and languages[0] != "" %}
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment