Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #6 from Lyduz/feature/new-project-structure
Browse files Browse the repository at this point in the history
Feature/new project structure
  • Loading branch information
kabaluyot authored Apr 8, 2020
2 parents c2ae1b2 + 35a02d9 commit 0f22dd3
Show file tree
Hide file tree
Showing 55 changed files with 1,511 additions and 421 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
APP_TITLE='Lyduz | Free Stock Trading Platform'
APP_URL=http://localhost:6969
API_URL=https://dev-api.lyduz.com/api
API_URL_BROWSER=https://dev-api.lyduz.com/api
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
hooks
platforms
35 changes: 35 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaFeatures": {
"legacyDecorators": true
}
},
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/vue",
"plugin:vue/base"
],
"rules": {
"prettier/prettier": "error",
"semi": 0,
"space-before-function-paren": ["error", "never"],
"no-unused-vars": "off", // disable default
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/ban-ts-ignore": "off"
}
}
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# JetBrains project files
.idea

# VS Code
.vscode

# NPM
node_modules

# NativeScript application
hooks
platforms

# Root Variables
.env
**/.DS_Store
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"arrowParens": "always",
"singleQuote": true,
"endOfLine": "auto"
}

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion app/App_Resources/iOS/build.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
// 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
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
Binary file removed app/assets/images/NativeScript-Vue.png
Binary file not shown.
25 changes: 0 additions & 25 deletions app/components/Selection/Title.vue

This file was deleted.

25 changes: 13 additions & 12 deletions app/main.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import Vue from "nativescript-vue";
import VueDevtools from "nativescript-vue-devtools";
import Navigator from "nativescript-vue-navigator";
import Vue from 'nativescript-vue'
// FIXME: run vue dev tools and enable
//import VueDevtools from 'nativescript-vue-devtools'
import Navigator from 'nativescript-vue-navigator'

import { routes } from "./router";
import store from "./store";
import routes from './router'
import store from './store'

import App from "./App.vue";
import "./styles.scss";
import App from './App.vue'
import './styles.scss'

Vue.use(Navigator, { routes });
Vue.use(Navigator, { routes })

if (TNS_ENV !== "production") {
if (TNS_ENV !== 'production') {
//Vue.use(VueDevtools);
}

// Prints Vue logs when --env.production is *NOT* set while building
Vue.config.silent = TNS_ENV === "production";
Vue.config.silent = TNS_ENV === 'production'

new Vue({
store,
render: h => h(App)
}).$start();
render: (h) => h(App),
}).$start()
8 changes: 8 additions & 0 deletions app/modules/auth/store/actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ActionTree } from 'vuex'
import { State } from './state'

export const Actions: ActionTree<typeof State, any> = {
setTitle(context, payload: string) {
context.commit('SET_TITLE', payload)
},
}
8 changes: 8 additions & 0 deletions app/modules/auth/store/getters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { GetterTree } from 'vuex'
import { State } from './state'

export const Getters: GetterTree<typeof State, any> = {
getTitle(State): string {
return State.title
},
}
12 changes: 12 additions & 0 deletions app/modules/auth/store/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { State } from './state'
import { Getters } from './getters'
import { Mutations } from './mutations'
import { Actions } from './actions'

export default {
namespaced: true,
state: State,
getters: Getters,
mutations: Mutations,
actions: Actions,
}
8 changes: 8 additions & 0 deletions app/modules/auth/store/mutations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { MutationTree } from 'vuex'
import { State } from './state'

export const Mutations: MutationTree<typeof State> = {
SET_TITLE(State, data: string) {
State.title = data
},
}
7 changes: 7 additions & 0 deletions app/modules/auth/store/state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
interface StateInterface {
title: string
}

export const State: StateInterface = {
title: '',
}
10 changes: 10 additions & 0 deletions app/modules/chart/routes/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Chart } from '@/modules/chart/views'

export const ChartRoutes: object = {
'/chart': {
component: Chart,
meta: {
title: 'chart',
},
},
}
8 changes: 8 additions & 0 deletions app/modules/chart/store/actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ActionTree } from 'vuex'
import { State } from './state'

export const Actions: ActionTree<typeof State, any> = {
setTitle(context, payload: string) {
context.commit('SET_TITLE', payload)
},
}
8 changes: 8 additions & 0 deletions app/modules/chart/store/getters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { GetterTree } from 'vuex'
import { State } from './state'

export const Getters: GetterTree<typeof State, any> = {
getTitle(State): string {
return State.title
},
}
Loading

0 comments on commit 0f22dd3

Please sign in to comment.