1
0
mirror of https://github.com/minio/docs.git synced 2025-07-28 19:42:10 +03:00

add build support for npm

This commit is contained in:
Harshavardhana
2021-02-02 19:49:06 +00:00
parent d4c82ff57c
commit 1b8e574e7f
7 changed files with 6019 additions and 15 deletions

13
.gitignore vendored
View File

@ -1,17 +1,6 @@
# Ignore build directory
build build
# Ignore venv
venv venv
# Ignore vscode
.vscode .vscode
# ignore pycache
__pycache__ __pycache__
# ignore node
node_modules node_modules
npm-debug.log

View File

@ -7,7 +7,7 @@ SPHINXOPTS ?= -n
SPHINXBUILD ?= sphinx-build SPHINXBUILD ?= sphinx-build
SOURCEDIR = source SOURCEDIR = source
BUILDDIR = build BUILDDIR = build
GITDIR = $(shell git branch --show-current) GITDIR = $(shell git rev-parse --abbrev-ref HEAD)
# Put it first so that "make" without argument is like "make help". # Put it first so that "make" without argument is like "make help".
help: help:
@ -24,3 +24,4 @@ dryrun:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile %: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)/$(GITDIR)" $(SPHINXOPTS) $(O)
@npm run build

View File

@ -19,6 +19,12 @@ source venv/bin/activate
pip3 install -r requirements.txt pip3 install -r requirements.txt
``` ```
```shell
nvm install v14.5.0
nvm use v14.5.0
npm install
```
To make the build, do: To make the build, do:
```shell ```shell

View File

@ -64,4 +64,4 @@ gulp.task('watch', function () {
}); });
// Build // Build
gulp.task('default', gulp.series('handleStyle', 'handleJs', 'watch')); gulp.task('default', gulp.series('handleStyle', 'handleJs'));

6007
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
"description": "Official MinIO documentation", "description": "Official MinIO documentation",
"main": "index.rst", "main": "index.rst",
"scripts": { "scripts": {
"build": "gulp",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"repository": { "repository": {

View File

@ -16,7 +16,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
// Render navigation menu // Render navigation menu
if($('#nav')[0]) { if($('#nav')[0]) {
var navData = '/_static/data/nav.json'; var navData = '_static/data/nav.json'; // Keep this link relative
var nav = $('.nav'); var nav = $('.nav');
$.getJSON( navData, function(data) { $.getJSON( navData, function(data) {