From d104f2759d12dd33d18b1c194e421526b6557ff6 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 10 Jul 2023 12:04:50 +0000 Subject: [PATCH] Add prettier Pinned at ^2.8.8 due to version of npm in 22.04 (3.0.0+ doesn't work) --- .gitignore | 3 ++- .prettierignore | 6 ++++++ .prettierrc.json | 1 + INSTALL | 4 ++++ package-lock.json | 35 +++++++++++++++++++++++++++++++++++ package.json | 5 +++++ 6 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index bdaa9de5..4590c9a0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,10 @@ composer.phar html/ad* html/analytics* import/ +node_modules/ php/config.php php/secrets.php vendor/* *.pyc .idea -.DS_Store \ No newline at end of file +.DS_Store diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..0fdeeea0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +# Ignore artifacts: +build +coverage +vendor +*.html +*.min.js diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/INSTALL b/INSTALL index 6bf35363..4cce9c3c 100644 --- a/INSTALL +++ b/INSTALL @@ -37,6 +37,10 @@ sudo certbot --nginx -d [YOUR_DOMAIN] curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer sudo -u openflights php /usr/local/bin/composer install +# Set up npm packages if you're going to be developing OpenFlights +sudo apt-get install npm +sudo -u openflights npm install + # Generates locales for language support cd openflights find locale -name *utf8 -printf '%f ' | xargs sudo locale-gen diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..43fc365b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,35 @@ +{ + "name": "openflights", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "prettier": "^2.8.8" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } + }, + "dependencies": { + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..300440fc --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "prettier": "^2.8.8" + } +}