@ofidj/generator-fidj 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +93 -58
  2. package/bin/create-fidj.cjs +54 -0
  3. package/generators/app/index.js +58 -189
  4. package/generators/app/templates/typescript/README.md +73 -0
  5. package/generators/app/templates/typescript/app.config.json +10 -0
  6. package/generators/app/templates/typescript/gitignore +5 -0
  7. package/generators/app/templates/typescript/package.json +25 -0
  8. package/generators/app/templates/typescript/public/fidj-logo.png +0 -0
  9. package/generators/app/templates/typescript/public/index.html +16 -0
  10. package/generators/app/templates/typescript/scripts/build.mjs +46 -0
  11. package/generators/app/templates/typescript/scripts/privacy-check.mjs +21 -0
  12. package/generators/app/templates/typescript/scripts/render-content.mjs +14 -0
  13. package/generators/app/templates/typescript/server/data-store.ts +123 -0
  14. package/generators/app/templates/typescript/server/index.ts +329 -0
  15. package/generators/app/templates/typescript/server/privacy-adapter.ts +21 -0
  16. package/generators/app/templates/typescript/src/content.ts +416 -0
  17. package/generators/app/templates/typescript/src/main.ts +243 -0
  18. package/generators/app/templates/typescript/src/style.css +639 -0
  19. package/generators/app/templates/typescript/test/server.test.mjs +287 -0
  20. package/generators/app/templates/typescript/tsconfig.json +15 -0
  21. package/lib/app-module.cjs +59 -0
  22. package/lib/scaffold.cjs +145 -0
  23. package/package.json +18 -12
  24. package/generators/app/templates/app2018/.travis.yml +0 -35
  25. package/generators/app/templates/app2018/LICENSE +0 -21
  26. package/generators/app/templates/app2018/Procfile +0 -1
  27. package/generators/app/templates/app2018/README.md +0 -49
  28. package/generators/app/templates/app2018/config.xml +0 -91
  29. package/generators/app/templates/app2018/gulpfile.js +0 -63
  30. package/generators/app/templates/app2018/ionic.config.json +0 -9
  31. package/generators/app/templates/app2018/package.json +0 -90
  32. package/generators/app/templates/app2018/platforms/README.md +0 -1
  33. package/generators/app/templates/app2018/resources/README.md +0 -6
  34. package/generators/app/templates/app2018/resources/icon.png +0 -0
  35. package/generators/app/templates/app2018/resources/marketing-01-ipad.png +0 -0
  36. package/generators/app/templates/app2018/resources/marketing-01-iphone.png +0 -0
  37. package/generators/app/templates/app2018/resources/marketing-02-ipad.png +0 -0
  38. package/generators/app/templates/app2018/resources/marketing-02-iphone.png +0 -0
  39. package/generators/app/templates/app2018/resources/marketing-03-ipad.png +0 -0
  40. package/generators/app/templates/app2018/resources/marketing-03-iphone.png +0 -0
  41. package/generators/app/templates/app2018/resources/marketing.json +0 -19
  42. package/generators/app/templates/app2018/resources/splash.png +0 -0
  43. package/generators/app/templates/app2018/src/app/app.component.ts +0 -88
  44. package/generators/app/templates/app2018/src/app/app.html +0 -19
  45. package/generators/app/templates/app2018/src/app/app.module.ts +0 -40
  46. package/generators/app/templates/app2018/src/app/app.scss +0 -16
  47. package/generators/app/templates/app2018/src/app/main.ts +0 -5
  48. package/generators/app/templates/app2018/src/app/shared/card.model.ts +0 -10
  49. package/generators/app/templates/app2018/src/app/shared/profile.service.ts +0 -46
  50. package/generators/app/templates/app2018/src/app/shared/shared.module.ts +0 -35
  51. package/generators/app/templates/app2018/src/app/shared/storage.service.ts +0 -11
  52. package/generators/app/templates/app2018/src/app/shared/version.const.ts +0 -5
  53. package/generators/app/templates/app2018/src/assets/icon/favicon.ico +0 -0
  54. package/generators/app/templates/app2018/src/assets/imgs/gg.png +0 -0
  55. package/generators/app/templates/app2018/src/assets/imgs/github.png +0 -0
  56. package/generators/app/templates/app2018/src/assets/imgs/login.svg +0 -5668
  57. package/generators/app/templates/app2018/src/assets/imgs/logo.png +0 -0
  58. package/generators/app/templates/app2018/src/index.html +0 -49
  59. package/generators/app/templates/app2018/src/manifest.json +0 -13
  60. package/generators/app/templates/app2018/src/pages/home/home.html +0 -56
  61. package/generators/app/templates/app2018/src/pages/home/home.scss +0 -3
  62. package/generators/app/templates/app2018/src/pages/home/home.ts +0 -126
  63. package/generators/app/templates/app2018/src/pages/login/login.html +0 -56
  64. package/generators/app/templates/app2018/src/pages/login/login.scss +0 -44
  65. package/generators/app/templates/app2018/src/pages/login/login.ts +0 -59
  66. package/generators/app/templates/app2018/src/pages/profile/profile.html +0 -33
  67. package/generators/app/templates/app2018/src/pages/profile/profile.scss +0 -3
  68. package/generators/app/templates/app2018/src/pages/profile/profile.ts +0 -36
  69. package/generators/app/templates/app2018/src/service-worker.js +0 -31
  70. package/generators/app/templates/app2018/src/theme/variables.scss +0 -88
  71. package/generators/app/templates/app2018/tests/karma.unit-tests.conf.js +0 -84
  72. package/generators/app/templates/app2018/tests/unit/app.test.js +0 -10
  73. package/generators/app/templates/app2018/tsconfig.json +0 -28
  74. package/generators/app/templates/app2018/tslint.json +0 -8
  75. package/generators/app/templates/app2018/web.js +0 -21
  76. package/generators/app/templates/app2021/.travis.yml +0 -32
  77. package/generators/app/templates/app2021/LICENSE +0 -21
  78. package/generators/app/templates/app2021/Procfile +0 -1
  79. package/generators/app/templates/app2021/README.md +0 -45
  80. package/generators/app/templates/app2021/angular.json +0 -188
  81. package/generators/app/templates/app2021/browserslist +0 -12
  82. package/generators/app/templates/app2021/ionic.config.json +0 -9
  83. package/generators/app/templates/app2021/karma.conf.js +0 -31
  84. package/generators/app/templates/app2021/package-lock.json +0 -5
  85. package/generators/app/templates/app2021/package.json +0 -77
  86. package/generators/app/templates/app2021/platforms/README.md +0 -1
  87. package/generators/app/templates/app2021/resources/README.md +0 -6
  88. package/generators/app/templates/app2021/resources/icon.png +0 -0
  89. package/generators/app/templates/app2021/resources/marketing-01-ipad.png +0 -0
  90. package/generators/app/templates/app2021/resources/marketing-01-iphone.png +0 -0
  91. package/generators/app/templates/app2021/resources/marketing-02-ipad.png +0 -0
  92. package/generators/app/templates/app2021/resources/marketing-02-iphone.png +0 -0
  93. package/generators/app/templates/app2021/resources/marketing-03-ipad.png +0 -0
  94. package/generators/app/templates/app2021/resources/marketing-03-iphone.png +0 -0
  95. package/generators/app/templates/app2021/resources/marketing.json +0 -19
  96. package/generators/app/templates/app2021/resources/splash.png +0 -0
  97. package/generators/app/templates/app2021/src/app/app-routing.module.ts +0 -25
  98. package/generators/app/templates/app2021/src/app/app.component.html +0 -3
  99. package/generators/app/templates/app2021/src/app/app.component.scss +0 -0
  100. package/generators/app/templates/app2021/src/app/app.component.spec.ts +0 -50
  101. package/generators/app/templates/app2021/src/app/app.component.ts +0 -28
  102. package/generators/app/templates/app2021/src/app/app.module.ts +0 -24
  103. package/generators/app/templates/app2021/src/app/content/content-routing.module.ts +0 -16
  104. package/generators/app/templates/app2021/src/app/content/content.module.ts +0 -20
  105. package/generators/app/templates/app2021/src/app/content/content.page.html +0 -31
  106. package/generators/app/templates/app2021/src/app/content/content.page.scss +0 -0
  107. package/generators/app/templates/app2021/src/app/content/content.page.ts +0 -26
  108. package/generators/app/templates/app2021/src/app/explore-container/explore-container.component.html +0 -4
  109. package/generators/app/templates/app2021/src/app/explore-container/explore-container.component.scss +0 -4
  110. package/generators/app/templates/app2021/src/app/explore-container/explore-container.component.spec.ts +0 -24
  111. package/generators/app/templates/app2021/src/app/explore-container/explore-container.component.ts +0 -16
  112. package/generators/app/templates/app2021/src/app/explore-container/explore-container.module.ts +0 -14
  113. package/generators/app/templates/app2021/src/app/my/my-routing.module.ts +0 -36
  114. package/generators/app/templates/app2021/src/app/my/my.module.ts +0 -19
  115. package/generators/app/templates/app2021/src/app/my/my.page.html +0 -15
  116. package/generators/app/templates/app2021/src/app/my/my.page.scss +0 -1
  117. package/generators/app/templates/app2021/src/app/my/my.page.spec.ts +0 -26
  118. package/generators/app/templates/app2021/src/app/my/my.page.ts +0 -25
  119. package/generators/app/templates/app2021/src/app/profile/profile-routing.module.ts +0 -16
  120. package/generators/app/templates/app2021/src/app/profile/profile.module.ts +0 -20
  121. package/generators/app/templates/app2021/src/app/profile/profile.page.html +0 -49
  122. package/generators/app/templates/app2021/src/app/profile/profile.page.scss +0 -0
  123. package/generators/app/templates/app2021/src/app/profile/profile.page.spec.ts +0 -25
  124. package/generators/app/templates/app2021/src/app/profile/profile.page.ts +0 -44
  125. package/generators/app/templates/app2021/src/app/shared/const.ts +0 -3
  126. package/generators/app/templates/app2021/src/app/signin/signin-routing.module.ts +0 -16
  127. package/generators/app/templates/app2021/src/app/signin/signin.module.ts +0 -18
  128. package/generators/app/templates/app2021/src/app/signin/signin.page.html +0 -53
  129. package/generators/app/templates/app2021/src/app/signin/signin.page.scss +0 -36
  130. package/generators/app/templates/app2021/src/app/signin/signin.page.ts +0 -69
  131. package/generators/app/templates/app2021/src/assets/icon/favicon.png +0 -0
  132. package/generators/app/templates/app2021/src/assets/shapes.svg +0 -1
  133. package/generators/app/templates/app2021/src/environments/environment.prod.ts +0 -3
  134. package/generators/app/templates/app2021/src/environments/environment.ts +0 -16
  135. package/generators/app/templates/app2021/src/global.scss +0 -26
  136. package/generators/app/templates/app2021/src/index.html +0 -26
  137. package/generators/app/templates/app2021/src/main.ts +0 -12
  138. package/generators/app/templates/app2021/src/polyfills.ts +0 -67
  139. package/generators/app/templates/app2021/src/test.ts +0 -20
  140. package/generators/app/templates/app2021/src/theme/variables.scss +0 -232
  141. package/generators/app/templates/app2021/src/zone-flags.ts +0 -5
  142. package/generators/app/templates/app2021/tests/protractor.conf.js +0 -36
  143. package/generators/app/templates/app2021/tests/src/app.e2e-spec.ts +0 -14
  144. package/generators/app/templates/app2021/tests/src/app.po.ts +0 -11
  145. package/generators/app/templates/app2021/tests/tsconfig.json +0 -13
  146. package/generators/app/templates/app2021/tsconfig.app.json +0 -18
  147. package/generators/app/templates/app2021/tsconfig.json +0 -23
  148. package/generators/app/templates/app2021/tsconfig.spec.json +0 -18
  149. package/generators/app/templates/app2021/tslint.json +0 -149
  150. package/generators/app/templates/app2021/web.js +0 -21
