Skip to content

Commit

Permalink
Merge pull request #2 from advenjourney/init-vue
Browse files Browse the repository at this point in the history
Init Vue
  • Loading branch information
LukasHirt authored Jan 12, 2021
2 parents bc4ecfa + fab838c commit 40b8379
Show file tree
Hide file tree
Showing 102 changed files with 13,510 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
3 changes: 3 additions & 0 deletions .env.development.android
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=development
VUE_APP_PLATFORM=android
VUE_APP_MODE=native
3 changes: 3 additions & 0 deletions .env.development.ios
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=development
VUE_APP_PLATFORM=ios
VUE_APP_MODE=native
3 changes: 3 additions & 0 deletions .env.development.web
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=development
VUE_APP_PLATFORM=web
VUE_APP_MODE=web
3 changes: 3 additions & 0 deletions .env.production.android
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=production
VUE_APP_PLATFORM=android
VUE_APP_MODE=native
3 changes: 3 additions & 0 deletions .env.production.ios
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=production
VUE_APP_PLATFORM=ios
VUE_APP_MODE=native
3 changes: 3 additions & 0 deletions .env.production.web
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV=production
VUE_APP_PLATFORM=web
VUE_APP_MODE=web
35 changes: 35 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
root: true,

env: {
node: true
},

extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],

parserOptions: {
parser: "babel-eslint"
},

rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
},

overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: {
jest: true
}
}
],

