├── .editorconfig ├── .gitignore ├── .vscode └── launch.json ├── LICENSE ├── Readme.md ├── app ├── App.svelte ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── chevron_left.png │ │ │ ├── file.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── message_square.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── chevron_left.png │ │ │ ├── file.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── message_square.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── chevron_left.png │ │ │ ├── file.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── message_square.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── chevron_left.png │ │ │ ├── file.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── message_square.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── chevron_left.png │ │ │ ├── file.png │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── message_square.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-1125h.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-736h@3x.png │ │ │ ├── Default-Landscape-X.png │ │ │ ├── Default-Landscape-XR.png │ │ │ ├── Default-Landscape-XS-Max.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Landscape@3x.png │ │ │ ├── Default-Portrait-XR.png │ │ │ ├── Default-Portrait-XS-Max.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ └── Default@2x.png │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen.AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen.Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── build.xcconfig │ │ ├── chevron_left.png │ │ ├── chevron_left@2x.png │ │ ├── chevron_left@3x.png │ │ ├── file.png │ │ ├── file@2x.png │ │ ├── file@3x.png │ │ ├── message_square.png │ │ ├── message_square@2x.png │ │ └── message_square@3x.png ├── Article.svelte ├── Summary.svelte ├── app.css ├── app.ts ├── package.json └── svelte-components.d.ts ├── assets └── icons │ ├── chevron_left.svg │ ├── file.svg │ └── message_square.svg ├── build-assets.js ├── nativescript-svelte-hn.gif ├── package-lock.json ├── package.json ├── tsconfig.json ├── tsconfig.tns.json ├── tsfmt.json └── webpack.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | 9 | # Logs 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | 16 | # General 17 | .DS_Store 18 | .AppleDouble 19 | .LSOverride 20 | .idea 21 | .cloud 22 | .project 23 | tmp/ 24 | typings/ 25 | 26 | # Visual Studio Code 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch on iOS", 9 | "type": "nativescript", 10 | "request": "launch", 11 | "platform": "ios", 12 | "appRoot": "${workspaceRoot}", 13 | "sourceMaps": true, 14 | "watch": true 15 | }, 16 | { 17 | "name": "Test on iOS", 18 | "type": "nativescript", 19 | "request": "launch", 20 | "platform": "ios", 21 | "appRoot": "${workspaceRoot}", 22 | "sourceMaps": true, 23 | "watch": false, 24 | "stopOnEntry": true, 25 | "launchTests": true, 26 | "tnsArgs": [ 27 | "--justlaunch" 28 | ] 29 | }, 30 | { 31 | "name": "Attach on iOS", 32 | "type": "nativescript", 33 | "request": "attach", 34 | "platform": "ios", 35 | "appRoot": "${workspaceRoot}", 36 | "sourceMaps": true, 37 | "watch": false 38 | }, 39 | { 40 | "name": "Launch on Android", 41 | "type": "nativescript", 42 | "request": "launch", 43 | "platform": "android", 44 | "appRoot": "${workspaceRoot}", 45 | "sourceMaps": true, 46 | "watch": true, 47 | "tnsArgs": [ 48 | "--bundle", 49 | "--env.sourceMap" 50 | ] 51 | }, 52 | { 53 | "name": "Test on Android", 54 | "type": "nativescript", 55 | "request": "launch", 56 | "platform": "android", 57 | "appRoot": "${workspaceRoot}", 58 | "sourceMaps": true, 59 | "watch": false, 60 | "stopOnEntry": true, 61 | "launchTests": true, 62 | "tnsArgs": [ 63 | "--justlaunch" 64 | ] 65 | }, 66 | { 67 | "name": "Attach on Android", 68 | "type": "nativescript", 69 | "request": "attach", 70 | "platform": "android", 71 | "appRoot": "${workspaceRoot}", 72 | "sourceMaps": true, 73 | "watch": false 74 | } 75 | ] 76 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2019 Progress Software Corporation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | This is a barebones [svelte-native](https://svelte-native.technology) Hacker News reader. 2 | 3 | 4 | ![HackerNews in svelte-native](https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/master/nativescript-svelte-hn.gif) 5 | 6 | 7 | ### Usage 8 | 9 | ```bash 10 | tns run android --bundle 11 | ``` 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/App.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 32 | 33 | -------------------------------------------------------------------------------- /app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | generatedDensities = [] 15 | } 16 | aaptOptions { 17 | additionalParameters "--no-version-vectors" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/file.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-hdpi/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-hdpi/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/file.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-mdpi/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-mdpi/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/file.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xhdpi/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xhdpi/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/file.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxhdpi/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxhdpi/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/file.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/drawable-xxxhdpi/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2688h", 7 | "filename" : "Default-Portrait-XS-Max.png", 8 | "minimum-system-version" : "12.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "2688h", 16 | "filename" : "Default-Landscape-XS-Max.png", 17 | "minimum-system-version" : "12.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "1792h", 25 | "filename" : "Default-Portrait-XR.png", 26 | "minimum-system-version" : "12.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "extent" : "full-screen", 32 | "idiom" : "iphone", 33 | "subtype" : "1792h", 34 | "filename" : "Default-Landscape-XR.png", 35 | "minimum-system-version" : "12.0", 36 | "orientation" : "landscape", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "extent" : "full-screen", 41 | "idiom" : "iphone", 42 | "subtype" : "2436h", 43 | "filename" : "Default-1125h.png", 44 | "minimum-system-version" : "11.0", 45 | "orientation" : "portrait", 46 | "scale" : "3x" 47 | }, 48 | { 49 | "extent" : "full-screen", 50 | "idiom" : "iphone", 51 | "subtype" : "2436h", 52 | "filename" : "Default-Landscape-X.png", 53 | "minimum-system-version" : "11.0", 54 | "orientation" : "landscape", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "extent" : "full-screen", 59 | "idiom" : "iphone", 60 | "subtype" : "736h", 61 | "filename" : "Default-736h@3x.png", 62 | "minimum-system-version" : "8.0", 63 | "orientation" : "portrait", 64 | "scale" : "3x" 65 | }, 66 | { 67 | "extent" : "full-screen", 68 | "idiom" : "iphone", 69 | "subtype" : "736h", 70 | "filename" : "Default-Landscape@3x.png", 71 | "minimum-system-version" : "8.0", 72 | "orientation" : "landscape", 73 | "scale" : "3x" 74 | }, 75 | { 76 | "extent" : "full-screen", 77 | "idiom" : "iphone", 78 | "subtype" : "667h", 79 | "filename" : "Default-667h@2x.png", 80 | "minimum-system-version" : "8.0", 81 | "orientation" : "portrait", 82 | "scale" : "2x" 83 | }, 84 | { 85 | "orientation" : "portrait", 86 | "idiom" : "iphone", 87 | "filename" : "Default@2x.png", 88 | "extent" : "full-screen", 89 | "minimum-system-version" : "7.0", 90 | "scale" : "2x" 91 | }, 92 | { 93 | "extent" : "full-screen", 94 | "idiom" : "iphone", 95 | "subtype" : "retina4", 96 | "filename" : "Default-568h@2x.png", 97 | "minimum-system-version" : "7.0", 98 | "orientation" : "portrait", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "filename" : "Default-Portrait.png", 105 | "extent" : "full-screen", 106 | "minimum-system-version" : "7.0", 107 | "scale" : "1x" 108 | }, 109 | { 110 | "orientation" : "landscape", 111 | "idiom" : "ipad", 112 | "filename" : "Default-Landscape.png", 113 | "extent" : "full-screen", 114 | "minimum-system-version" : "7.0", 115 | "scale" : "1x" 116 | }, 117 | { 118 | "orientation" : "portrait", 119 | "idiom" : "ipad", 120 | "filename" : "Default-Portrait@2x.png", 121 | "extent" : "full-screen", 122 | "minimum-system-version" : "7.0", 123 | "scale" : "2x" 124 | }, 125 | { 126 | "orientation" : "landscape", 127 | "idiom" : "ipad", 128 | "filename" : "Default-Landscape@2x.png", 129 | "extent" : "full-screen", 130 | "minimum-system-version" : "7.0", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "iphone", 136 | "filename" : "Default.png", 137 | "extent" : "full-screen", 138 | "scale" : "1x" 139 | }, 140 | { 141 | "orientation" : "portrait", 142 | "idiom" : "iphone", 143 | "filename" : "Default@2x.png", 144 | "extent" : "full-screen", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "orientation" : "portrait", 149 | "idiom" : "iphone", 150 | "filename" : "Default-568h@2x.png", 151 | "extent" : "full-screen", 152 | "subtype" : "retina4", 153 | "scale" : "2x" 154 | }, 155 | { 156 | "orientation" : "portrait", 157 | "idiom" : "ipad", 158 | "extent" : "to-status-bar", 159 | "scale" : "1x" 160 | }, 161 | { 162 | "orientation" : "portrait", 163 | "idiom" : "ipad", 164 | "filename" : "Default-Portrait.png", 165 | "extent" : "full-screen", 166 | "scale" : "1x" 167 | }, 168 | { 169 | "orientation" : "landscape", 170 | "idiom" : "ipad", 171 | "extent" : "to-status-bar", 172 | "scale" : "1x" 173 | }, 174 | { 175 | "orientation" : "landscape", 176 | "idiom" : "ipad", 177 | "filename" : "Default-Landscape.png", 178 | "extent" : "full-screen", 179 | "scale" : "1x" 180 | }, 181 | { 182 | "orientation" : "portrait", 183 | "idiom" : "ipad", 184 | "extent" : "to-status-bar", 185 | "scale" : "2x" 186 | }, 187 | { 188 | "orientation" : "portrait", 189 | "idiom" : "ipad", 190 | "filename" : "Default-Portrait@2x.png", 191 | "extent" : "full-screen", 192 | "scale" : "2x" 193 | }, 194 | { 195 | "orientation" : "landscape", 196 | "idiom" : "ipad", 197 | "extent" : "to-status-bar", 198 | "scale" : "2x" 199 | }, 200 | { 201 | "orientation" : "landscape", 202 | "idiom" : "ipad", 203 | "filename" : "Default-Landscape@2x.png", 204 | "extent" : "full-screen", 205 | "scale" : "2x" 206 | } 207 | ], 208 | "info" : { 209 | "version" : 1, 210 | "author" : "xcode" 211 | } 212 | } -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen.AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen.Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /app/App_Resources/iOS/chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/chevron_left.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/chevron_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/chevron_left@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/chevron_left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/chevron_left@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/file.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/file@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/file@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/file@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/file@3x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/message_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/message_square.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/message_square@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/message_square@2x.png -------------------------------------------------------------------------------- /app/App_Resources/iOS/message_square@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/app/App_Resources/iOS/message_square@3x.png -------------------------------------------------------------------------------- /app/Article.svelte: -------------------------------------------------------------------------------- 1 | 65 | 66 | 67 | 68 | 69 | {#if isIOS } 70 | 71 | {:else} 72 | 73 | {/if} 74 | 75 | 76 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | {#if showComments} 85 | 86 | 99 | 100 | {:else} 101 | 102 | {/if} 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /app/Summary.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/app.css: -------------------------------------------------------------------------------- 1 |  2 | /* @import '~nativescript-theme-core/css/core.css'; */ 3 | 4 | .btn { 5 | font-size: 18; 6 | } 7 | 8 | .p-10 { 9 | padding: 10; 10 | } -------------------------------------------------------------------------------- /app/app.ts: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.ts file is the entry point to your application. 3 | You can use this file to perform app-level initialization, but the primary 4 | purpose of the file is to pass control to the app’s first module. 5 | */ 6 | 7 | import { svelteNative } from "svelte-native"; 8 | import App from "./App.svelte"; 9 | svelteNative(App, {}); 10 | 11 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "app.js", 3 | "android": { 4 | "v8Flags": "--expose_gc" 5 | } 6 | } -------------------------------------------------------------------------------- /app/svelte-components.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare module "*.svelte" { 3 | export default SvelteComponent; 4 | } -------------------------------------------------------------------------------- /assets/icons/chevron_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 26 | 28 | 29 | 31 | image/svg+xml 32 | 34 | 35 | 36 | 37 | 39 | 59 | 64 | 65 | -------------------------------------------------------------------------------- /assets/icons/file.svg: -------------------------------------------------------------------------------- 1 | 2 | 26 | 28 | 29 | 31 | image/svg+xml 32 | 34 | 35 | 36 | 37 | 38 | 40 | 63 | 70 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /assets/icons/message_square.svg: -------------------------------------------------------------------------------- 1 | 2 | 26 | 28 | 29 | 31 | image/svg+xml 32 | 34 | 35 | 36 | 37 | 39 | 59 | 64 | 65 | -------------------------------------------------------------------------------- /build-assets.js: -------------------------------------------------------------------------------- 1 | let svg2png = require('convert-svg-to-png'); 2 | let fs = require('fs'); 3 | 4 | let icon_sizes = [ 5 | { 6 | size: [24,24], 7 | path: (f) => `./app/App_resources/iOS/${f}.png` 8 | }, 9 | { 10 | size: [48,48], 11 | path: (f) => `./app/App_resources/iOS/${f}@2x.png` 12 | }, 13 | { 14 | size: [72,72], 15 | path: (f) => `./app/App_resources/iOS/${f}@3x.png` 16 | }, 17 | { 18 | size: [32,32], 19 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-mdpi/${f}.png` 20 | }, 21 | { 22 | size: [48,48], 23 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-hdpi/${f}.png` 24 | }, 25 | { 26 | size: [64,64], 27 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xhdpi/${f}.png` 28 | }, 29 | { 30 | size: [96,96], 31 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xxhdpi/${f}.png` 32 | }, 33 | { 34 | size: [128,128], 35 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xxxhdpi/${f}.png` 36 | } 37 | ] 38 | 39 | for (let f of fs.readdirSync('./assets/icons')) { 40 | console.log("found "+f); 41 | if (f.endsWith('.svg')) { 42 | for (let transform of icon_sizes) { 43 | let outFile = transform.path(f.replace(/\.svg$/i, '')); 44 | svg2png.convertFile(`./assets/icons/${f}`, 45 | { 46 | width: transform.size[0], 47 | height: transform.size[1], 48 | outputFilePath: outFile 49 | }) 50 | console.log(`Created ${outFile}`); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /nativescript-svelte-hn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halfnelson/svelte-native-hackernews/2f50ab597a61c36790540e7779eba6b2effb3a2f/nativescript-svelte-hn.gif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "org.nativescript.realworld2", 4 | "tns-ios": { 5 | "version": "6.1.1" 6 | }, 7 | "tns-android": { 8 | "version": "6.1.2" 9 | } 10 | }, 11 | "description": "NativeScript Application", 12 | "license": "SEE LICENSE IN ", 13 | "repository": "", 14 | "dependencies": { 15 | "nativescript-theme-core": "^2.0.23", 16 | "svelte-native": "^0.6.1", 17 | "tns-core-modules": "~6.1.2" 18 | }, 19 | "devDependencies": { 20 | "nativescript-dev-webpack": "1.2.1", 21 | "svelte": "~3.12.1", 22 | "svelte-loader": "github:rixo/svelte-loader#2204a8f7e66e441f5e0ce6e70a5fa0f9e6bb2103", 23 | "svelte-native-preprocessor": "~0.1.4", 24 | "typescript": "3.6.2" 25 | }, 26 | "readme": "NativeScript Application" 27 | } 28 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "skipLibCheck": true, 10 | "lib": [ 11 | "es6", 12 | ], 13 | "types": [ 14 | "./node_modules/svelte/" 15 | ], 16 | "baseUrl": ".", 17 | "paths": { 18 | "~/*": [ 19 | "app/*" 20 | ], 21 | "*": [ 22 | "./node_modules/*" 23 | ] 24 | } 25 | }, 26 | "exclude": [ 27 | "node_modules", 28 | "platforms" 29 | ] 30 | } -------------------------------------------------------------------------------- /tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "esNext", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tsfmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "indentSize": 4, 3 | "tabSize": 4 4 | } 5 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | 3 | const webpack = require("webpack"); 4 | const nsWebpack = require("nativescript-dev-webpack"); 5 | const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); 6 | const CleanWebpackPlugin = require("clean-webpack-plugin"); 7 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 8 | const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); 9 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 10 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 11 | const TerserPlugin = require("terser-webpack-plugin"); 12 | const hashSalt = Date.now().toString(); 13 | const svelteNativePreprocessor = require("svelte-native-preprocessor"); 14 | 15 | module.exports = env => { 16 | // Add your custom Activities, Services and other Android app components here. 17 | const appComponents = [ 18 | "tns-core-modules/ui/frame", 19 | "tns-core-modules/ui/frame/activity", 20 | ]; 21 | 22 | const platform = env && (env.android && "android" || env.ios && "ios"); 23 | if (!platform) { 24 | throw new Error("You need to provide a target platform!"); 25 | } 26 | 27 | const platforms = ["ios", "android"]; 28 | const projectRoot = __dirname; 29 | 30 | // Default destination inside platforms//... 31 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 32 | 33 | const { 34 | // The 'appPath' and 'appResourcesPath' values are fetched from 35 | // the nsconfig.json configuration file. 36 | appPath = "app", 37 | appResourcesPath = "app/App_Resources", 38 | 39 | // You can provide the following flags when running 'tns run android|ios' 40 | snapshot, // --env.snapshot 41 | production, // --env.production 42 | uglify, // --env.uglify 43 | report, // --env.report 44 | sourceMap, // --env.sourceMap 45 | hiddenSourceMap, // --env.hiddenSourceMap 46 | hmr, // --env.hmr, 47 | unitTesting, // --env.unitTesting, 48 | verbose, // --env.verbose 49 | } = env; 50 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 51 | const externals = nsWebpack.getConvertedExternals(env.externals); 52 | 53 | const appFullPath = resolve(projectRoot, appPath); 54 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 55 | 56 | const entryModule = nsWebpack.getEntryModule(appFullPath, platform); 57 | const entryPath = `.${sep}${entryModule}.ts`; 58 | const entries = { bundle: entryPath }; 59 | 60 | const tsConfigPath = resolve(projectRoot, "tsconfig.tns.json"); 61 | 62 | const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1); 63 | if (platform === "ios" && !areCoreModulesExternal) { 64 | entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules"; 65 | }; 66 | 67 | let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); 68 | 69 | const itemsToClean = [`${dist}/**/*`]; 70 | if (platform === "android") { 71 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); 72 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); 73 | } 74 | 75 | nsWebpack.processAppComponents(appComponents, platform); 76 | const config = { 77 | mode: production ? "production" : "development", 78 | context: appFullPath, 79 | externals, 80 | watchOptions: { 81 | ignored: [ 82 | appResourcesFullPath, 83 | // Don't watch hidden files 84 | "**/.*", 85 | ] 86 | }, 87 | target: nativescriptTarget, 88 | entry: entries, 89 | output: { 90 | pathinfo: false, 91 | path: dist, 92 | sourceMapFilename, 93 | libraryTarget: "commonjs2", 94 | filename: "[name].js", 95 | globalObject: "global", 96 | hashSalt 97 | }, 98 | resolve: { 99 | extensions: [".ts", ".mjs", ".js", ".svelte", ".scss", ".css"], 100 | // Resolve {N} system modules from tns-core-modules 101 | modules: [ 102 | resolve(__dirname, "node_modules/tns-core-modules"), 103 | resolve(__dirname, "node_modules"), 104 | "node_modules/tns-core-modules", 105 | "node_modules", 106 | ], 107 | alias: { 108 | '~': appFullPath 109 | }, 110 | // resolve symlinks to symlinked modules 111 | symlinks: true 112 | }, 113 | resolveLoader: { 114 | // don't resolve symlinks to symlinked loaders 115 | symlinks: false 116 | }, 117 | node: { 118 | // Disable node shims that conflict with NativeScript 119 | "http": false, 120 | "timers": false, 121 | "setImmediate": false, 122 | "fs": "empty", 123 | "__dirname": false, 124 | }, 125 | devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), 126 | optimization: { 127 | runtimeChunk: "single", 128 | splitChunks: { 129 | cacheGroups: { 130 | vendor: { 131 | name: "vendor", 132 | chunks: "all", 133 | test: (module, chunks) => { 134 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 135 | return /[\\/]node_modules[\\/]/.test(moduleName) || 136 | appComponents.some(comp => comp === moduleName); 137 | 138 | }, 139 | enforce: true, 140 | }, 141 | } 142 | }, 143 | minimize: !!uglify, 144 | minimizer: [ 145 | new TerserPlugin({ 146 | parallel: true, 147 | cache: true, 148 | sourceMap: isAnySourceMapEnabled, 149 | terserOptions: { 150 | output: { 151 | comments: false, 152 | semicolons: !isAnySourceMapEnabled 153 | }, 154 | compress: { 155 | // The Android SBG has problems parsing the output 156 | // when these options are enabled 157 | 'collapse_vars': platform !== "android", 158 | sequences: platform !== "android", 159 | } 160 | } 161 | }) 162 | ], 163 | }, 164 | module: { 165 | rules: [ 166 | { 167 | include: join(appFullPath, entryPath), 168 | use: [ 169 | // Require all Android app components 170 | platform === "android" && { 171 | loader: "nativescript-dev-webpack/android-app-components-loader", 172 | options: { modules: appComponents } 173 | }, 174 | 175 | { 176 | loader: "nativescript-dev-webpack/bundle-config-loader", 177 | options: { 178 | loadCss: !snapshot, // load the application css if in debug mode 179 | unitTesting, 180 | appFullPath, 181 | projectRoot, 182 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 183 | } 184 | }, 185 | ].filter(loader => !!loader) 186 | }, 187 | 188 | { 189 | test: /\.(ts|css|scss|html|xml)$/, 190 | use: "nativescript-dev-webpack/hmr/hot-loader" 191 | }, 192 | 193 | { test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" }, 194 | 195 | { 196 | test: /\.css$/, 197 | use: { loader: "css-loader", options: { url: false } } 198 | }, 199 | 200 | { 201 | test: /\.scss$/, 202 | use: [ 203 | { loader: "css-loader", options: { url: false } }, 204 | "sass-loader" 205 | ] 206 | }, 207 | 208 | { 209 | test: /\.mjs$/, 210 | type: 'javascript/auto', 211 | }, 212 | { 213 | test: /\.ts$/, 214 | use: { 215 | loader: "ts-loader", 216 | options: { 217 | configFile: tsConfigPath, 218 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 219 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 220 | transpileOnly: true, 221 | allowTsInNodeModules: true, 222 | compilerOptions: { 223 | sourceMap: isAnySourceMapEnabled, 224 | declaration: false 225 | } 226 | }, 227 | } 228 | }, 229 | { 230 | test: /\.svelte$/, 231 | exclude: /node_modules/, 232 | use: [ 233 | { 234 | loader: 'svelte-loader', 235 | options: { 236 | preprocess: svelteNativePreprocessor(), 237 | hotReload: true, 238 | hotOptions: { 239 | native: true 240 | } 241 | } 242 | } 243 | ] 244 | } 245 | ] 246 | }, 247 | plugins: [ 248 | // Define useful constants like TNS_WEBPACK 249 | new webpack.DefinePlugin({ 250 | "global.TNS_WEBPACK": "true", 251 | "process": "global.process", 252 | }), 253 | // Remove all files from the out dir. 254 | new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), 255 | // Copy assets to out dir. Add your own globs as needed. 256 | new CopyWebpackPlugin([ 257 | { from: { glob: "fonts/**" } }, 258 | { from: { glob: "**/*.jpg" } }, 259 | { from: { glob: "**/*.png" } }, 260 | ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), 261 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), 262 | // For instructions on how to set up workers with webpack 263 | // check out https://github.com/nativescript/worker-loader 264 | new NativeScriptWorkerPlugin(), 265 | new nsWebpack.PlatformFSPlugin({ 266 | platform, 267 | platforms, 268 | }), 269 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 270 | new nsWebpack.WatchStateLoggerPlugin(), 271 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds 272 | // https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement 273 | new ForkTsCheckerWebpackPlugin({ 274 | tsconfig: tsConfigPath, 275 | async: false, 276 | useTypescriptIncrementalApi: true, 277 | memoryLimit: 4096 278 | }) 279 | ], 280 | }; 281 | 282 | if (report) { 283 | // Generate report files for bundles content 284 | config.plugins.push(new BundleAnalyzerPlugin({ 285 | analyzerMode: "static", 286 | openAnalyzer: false, 287 | generateStatsFile: true, 288 | reportFilename: resolve(projectRoot, "report", `report.html`), 289 | statsFilename: resolve(projectRoot, "report", `stats.json`), 290 | })); 291 | } 292 | 293 | if (snapshot) { 294 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 295 | chunk: "vendor", 296 | requireModules: [ 297 | "tns-core-modules/bundle-entry-points", 298 | ], 299 | projectRoot, 300 | webpackConfig: config, 301 | })); 302 | } 303 | 304 | if (hmr) { 305 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 306 | } 307 | 308 | 309 | return config; 310 | }; 311 | --------------------------------------------------------------------------------