diff --git a/install.sh b/install.sh index 703448e81..5cbea6b77 100755 --- a/install.sh +++ b/install.sh @@ -1,27 +1,12 @@ #!/bin/bash -# Dans le cas de php 7.2 -#cp -rf propel/vendor/* src/vendor/propel -# - -## the first run you've to install : - -# npm install node-sass -# npm install i18next-extract-gettext -g -# npm install i18next-conv -g -# npm install grunt -g -# npm install --global strip-json-comments-cli - -# cd src/ -# sudo composer i -# cd .. -# sudo cp BuildConfig.json.example BuildConfig.json - -# npm install grunt --save-dev - -# rebuild the nodes-sass base - -## end of first run +if [ ! -f "./BuildConfig.json" ]; then + cp BuildConfig.json.example BuildConfig.json + npm install -g github:phili67/i18next-extract-gettext + npm install i18next-conv -g + npm install --global strip-json-comments-cli + npm install grunt --save-dev +fi npm rebuild node-sass @@ -30,6 +15,9 @@ npm install --unsafe-perm --legacy-peer-deps --save . # to run the installation npm run install + +cp node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nb.min.js + npm run postinstall npm run orm-gen diff --git a/locale/clean-datatables-lang.sh b/locale/clean-datatables-lang.sh index 513741c78..b7a90a243 100755 --- a/locale/clean-datatables-lang.sh +++ b/locale/clean-datatables-lang.sh @@ -5,13 +5,15 @@ #rm src/locale/datatables/*.lang1* cd locale -for d in ../src/locale/datatables/* ; do - res="$d" +if [ -d ../src/locale/datatables ]; then + for d in ../src/locale/datatables/* ; do + res="$d" - echo $res + echo $res - strip-json-comments $res > "${res}1" - - rm $res - mv "${res}1" $res -done + strip-json-comments $res > "${res}1" + + rm $res + mv "${res}1" $res + done +fi diff --git a/locale/extract-db-locale-terms.php b/locale/extract-db-locale-terms.php index b4f98f4d8..aed13c451 100644 --- a/locale/extract-db-locale-terms.php +++ b/locale/extract-db-locale-terms.php @@ -3,17 +3,20 @@ include "connection.php"; /* -// Put +// Put query($query) as $row) { @@ -60,3 +63,5 @@ file_put_contents($stringFile, 'gettext("'.$key."\");\r\n",FILE_APPEND); } file_put_contents($stringFile, "\r\n?>", FILE_APPEND); + +phpenmod -s cli xdebug diff --git a/package.json b/package.json index 78b011257..2a1377a60 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "homepage": "https://www.ecclesiacrm.com", "devDependencies": { - "grunt": "^1.5.3", + "grunt": "^1.6.1", "grunt-confirm": "^1.0.7", "grunt-contrib-clean": "^2.0.1", "grunt-contrib-compress": "^1.6.0", @@ -28,6 +28,7 @@ "grunt-curl": "^2.5.1", "grunt-exec": "^3.0.0", "grunt-lineending": "^1.0.0", + "husky": "^9.0.11", "node-sha1": "^1.0.1" }, "dependencies": { @@ -80,14 +81,15 @@ "jszip": "^3.10.1", "leaflet": "^1.9.2", "morris.js.so": "^0.5.1", - "node-sass": "8.*", + "node-sass": "^8.0.0", "pace-js": "^1.2.3", "package.json": "^2.0.1", "popper.js": "^1.16.1", - "select2": "^4.0.13" + "select2": "^4.0.13", + "strip-json-comments": "^5.0.1" }, "scripts": { - "install": "grunt clean && grunt updateVersions && grunt curl-dir && grunt copy && grunt sass", + "install": "grunt clean && grunt updateVersions && grunt curl-dir && grunt copy && grunt sass && cp node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nb.min.js", "postinstall": "grunt genLocaleJSFiles", "locale-gen": "locale/update-locale.sh", "locale-download": "grunt updateFromPOeditor && grunt genLocaleJSFiles",