From 64df71d1251a031583be6ee003d39b0715bc3364 Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 16 Sep 2019 14:05:24 +0200 Subject: [PATCH] first steps to reduce npm package size & deliver generated docs - updated .gitignore - created .npmignore - created new scripts for docs and publish prepare in package.json --- .gitignore | 1 + .npmignore | 2 ++ package.json | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index fd43abfa..9bb584b9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ bower_components/ // Docs Gemfile.lock docs/_site +docs_html/ .jekyll-cache/ .jekyll-metadata diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..c394963d --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +/docs/ +/plugins/ diff --git a/package.json b/package.json index 951fb673..8bb7a568 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,14 @@ "css-minify": "cleancss --level 1 --source-map --source-map-inline-sources --output dist/css/adminlte.min.css dist/css/adminlte.css", "compile": "npm-run-all --parallel js css", "dev": "npm-run-all --parallel watch sync", + "docs-serve": "cd docs/ && bundle exec jekyll serve", + "docs-compile": "cd docs/ && bundle exec jekyll build -d ../docs_html", + "docs-clean": "cd docs/ && bundle exec jekyll clean -d ../docs_html", "js": "npm-run-all --sequential js-compile js-minify", "js-compile": "rollup --config build/config/rollup.config.js --sourcemap", "js-minify": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js", "production": "npm-run-all --sequential compile plugins", + "prepare": "npm-run-all --sequential compile plugins docs-clean docs-compile", "plugins": "node build/npm/Publish.js -v", "sync": "browser-sync start --server --files *.html pages/ dist/", "watch": "npm-run-all --parallel watch-css watch-js", -- GitLab