From 45ab4602c08a2bd4a786c55147893df8f406e94b Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Wed, 14 Feb 2018 18:41:49 +0000 Subject: [PATCH] add schema check --- lib/config/webpack.style.js | 2 +- lib/package.json | 8 ++++---- scripts/npm-check-bundles.sh | 12 ++++++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/config/webpack.style.js b/lib/config/webpack.style.js index 359d2d4b25..4d1327fc02 100644 --- a/lib/config/webpack.style.js +++ b/lib/config/webpack.style.js @@ -1,6 +1,6 @@ const ExtractTextPlugin = require("extract-text-webpack-plugin"); -const extractScss = new ExtractTextPlugin('./core/dist/prebuilt-themes/[name].css'); +const extractScss = new ExtractTextPlugin('./dist/core/prebuilt-themes/[name].css'); module.exports = { diff --git a/lib/package.json b/lib/package.json index a1690df307..c0e5d161b6 100644 --- a/lib/package.json +++ b/lib/package.json @@ -21,9 +21,9 @@ "markdownlint": "markdownlint ../docs", "doc": "npm run toc && npm run markdownlint && npm run webpack -- --config config/webpack.doc.js --progress --profile --bail", "docindex": "node config/DocProcessor/docProcessor.js ../docs", - "copy-i18n": "mkdir -p core/dist/bundles/assets/adf-core/i18n && cp -R core/i18n/* core/dist/bundles/assets/adf-core/i18n && mkdir -p content-services/dist/bundles/assets/adf-content-services/i18n && cp -R content-services/i18n/* content-services/dist/bundles/assets/adf-content-services/i18n && mkdir -p process-services/dist/bundles/assets/adf-process-services/i18n && cp -R process-services/i18n/* process-services/dist/bundles/assets/adf-process-services/i18n && mkdir -p insights/dist/bundles/assets/adf-insights/i18n && cp -R insights/i18n/* insights/dist/bundles/assets/adf-insights/i18n", - "copy-assets": "cp -R core/assets/* core/dist/bundles/assets && cp -R content-services/assets/* content-services/dist/bundles/assets && cp -R process-services/assets/* process-services/dist/bundles/assets", - "copy-app-schema": "cp core/app-config/schema.json core/dist/app.config.schema.json", + "copy-i18n": "mkdir -p /dist/core/bundles/assets/adf-core/i18n && cp -R core/i18n/* /dist/core/bundles/assets/adf-core/i18n && mkdir -p dist/bundles/content-services/assets/adf-content-services/i18n && cp -R content-services/i18n/* dist/content-services/bundles/assets/adf-content-services/i18n && mkdir -p dist/bundles/process-services/assets/adf-process-services/i18n && cp -R process-services/i18n/* dist/process-services/bundles/assets/adf-process-services/i18n && mkdir -p dist/insights/bundles/assets/adf-insights/i18n && cp -R insights/i18n/* dist/insights/bundles/assets/adf-insights/i18n", + "copy-assets": "cp -R /assets/* dist/core/bundles/assets && cp -R content-services/assets/* dist/content-services/bundles/assets && cp -R process-services/assets/* dist/process-services/bundles/assets", + "copy-app-schema": "cp /app-config/schema.json dist/core/app.config.schema.json", "new-build": "npm run build-bundles && npm run build-style-new && npm run copy-i18n && npm run copy-assets && npm run copy-app-schema", "build-bundles": "npm run build-core && npm run link-core && npm run build-content && npm run link-content && npm run build-process && npm run build-insights", "link-core": "mkdir -p ./node_modules/@alfresco/adf-core/ && cp -R ./dist/core/* ./node_modules/@alfresco/adf-core/", @@ -32,7 +32,7 @@ "build-content": "ng-packagr -p ./content-services/package.json", "build-process": "ng-packagr -p ./process-services/package.json", "build-insights": "ng-packagr -p ./insights/package.json", - "build-export-check" : "tsc ./config/exportCheck.ts", + "build-export-check": "tsc ./config/exportCheck.ts", "export-check": "node ./config/exportCheck.js ./core/public-api.ts ./process-services/public-api.ts ./content-services/public-api.ts ./insights/public-api.ts", "test-export": "npm run build-export-check && npm run export-check", "webpack": "node node_modules/webpack/bin/webpack.js" diff --git a/scripts/npm-check-bundles.sh b/scripts/npm-check-bundles.sh index e9d6e9a7a2..c558452241 100755 --- a/scripts/npm-check-bundles.sh +++ b/scripts/npm-check-bundles.sh @@ -60,12 +60,20 @@ do if [ $PACKAGE == 'adf-core' ]; then - if [ ! -f package/prebuilt-themes/'adf-blue-orange.css' ]; then + if [ ! -f package/prebuilt-themes/'adf-blue-orange.css' ]; then error_out '31;1' "$PACKAGE prebuilt-theme not found!" >&2 exit 1 else echo "prebuilt-theme ok!" - fi + fi + + if [ ! -f package/app-config/'schema.json' ]; then + error_out '31;1' "$PACKAGE schema not found!" >&2 + exit 1 + else + echo "schema ok!" + fi + fi if [ ! -f package/bundles/$PACKAGE'.umd.js' ]; then