globals: {
TNS_APP_MODE: true,
TNS_APP_PLATFORM: true
}
};
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.DS_Store
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# NativeScript application
hooks
platforms
webpack.config.js
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,35 @@
> Novaturient: To desire and seek change in your life
Discover like-minded people to travel and gain experiences together. This repository contains the WebUI of our platform where you can meet new people to travel with based on common interests.
## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn serve
```

### Compiles and minifies for production
```
yarn build
```

### Run your unit tests
```
yarn test:unit
```

### Run your end-to-end tests
```
yarn test:e2e
```

### Lints and fixes files
```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
plugins: ["@babel/plugin-syntax-dynamic-import"],
presets: [
process.env.VUE_PLATFORM === "web" ? "@vue/app" : {},
["@babel/env", { targets: { esmodules: true } }]
]
};
3 changes: 3 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pluginsFile": "tests/e2e/plugins/index.js"
}
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: "@vue/cli-plugin-unit-jest"
};
5 changes: 5 additions & 0 deletions nsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"appPath": "src",
"appResourcesPath": "src/App_Resources",
"useLegacyWorkflow": false
}
70 changes: 70 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "novaturient",
"scripts": {
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"build:android": "npm run setup-webpack-config && tns build android --env.production && npm run remove-webpack-config",
"build:ios": "npm run setup-webpack-config && tns build ios --env.production && npm run remove-webpack-config",
"build:web": "vue-cli-service build --mode production.web",
"clean:android": "rimraf platforms/android",
"clean:ios": "rimraf platforms/ios",
"clean:platforms": "rimraf platforms",
"debug:android": "npm run setup-webpack-config && tns debug android --env.development",
"debug:ios": "npm run setup-webpack-config && tns debug ios --env.development",
"preview:android": "npm run setup-webpack-config && tns preview --env.development --env.android",
"preview:ios": "npm run setup-webpack-config && tns preview --env.development --env.ios",
"remove-webpack-config": "node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance post",
"serve:android": "npm run setup-webpack-config && tns run android --env.development",
"serve:ios": "npm run setup-webpack-config && tns run ios --env.development",
"serve:web": "vue-cli-service serve --mode development.web",
"setup-webpack-config": "node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance pre"
},
"dependencies": {
"core-js": "^3.6.5",
"nativescript-vue": "^2.5.0-alpha.3",
"nativescript-vue-navigator": "^0.2.0",
"tns-core-modules": "^6.3.2",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/traverse": "^7.5.5",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.0.3",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.6",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"nativescript-dev-webpack": "^1.4.0",
"nativescript-vue-template-compiler": "^2.5.0-alpha.3",
"nativescript-worker-loader": "~0.9.5",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"rimraf": "^2.6.3",
"sass-loader": "^8.0.2",
"string-replace-loader": "^2.2.0",
"vue-cli-plugin-nativescript-vue": "^0.3.1",
"vue-template-compiler": "^2.6.11"
},
"nativescript": {
"id": "org.advenjourney.novaturient",
"tns-android": {
"version": "6.3.1"
},
"tns-ios": {
"version": "6.3.0"
}
}
}
Binary file added public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
54 changes: 54 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<template web>
<div class="w-page">
<nav>
<ul class="w-navbar">
<li class="w-title" :text="navbarTitle">{{ navbarTitle }}</li>
</ul>
</nav>
<div class="w-container">
<router-link tag="button" class="w-button" id="homeButton" to="/"
>Home</router-link
>
<!-- alternate way to route manually and use the same method as native -->
<button class="w-button" id="aboutButton" v-on:click="goToAboutPage">
About
</button>
<router-view />
</div>
</div>
</template>
<template native>
<Page>
<ActionBar :title="navbarTitle" />
<GridLayout rows="auto, auto">
<Button text="Home" @tap="goToHomePage" row="0" />
<Button text="About" @tap="goToAboutPage" row="1" />
</GridLayout>
</Page>
</template>
<script>
const { VUE_APP_MODE } = process.env;
export default {
data() {
return {
navbarTitle: `App.vue`
};
},
methods: {
goToHomePage() {
this.goTo("home");
},
goToAboutPage() {
this.goTo("about");
},
goTo(route) {
VUE_APP_MODE === "web"
? this.$router.push(route)
: this.$navigator.navigate(route);
}
}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
19 changes: 19 additions & 0 deletions src/App_Resources/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="00100" android:versionName="0.1.0">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="__APILEVEL__" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity" />
</application>
</manifest>
11 changes: 11 additions & 0 deletions src/App_Resources/Android/app.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Add your native dependencies here:

android {
defaultConfig {
generatedDensities = []
applicationId = "__PACKAGE__"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-hdpi/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-ldpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-ldpi/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-mdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-mdpi/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/App_Resources/Android/drawable-nodpi/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="fill">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background" />
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/logo" />
</item>
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/App_Resources/Android/drawable-xhdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/App_Resources/Android/values-v21/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ns_accent">#3d5afe</color>
</resources>
5 changes: 5 additions & 0 deletions src/App_Resources/Android/values-v21/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">novaturient</string>
<string name="title_activity_kimera">novaturient</string>
</resources>
23 changes: 23 additions & 0 deletions src/App_Resources/Android/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- Application theme -->
<style name="AppTheme" parent="AppThemeBase">
<item name="android:datePickerStyle">@style/SpinnerDatePicker</item>
<item name="android:timePickerStyle">@style/SpinnerTimePicker</item>
</style>

<!-- Default style for DatePicker - in spinner mode -->
<style name="SpinnerDatePicker" parent="android:Widget.Material.Light.DatePicker">
<item name="android:datePickerMode">spinner</item>
</style>

<!-- Default style for TimePicker - in spinner mode -->
<style name="SpinnerTimePicker" parent="android:Widget.Material.Light.TimePicker">
<item name="android:timePickerMode">spinner</item>
</style>

<style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
<item name="android:elevation">4dp</item>
</style>
</resources>
7 changes: 7 additions & 0 deletions src/App_Resources/Android/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ns_primary">#F5F5F5</color>
<color name="ns_primaryDark">#757575</color>
<color name="ns_accent">#33B5E5</color>
<color name="ns_blue">#272734</color>
</resources>
5 changes: 5 additions & 0 deletions src/App_Resources/Android/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">novaturient</string>
<string name="title_activity_kimera">novaturient</string>
</resources>
Loading

0 comments on commit 40b8379

Please sign in to comment.