@@ -1,91 +0,0 @@
1
- <?xml version='1.0' encoding='utf-8'?>
2
- <widget id="<%= appPackage %>" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
- <name><%= appName %></name>
4
- <description><%= appDescription %></description>
5
- <author email="fidj.ovh team" href="https://fidj.ovh/_/<%= appName %>">fidj.ovh team</author>
6
- <content src="index.html" />
7
- <access origin="*" />
8
- <allow-intent href="http://*/*" />
9
- <allow-intent href="https://*/*" />
10
- <allow-intent href="tel:*" />
11
- <allow-intent href="sms:*" />
12
- <allow-intent href="mailto:*" />
13
- <allow-intent href="geo:*" />
14
- <preference name="ScrollEnabled" value="false" />
15
- <preference name="android-minSdkVersion" value="16" />
16
- <preference name="BackupWebStorage" value="none" />
17
- <preference name="SplashMaintainAspectRatio" value="true" />
18
- <preference name="FadeSplashScreenDuration" value="300" />
19
- <preference name="SplashShowOnlyFirstTime" value="false" />
20
- <preference name="SplashScreen" value="screen" />
21
- <preference name="SplashScreenDelay" value="3000" />
22
- <platform name="android">
23
- <preference name="android-minSdkVersion" value="16" />
24
- <preference name="android-targetSdkVersion" value="26" />
25
-
26
- <allow-intent href="market:*" />
27
- <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
28
- <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
29
- <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
30
- <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
31
- <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
32
- <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
33
- <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
34
- <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
35
- <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
36
- <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
37
- <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
38
- <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
39
- <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
40
- <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
41
- <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
42
- <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
43
- <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
44
- <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
45
- </platform>
46
- <platform name="ios">
47
- <allow-intent href="itms:*" />
48
- <allow-intent href="itms-apps:*" />
49
- <icon height="57" src="resources/ios/icon/icon.png" width="57" />
50
- <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
51
- <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
52
- <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
53
- <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
54
- <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
55
- <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
56
- <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
57
- <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
58
- <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
59
- <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
60
- <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
61
- <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
62
- <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
63
- <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
64
- <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
65
- <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
66
- <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
67
- <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
68
- <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
69
- <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
70
- <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
71
- <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
72
- <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
73
- <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
74
- <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
75
- <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
76
- <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
77
- <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
78
- <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
79
- <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
80
- <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
81
- </platform>
82
- <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
83
- <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
84
- <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
85
- <plugin name="cordova-plugin-device" spec="2.0.2" />
86
- <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
87
- <plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
88
- <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
89
- <engine name="android" spec="7.1.0" />
90
- <engine name="ios" spec="4.5.4" />
91
- </widget>
@@ -1,63 +0,0 @@
1
- const gulp = require('gulp');
2
- const replace = require('gulp-replace');
3
- const cheerio = require('gulp-cheerio');
4
-
5
- const paths = {
6
- config: ['./package.json']
7
- };
8
-
9
- function configTask() {
10
- return gulp.src(['config.xml'])
11
- .pipe(cheerio({
12
- run: function ($) {
13
- // get the version number from package.json
14
- $('widget').attr('version', require('./package').version);
15
- $('widget').attr('id', require('./package').id);
16
- $('name').text(require('./package').name);
17
- $('description').text(require('./package').description);
18
- $('author').text(require('./package').author);
19
- $('author').attr('email', require('./package').author);
20
- $('author').attr('href', require('./package').homepage);
21
-
22
- // in development launch the app with a different html file
23
- //$('content').attr('src', process.env.NODE_ENV == 'development' ? 'debug.html' : 'index.html');
24
-
25
- },
26
- parserOptions: {
27
- xmlMode: true
28
- }
29
- }))
30
- .pipe(gulp.dest('.'));
31
- }
32
-
33
- function configSrcTask() {
34
- const version = "const version = '" + require('./package').version + "';";
35
- return gulp.src(['src/app/shared/version.const.ts'])
36
- // See http://mdn.io/string.replace#Specifying_a_string_as_a_parameter
37
- .pipe(replace(/const version = '(.*)';/g, version))
38
- .pipe(gulp.dest('src/app/shared/'));
39
- }
40
-
41
- const fidjId = process.env.FIDJ_ID;
42
- const fidjProd = process.env.FIDJ_PROD || 'true';
43
- gulp.task('config:www', function () {
44
-
45
- if (fidjId && fidjProd) {
46
- return gulp.src(['www/build/main.js'])
47
- .pipe(replace(/fidjService.init.*/g, "fidjService.init('" + fidjId + "', { prod: " + fidjProd + " })"))
48
- .pipe(gulp.dest('www/build/'));
49
- } else {
50
- return Promise.resolve();
51
- }
52
-
53
- });
54
-
55
- gulp.task('config', configTask);
56
-
57
- gulp.task('config-src', configSrcTask);
58
-
59
- gulp.task('default', gulp.series(configTask, configSrcTask));
60
-
61
- gulp.task('watch', function () {
62
- gulp.watch(paths.config, ['config', 'config-src']);
63
- });
@@ -1,9 +0,0 @@
1
- {
2
- "name": "<%= appName %>",
3
- "type": "fidj",
4
- "integrations": {
5
- "cordova": {},
6
- "gulp": {}
7
- },
8
- "app_id": ""
9
- }
@@ -1,90 +0,0 @@
1
- {
2
- "name": "<%= appName %>",
3
- "version": "<%= appVersion %>",
4
- "id": "<%= appPackage %>",
5
- "description": "<%= appDescription %>",
6
- "author": "<%= appUserName %>",
7
- "homepage": "https://fidj.ovh/_/<%= appName %>",
8
- "main": "www/index.html",
9
- "scripts": {
10
- "test": "./node_modules/.bin/karma start tests/karma.unit-tests.conf.js",
11
- "clean": "ionic-app-scripts clean",
12
- "build:app": "ionic-app-scripts build",
13
- "build:config": "./node_modules/.bin/gulp",
14
- "build:ids": "./node_modules/.bin/gulp config:www",
15
- "build": "npm run build:config && npm run build:app && npm run build:ids",
16
- "lint": "ionic-app-scripts lint",
17
- "serve": "ionic-app-scripts serve",
18
- "resources": "fidj-resources --ios --android --marketing && cp resources/ios/icon/icon-60.png src/assets/icon/favicon.ico",
19
- "ios": "npm run build && npm run resources && ionic cordova platform add ios && ionic cordova build ios"
20
- },
21
- "devDependencies": {
22
- "@ionic/app-scripts": "3.1.6",
23
- "gulp": "^4.0.0",
24
- "gulp-cheerio": "^0.6.3",
25
- "gulp-replace": "^0.6.1",
26
- "gulp-util": "^3.0.8",
27
- "jasmine-ajax": "^3.3.1",
28
- "jasmine-core": "^2.99.1",
29
- "karma": "^3.0.0",
30
- "karma-chrome-launcher": "^2.2.0",
31
- "karma-coverage": "^1.1.0",
32
- "karma-html-reporter": "*",
33
- "karma-jasmine": "^1.1.1",
34
- "karma-jasmine-ajax": "^0.1.13",
35
- "karma-jasmine-html-reporter-livereload": "*",
36
- "shelljs": "^0.8.1",
37
- "typescript": "2.4.2"
38
- },
39
- "dependencies": {
40
- "@angular/animations": "5.0.3",
41
- "@angular/common": "5.0.3",
42
- "@angular/compiler": "5.0.3",
43
- "@angular/compiler-cli": "5.0.3",
44
- "@angular/core": "5.0.3",
45
- "@angular/forms": "5.0.3",
46
- "@angular/http": "5.0.3",
47
- "@angular/platform-browser": "5.0.3",
48
- "@angular/platform-browser-dynamic": "5.0.3",
49
- "@ionic-native/core": "4.4.0",
50
- "@ionic-native/network": "^4.7.0",
51
- "@ionic-native/splash-screen": "4.4.0",
52
- "@ionic-native/status-bar": "4.4.0",
53
- "@ionic/storage": "2.1.3",
54
- "cordova-android": "^7.0.0",
55
- "cordova-ios": "4.5.5",
56
- "cordova-plugin-device": "^1.1.7",
57
- "cordova-plugin-ionic-keyboard": "^2.1.2",
58
- "cordova-plugin-ionic-webview": "^1.2.1",
59
- "cordova-plugin-network-information": "^2.0.1",
60
- "cordova-plugin-splashscreen": "^4.1.0",
61
- "cordova-plugin-sqlite-2": "^1.0.5",
62
- "cordova-plugin-statusbar": "^2.4.2",
63
- "cordova-plugin-whitelist": "^1.3.3",
64
- "fidj": "^2.1.7",
65
- "ionic-angular": "3.9.2",
66
- "ionic-plugin-keyboard": "^2.2.1",
67
- "ionicons": "3.0.0",
68
- "rxjs": "5.5.2",
69
- "save-dev": "^2.0.0",
70
- "sw-toolbox": "3.6.0",
71
- "zone.js": "0.8.18"
72
- },
73
- "cordova": {
74
- "platforms": [
75
- "android",
76
- "ios"
77
- ],
78
- "plugins": {
79
- "ionic-plugin-keyboard": {},
80
- "cordova-plugin-whitelist": {},
81
- "cordova-plugin-device": {},
82
- "cordova-plugin-splashscreen": {},
83
- "cordova-plugin-ionic-webview": {},
84
- "cordova-plugin-sqlite-2": {},
85
- "cordova-plugin-statusbar": {},
86
- "cordova-plugin-network-information": {},
87
- "cordova-plugin-ionic-keyboard": {}
88
- }
89
- }
90
- }
@@ -1 +0,0 @@
1
- devices projects
@@ -1,6 +0,0 @@
1
- Fidj Resources
2
-
3
- ```bash
4
- npm install -g fidj-resources
5
- fidj-resources --ios --android --marketing
6
- ```
@@ -1,19 +0,0 @@
1
- {
2
- "marketing": [
3
- {
4
- "text": "Your stories everywhere",
5
- "landscape": "resources/marketing-01-ipad.png",
6
- "portrait": "resources/marketing-01-iphone.png"
7
- },
8
- {
9
- "text": "Manage your Poker Planning",
10
- "landscape": "resources/marketing-02-ipad.png",
11
- "portrait": "resources/marketing-02-iphone.png"
12
- },
13
- {
14
- "text": "A free account",
15
- "landscape": "resources/marketing-03-ipad.png",
16
- "portrait": "resources/marketing-03-iphone.png"
17
- }
18
- ]
19
- }
@@ -1,88 +0,0 @@
1
- import {Component, OnDestroy, ViewChild} from '@angular/core';
2
- import {Nav, Platform} from 'ionic-angular';
3
- import {StatusBar} from '@ionic-native/status-bar';
4
- import {SplashScreen} from '@ionic-native/splash-screen';
5
- import {Network} from '@ionic-native/network';
6
- import {Subscription} from "rxjs/Subscription";
7
-
8
- import {HomePage} from '../pages/home/home';
9
- import {ProfilePage} from "../pages/profile/profile";
10
- import {FidjService} from "fidj";
11
- import {LoginPage} from "../pages/login/login";
12
- import {Profile} from "./shared/profile.service";
13
-
14
- @Component({
15
- templateUrl: 'app.html'
16
- })
17
- export class MyApp implements OnDestroy {
18
- @ViewChild(Nav) nav: Nav;
19
-
20
- rootPage: any = null;
21
- connected: Subscription;
22
- pages: Array<{ title: string, component: any }>;
23
-
24
- constructor(public platform: Platform,
25
- public statusBar: StatusBar,
26
- public splashScreen: SplashScreen,
27
- private network: Network,
28
- public profile: Profile,
29
- private fidjService: FidjService) {
30
-
31
- // used for an example of ngFor and navigation
32
- this.pages = [
33
- {title: 'Poker', component: HomePage},
34
- {title: 'Player', component: ProfilePage},
35
- ];
36
-
37
- this.initializeApp();
38
- }
39
-
40
- initializeApp() {
41
- this.platform.ready().then(() => {
42
- // Okay, so the platform is ready and our plugins are available.
43
- // Here you can do any higher level native things you might need.
44
- this.statusBar.styleDefault();
45
- this.initFidj();
46
- // this.nav.setRoot(LoginPage);
47
- this.splashScreen.hide();
48
-
49
- this.connected = this.network.onConnect().subscribe(data => {
50
- this.initFidj();
51
- }, error => console.error(error));
52
-
53
- });
54
- }
55
-
56
- ngOnDestroy() {
57
- this.connected.unsubscribe();
58
- }
59
-
60
- initFidj() {
61
-
62
- this.fidjService.init('getYourFidjId')
63
- .then(() => {
64
- this.connected.unsubscribe();
65
- this.profile.readyForSync.next(true);
66
- if (this.fidjService.isLoggedIn()) {
67
- this.nav.setRoot(HomePage);
68
- } else {
69
- this.nav.setRoot(LoginPage);
70
- }
71
- })
72
- .catch((err) => {
73
- alert(JSON.stringify(err));
74
- this.profile.readyForSync.next(false);
75
- if (this.fidjService.isLoggedIn()) {
76
- this.nav.setRoot(HomePage);
77
- } else {
78
- this.nav.setRoot(LoginPage);
79
- }
80
- });
81
- }
82
-
83
- openPage(page) {
84
- // Reset the content nav to have just this page
85
- // we wouldn't want the back button to show in this scenario
86
- this.nav.setRoot(page.component);
87
- }
88
- }
@@ -1,19 +0,0 @@
1
- <ion-menu [content]="content" *ngIf="profile.readyForSync | async">
2
- <ion-header>
3
- <ion-toolbar>
4
- <ion-title>Menu</ion-title>
5
- </ion-toolbar>
6
- </ion-header>
7
-
8
- <ion-content>
9
- <ion-list>
10
- <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
11
- {{p.title}}
12
- </button>
13
- </ion-list>
14
- </ion-content>
15
-
16
- </ion-menu>
17
-
18
- <!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
19
- <ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
@@ -1,40 +0,0 @@
1
- import {ErrorHandler, NgModule} from '@angular/core';
2
- import {IonicApp, IonicErrorHandler, IonicModule, Refresher} from 'ionic-angular';
3
- import {StatusBar} from '@ionic-native/status-bar';
4
- import {Network} from "@ionic-native/network";
5
- import {SplashScreen} from '@ionic-native/splash-screen';
6
-
7
- import {MyApp} from './app.component';
8
- import {HomePage} from '../pages/home/home';
9
- import {SharedModule} from "./shared/shared.module";
10
- import {ProfilePage} from "../pages/profile/profile";
11
- import {LoginPage} from "../pages/login/login";
12
-
13
- @NgModule({
14
- declarations: [
15
- MyApp,
16
- HomePage,
17
- ProfilePage,
18
- LoginPage
19
- ],
20
- imports: [
21
- SharedModule,
22
- IonicModule.forRoot(MyApp)
23
- ],
24
- bootstrap: [IonicApp],
25
- entryComponents: [
26
- MyApp,
27
- HomePage,
28
- ProfilePage,
29
- LoginPage
30
- ],
31
- providers: [
32
- StatusBar,
33
- SplashScreen,
34
- Network,
35
- Refresher,
36
- {provide: ErrorHandler, useClass: IonicErrorHandler}
37
- ]
38
- })
39
- export class AppModule {
40
- }
@@ -1,16 +0,0 @@
1
- // <%= appHomepage %>docs/theming/
2
-
3
-
4
- // App Global Sass
5
- // --------------------------------------------------
6
- // Put style rules here that you want to apply globally. These
7
- // styles are for the entire app and not just one component.
8
- // Additionally, this file can be also used as an entry point
9
- // to import other Sass files to be included in the output CSS.
10
- //
11
- // Shared Sass variables, which can be used to adjust Ionic's
12
- // default Sass variables, belong in "theme/variables.scss".
13
- //
14
- // To declare rules for a specific mode, create a child rule
15
- // for the .md, .ios, or .wp mode classes. The mode class is
16
- // automatically applied to the <body> element in the app.
@@ -1,5 +0,0 @@
1
- import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2
-
3
- import { AppModule } from './app.module';
4
-
5
- platformBrowserDynamic().bootstrapModule(AppModule);
@@ -1,10 +0,0 @@
1
-
2
-
3
- export class Card {
4
- constructor(public value: string,
5
- public comments: Array<string>) {
6
- }
7
-
8
- }
9
-
10
-
@@ -1,46 +0,0 @@
1
- import {Injectable} from "@angular/core";
2
- import {Storage} from "./storage.service";
3
- // import {Observable} from "rxjs/Observable";
4
- import {BehaviorSubject} from 'rxjs/BehaviorSubject';
5
- import {Observable} from "rxjs/Observable";
6
-
7
- @Injectable()
8
- export class Profile {
9
-
10
- private email: string;
11
- private roles : Array<string>;
12
- public readyForSync: BehaviorSubject<boolean>;
13
-
14
- constructor(private _storage: Storage) {
15
- console.log('Profile service');
16
- this.email = this._storage.get('email') || null;
17
- this.readyForSync = new BehaviorSubject<boolean>(false);
18
- this.roles = [];
19
- }
20
-
21
- getEmail() {
22
- return this.email;
23
- }
24
-
25
- setEmail(email: string) {
26
- this.email = email;
27
- this._storage.set('email', this.email);
28
- }
29
-
30
- logout() {
31
- this._storage.remove('email');
32
- }
33
-
34
- isReady() : Observable<boolean> {
35
- return this.readyForSync.asObservable();
36
- }
37
-
38
- getRoles() : Array<string> {
39
- return this.roles;
40
- }
41
-
42
- setRoles(roles : Array<string> ) : void {
43
- this.roles = roles;
44
- }
45
- }
46
-
@@ -1,35 +0,0 @@
1
- import {BrowserModule} from '@angular/platform-browser';
2
- import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
3
- import {CommonModule, NgStyle} from '@angular/common';
4
- import {NgModule} from '@angular/core';
5
- import {IonicModule} from 'ionic-angular';
6
-
7
- import {
8
- FidjModule
9
- } from "fidj";
10
-
11
- import {Profile} from "./profile.service";
12
- import {Storage} from "./storage.service";
13
-
14
- @NgModule({
15
- declarations: [],
16
- imports: [
17
- CommonModule,
18
- IonicModule,
19
- FidjModule,
20
- ],
21
- providers: [
22
- Profile,
23
- Storage
24
- ],
25
- exports: [
26
- CommonModule,
27
- BrowserModule,
28
- BrowserAnimationsModule,
29
- IonicModule,
30
- FidjModule,
31
- NgStyle
32
- ]
33
- })
34
- export class SharedModule {
35
- }
@@ -1,11 +0,0 @@
1
- import {Injectable} from "@angular/core";
2
- import {LocalStorage} from 'fidj';
3
-
4
- @Injectable()
5
- export class Storage extends LocalStorage {
6
-
7
- constructor() {
8
- super(window.localStorage, '<%= appName %>.');
9
- }
10
- }
11
-
@@ -1,5 +0,0 @@
1
-
2
-
3
- export const version = '18.2.30';
4
-
5
-