diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-12-11 20:50:33 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-12-11 20:50:33 +0530 |
commit | 740ac276a03850ed868cec38bddf5ff6404e4159 (patch) | |
tree | 911887061eb8f8a8d4939c3721d75dd2f1e1ae0f | |
parent | Fix the necessary env vars for building outside of docker (diff) | |
download | ferdium-server-740ac276a03850ed868cec38bddf5ff6404e4159.tar.gz ferdium-server-740ac276a03850ed868cec38bddf5ff6404e4159.tar.zst ferdium-server-740ac276a03850ed868cec38bddf5ff6404e4159.zip |
Backported some configurations from the adonis rewrite
-rw-r--r-- | .editorconfig | 3 | ||||
-rw-r--r-- | .eslintignore | 37 | ||||
-rw-r--r-- | .gitignore | 64 | ||||
-rwxr-xr-x | .husky/pre-commit | 3 | ||||
-rw-r--r-- | .npmrc | 3 | ||||
-rw-r--r-- | .prettierignore | 2 | ||||
-rw-r--r-- | .prettierrc.js | 2 | ||||
-rw-r--r-- | CONTRIBUTING.md | 2 | ||||
-rwxr-xr-x | scripts/build-unix.sh | 10 | ||||
-rw-r--r-- | scripts/build-windows.ps1 | 10 |
10 files changed, 107 insertions, 29 deletions
diff --git a/.editorconfig b/.editorconfig index 4a7ea30..79ef292 100644 --- a/.editorconfig +++ b/.editorconfig | |||
@@ -8,5 +8,8 @@ charset = utf-8 | |||
8 | trim_trailing_whitespace = true | 8 | trim_trailing_whitespace = true |
9 | insert_final_newline = true | 9 | insert_final_newline = true |
10 | 10 | ||
11 | [*.json] | ||
12 | insert_final_newline = ignore | ||
13 | |||
11 | [*.md] | 14 | [*.md] |
12 | trim_trailing_whitespace = false | 15 | trim_trailing_whitespace = false |
diff --git a/.eslintignore b/.eslintignore index 12a665b..79e0599 100644 --- a/.eslintignore +++ b/.eslintignore | |||
@@ -1 +1,36 @@ | |||
1 | recipes/ | 1 | # Logs |
2 | logs | ||
3 | *.log | ||
4 | |||
5 | # Runtime data | ||
6 | pids | ||
7 | *.pid | ||
8 | *.seed | ||
9 | |||
10 | # Coverage directory used by tools like istanbul | ||
11 | coverage | ||
12 | .eslintcache | ||
13 | |||
14 | # Dependency directory | ||
15 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
16 | node_modules | ||
17 | |||
18 | # OSX | ||
19 | .DS_Store | ||
20 | |||
21 | .idea | ||
22 | .pnpm-debug.log* | ||
23 | *.css.d.ts | ||
24 | *.sass.d.ts | ||
25 | *.scss.d.ts | ||
26 | |||
27 | /build/ | ||
28 | /out/ | ||
29 | /recipes/ | ||
30 | |||
31 | # package files | ||
32 | package.json | ||
33 | pnpm-lock.yaml | ||
34 | |||
35 | # Json | ||
36 | *.json | ||
@@ -1,12 +1,12 @@ | |||
1 | # Created by https://www.toptal.com/developers/gitignore/api/vim,node,yarn,react,macos,visualstudiocode,intellij | 1 | # Created by https://www.toptal.com/developers/gitignore/api/vim,node,yarn,macos,intellij,visualstudiocode |
2 | # Edit at https://www.toptal.com/developers/gitignore?templates=vim,node,yarn,react,macos,visualstudiocode,intellij | 2 | # Edit at https://www.toptal.com/developers/gitignore?templates=vim,node,yarn,macos,intellij,visualstudiocode |
3 | 3 | ||
4 | ### Intellij ### | 4 | ### Intellij ### |
5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | 5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider |
6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | 6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 |
7 | 7 | ||
8 | # User-specific stuff | 8 | # User-specific stuff |
9 | /**/workspace.xml | 9 | .idea/**/workspace.xml |
10 | .idea/**/tasks.xml | 10 | .idea/**/tasks.xml |
11 | .idea/**/usage.statistics.xml | 11 | .idea/**/usage.statistics.xml |
12 | .idea/**/dictionaries | 12 | .idea/**/dictionaries |
@@ -65,6 +65,9 @@ atlassian-ide-plugin.xml | |||
65 | # Cursive Clojure plugin | 65 | # Cursive Clojure plugin |
66 | .idea/replstate.xml | 66 | .idea/replstate.xml |
67 | 67 | ||
68 | # SonarLint plugin | ||
69 | .idea/sonarlint/ | ||
70 | |||
68 | # Crashlytics plugin (for Android Studio and IntelliJ) | 71 | # Crashlytics plugin (for Android Studio and IntelliJ) |
69 | com_crashlytics_export_strings.xml | 72 | com_crashlytics_export_strings.xml |
70 | crashlytics.properties | 73 | crashlytics.properties |
@@ -107,6 +110,10 @@ fabric.properties | |||
107 | # https://plugins.jetbrains.com/plugin/12206-codestream | 110 | # https://plugins.jetbrains.com/plugin/12206-codestream |
108 | .idea/codestream.xml | 111 | .idea/codestream.xml |
109 | 112 | ||
113 | # Azure Toolkit for IntelliJ plugin | ||
114 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij | ||
115 | .idea/**/azureSettings.xml | ||
116 | |||
110 | ### macOS ### | 117 | ### macOS ### |
111 | # General | 118 | # General |
112 | .DS_Store | 119 | .DS_Store |
@@ -136,6 +143,10 @@ Network Trash Folder | |||
136 | Temporary Items | 143 | Temporary Items |
137 | .apdisk | 144 | .apdisk |
138 | 145 | ||
146 | ### macOS Patch ### | ||
147 | # iCloud generated files | ||
148 | *.icloud | ||
149 | |||
139 | ### Node ### | 150 | ### Node ### |
140 | # Logs | 151 | # Logs |
141 | logs | 152 | logs |
@@ -143,6 +154,7 @@ logs | |||
143 | npm-debug.log* | 154 | npm-debug.log* |
144 | yarn-debug.log* | 155 | yarn-debug.log* |
145 | yarn-error.log* | 156 | yarn-error.log* |
157 | lerna-debug.log* | ||
146 | .pnpm-debug.log* | 158 | .pnpm-debug.log* |
147 | 159 | ||
148 | # Diagnostic reports (https://nodejs.org/api/report.html) | 160 | # Diagnostic reports (https://nodejs.org/api/report.html) |
@@ -192,6 +204,9 @@ web_modules/ | |||
192 | # Optional eslint cache | 204 | # Optional eslint cache |
193 | .eslintcache | 205 | .eslintcache |
194 | 206 | ||
207 | # Optional stylelint cache | ||
208 | .stylelintcache | ||
209 | |||
195 | # Microbundle cache | 210 | # Microbundle cache |
196 | .rpt2_cache/ | 211 | .rpt2_cache/ |
197 | .rts2_cache_cjs/ | 212 | .rts2_cache_cjs/ |
@@ -207,10 +222,12 @@ web_modules/ | |||
207 | # Yarn Integrity file | 222 | # Yarn Integrity file |
208 | .yarn-integrity | 223 | .yarn-integrity |
209 | 224 | ||
210 | # dotenv environment variables file | 225 | # dotenv environment variable files |
211 | .env | 226 | .env |
212 | .env.test | 227 | .env.development.local |
213 | .env.production | 228 | .env.test.local |
229 | .env.production.local | ||
230 | .env.local | ||
214 | 231 | ||
215 | # parcel-bundler cache (https://parceljs.org/) | 232 | # parcel-bundler cache (https://parceljs.org/) |
216 | .cache | 233 | .cache |
@@ -233,6 +250,12 @@ dist | |||
233 | # vuepress build output | 250 | # vuepress build output |
234 | .vuepress/dist | 251 | .vuepress/dist |
235 | 252 | ||
253 | # vuepress v2.x temp and cache directory | ||
254 | .temp | ||
255 | |||
256 | # Docusaurus cache and generated files | ||
257 | .docusaurus | ||
258 | |||
236 | # Serverless directories | 259 | # Serverless directories |
237 | .serverless/ | 260 | .serverless/ |
238 | 261 | ||
@@ -255,18 +278,14 @@ dist | |||
255 | .yarn/install-state.gz | 278 | .yarn/install-state.gz |
256 | .pnp.* | 279 | .pnp.* |
257 | 280 | ||
258 | ### react ### | 281 | ### Node Patch ### |
259 | .DS_* | 282 | # Serverless Webpack directories |
260 | **/*.backup.* | 283 | .webpack/ |
261 | **/*.back.* | ||
262 | |||
263 | node_modules | ||
264 | 284 | ||
265 | *.sublime* | 285 | # Optional stylelint cache |
266 | 286 | ||
267 | psd | 287 | # SvelteKit build / generate output |
268 | thumb | 288 | .svelte-kit |
269 | sketch | ||
270 | 289 | ||
271 | ### Vim ### | 290 | ### Vim ### |
272 | # Swap | 291 | # Swap |
@@ -295,21 +314,25 @@ tags | |||
295 | !.vscode/tasks.json | 314 | !.vscode/tasks.json |
296 | !.vscode/launch.json | 315 | !.vscode/launch.json |
297 | !.vscode/extensions.json | 316 | !.vscode/extensions.json |
298 | *.code-workspace | 317 | !.vscode/*.code-snippets |
299 | 318 | ||
300 | # Local History for Visual Studio Code | 319 | # Local History for Visual Studio Code |
301 | .history/ | 320 | .history/ |
302 | 321 | ||
322 | # Built Visual Studio Code Extensions | ||
323 | *.vsix | ||
324 | |||
303 | ### VisualStudioCode Patch ### | 325 | ### VisualStudioCode Patch ### |
304 | # Ignore all local history of files | 326 | # Ignore all local history of files |
305 | .history | 327 | .history |
306 | .ionide | 328 | .ionide |
307 | 329 | ||
308 | ### yarn ### | 330 | ### yarn ### |
309 | # https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored | 331 | # https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored |
310 | 332 | ||
311 | .yarn/* | 333 | .yarn/* |
312 | !.yarn/releases | 334 | !.yarn/releases |
335 | !.yarn/patches | ||
313 | !.yarn/plugins | 336 | !.yarn/plugins |
314 | !.yarn/sdks | 337 | !.yarn/sdks |
315 | !.yarn/versions | 338 | !.yarn/versions |
@@ -321,7 +344,7 @@ tags | |||
321 | # and uncomment the following lines | 344 | # and uncomment the following lines |
322 | # .pnp.* | 345 | # .pnp.* |
323 | 346 | ||
324 | # End of https://www.toptal.com/developers/gitignore/api/vim,node,yarn,react,macos,visualstudiocode,intellij | 347 | # End of https://www.toptal.com/developers/gitignore/api/vim,node,yarn,macos,intellij,visualstudiocode |
325 | 348 | ||
326 | 349 | ||
327 | # Adonis directory for storing tmp files | 350 | # Adonis directory for storing tmp files |
@@ -336,5 +359,8 @@ tmp | |||
336 | # Uploaded recipes | 359 | # Uploaded recipes |
337 | recipes/ | 360 | recipes/ |
338 | 361 | ||
362 | # sentry properties | ||
363 | sentry.properties | ||
364 | |||
339 | resources/announcements/*.json | 365 | resources/announcements/*.json |
340 | !resources/announcements/version.json | 366 | !resources/announcements/version.json |
diff --git a/.husky/pre-commit b/.husky/pre-commit index 1a92cb3..5bdf80f 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit | |||
@@ -5,5 +5,6 @@ FILE_NAME="$(dirname "$0")/_/husky.sh" | |||
5 | # Conditionally invoke so as to avoid running npm commands if this is a clean checkout (ie before installing npm modules) | 5 | # Conditionally invoke so as to avoid running npm commands if this is a clean checkout (ie before installing npm modules) |
6 | if [ -f $FILE_NAME ]; then | 6 | if [ -f $FILE_NAME ]; then |
7 | . $FILE_NAME | 7 | . $FILE_NAME |
8 | npm run lint | 8 | pnpm prepare-code |
9 | pnpm lint | ||
9 | fi | 10 | fi |
@@ -1,2 +1,5 @@ | |||
1 | save-exact = true | 1 | save-exact = true |
2 | engine-strict = true | 2 | engine-strict = true |
3 | unsafe-perm = true | ||
4 | legacy-peer-deps = true | ||
5 | frozen-lockfile = false | ||
diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bb3cd4c --- /dev/null +++ b/.prettierignore | |||
@@ -0,0 +1,2 @@ | |||
1 | build | ||
2 | recipes | ||
diff --git a/.prettierrc.js b/.prettierrc.js index 6a0a094..443f0c6 100644 --- a/.prettierrc.js +++ b/.prettierrc.js | |||
@@ -2,4 +2,4 @@ module.exports = { | |||
2 | singleQuote: true, | 2 | singleQuote: true, |
3 | arrowParens: 'avoid', | 3 | arrowParens: 'avoid', |
4 | trailingComma: 'all', | 4 | trailingComma: 'all', |
5 | }; | 5 | } |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d815919..18856bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
@@ -141,4 +141,4 @@ pnpm start --dev | |||
141 | 141 | ||
142 | #### Javascript Coding style-checker | 142 | #### Javascript Coding style-checker |
143 | 143 | ||
144 | - Please use `es-lint` and the defined rules to maintain a consistent style | 144 | - Please use `lint` and `lint:fix` and the defined rules to maintain a consistent style |
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh index 28d0e7c..a7cb003 100755 --- a/scripts/build-unix.sh +++ b/scripts/build-unix.sh | |||
@@ -104,16 +104,20 @@ mkdir -p data | |||
104 | # ----------------------------------------------------------------------------- | 104 | # ----------------------------------------------------------------------------- |
105 | printf "\n*************** Building recipes ***************\n" | 105 | printf "\n*************** Building recipes ***************\n" |
106 | pushd recipes | 106 | pushd recipes |
107 | pnpm i | 107 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
108 | pnpm package | ||
109 | popd | 108 | popd |
110 | 109 | ||
110 | # ----------------------------------------------------------------------------- | ||
111 | # Now the meat..... | 111 | # Now the meat..... |
112 | pnpm i | 112 | pnpm i |
113 | node ace migration:refresh | 113 | pnpm prepare-code |
114 | pnpm lint | ||
115 | # TODO: Uncomment after fixing tests | ||
116 | # pnpm test | ||
114 | 117 | ||
115 | # ----------------------------------------------------------------------------- | 118 | # ----------------------------------------------------------------------------- |
116 | printf "\n*************** Building app ***************\n" | 119 | printf "\n*************** Building app ***************\n" |
120 | node ace migration:refresh | ||
117 | pnpm start --dev | 121 | pnpm start --dev |
118 | 122 | ||
119 | printf "\n*************** App successfully stopped! ***************\n" | 123 | printf "\n*************** App successfully stopped! ***************\n" |
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index 5af7392..7a5004e 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 | |||
@@ -154,16 +154,20 @@ if (-not (Test-Path -Path "data")) { | |||
154 | # ----------------------------------------------------------------------------- | 154 | # ----------------------------------------------------------------------------- |
155 | Write-Host "*************** Building recipes ***************" | 155 | Write-Host "*************** Building recipes ***************" |
156 | Push-Location recipes | 156 | Push-Location recipes |
157 | pnpm i | 157 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
158 | pnpm package | ||
159 | Pop-Location | 158 | Pop-Location |
160 | 159 | ||
160 | # ----------------------------------------------------------------------------- | ||
161 | # Now the meat..... | 161 | # Now the meat..... |
162 | & pnpm i | 162 | & pnpm i |
163 | & node ace migration:refresh | 163 | & pnpm prepare-code |
164 | & pnpm lint | ||
165 | # TODO: Uncomment after fixing tests | ||
166 | # & pnpm test | ||
164 | 167 | ||
165 | # ----------------------------------------------------------------------------- | 168 | # ----------------------------------------------------------------------------- |
166 | Write-Host "*************** Starting app ***************" | 169 | Write-Host "*************** Starting app ***************" |
170 | & node ace migration:refresh | ||
167 | & pnpm start --dev | 171 | & pnpm start --dev |
168 | 172 | ||
169 | Write-Host "*************** App successfully stopped! ***************" | 173 | Write-Host "*************** App successfully stopped! ***************" |