Skip to content

Commit

Permalink
Client initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
spjy committed Oct 24, 2018
1 parent 85147db commit c5fae5c
Show file tree
Hide file tree
Showing 48 changed files with 7,795 additions and 0 deletions.
28 changes: 28 additions & 0 deletions client/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"presets": [
[
"@babel/preset-env", {
"modules": false,
"loose": false,
"useBuiltIns": "usage"
}
],
[
"@babel/preset-stage-2", {
"modules": false,
"loose": false,
"useBuiltIns": true,
"decoratorsLegacy": true
}
]
],
"plugins": [
[
"@babel/transform-runtime", {
"polyfill": false,
"regenerator": false
}
]
],
"comments": false
}
9 changes: 9 additions & 0 deletions client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
38 changes: 38 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: ['plugin:vue/essential', 'airbnb-base'],
// required to lint *.vue files
plugins: [
'vue'
],
globals: {
'ga': true, // Google Analytics
'cordova': true,
'__statics': true
},
// add your custom rules here
'rules': {
'no-param-reassign': 0,

'import/first': 0,
'import/named': 2,
'import/namespace': 2,
'import/default': 2,
'import/export': 2,
'import/extensions': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,

// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
20 changes: 20 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.quasar
.DS_Store
.thumbs.db
node_modules
/dist
/src-cordova/node_modules
/src-cordova/platforms
/src-cordova/plugins
/src-cordova/www
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
8 changes: 8 additions & 0 deletions client/.postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
plugins: [
// to edit target browsers: use "browserslist" field in package.json
require('autoprefixer')
]
}
35 changes: 35 additions & 0 deletions client/.stylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"blocks": "never",
"brackets": "never",
"colons": "never",
"colors": "always",
"commaSpace": "always",
"commentSpace": "always",
"cssLiteral": "never",
"depthLimit": false,
"duplicates": true,
"efficient": "always",
"extendPref": false,
"globalDupe": true,
"indentPref": 2,
"leadingZero": "never",
"maxErrors": false,
"maxWarnings": false,
"mixed": false,
"namingConvention": false,
"namingConventionStrict": false,
"none": "never",
"noImportant": false,
"parenSpace": "never",
"placeholder": false,
"prefixVarsWithDollar": "always",
"quotePref": "single",
"semicolons": "never",
"sortOrder": false,
"stackedProperties": "never",
"trailingWhitespace": "never",
"universal": "never",
"valid": true,
"zeroUnits": "never",
"zIndexNormalize": false
}
24 changes: 24 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ohia.ai client

# Requirements

1. [Node.js](https://nodejs.org/en/)

# Recommended

1. [yarn](https://yarnpkg.com/en/docs/install#windows-stable)
2. [Quasar CLI](https://quasar-framework.org/guide/quasar-cli.html)

For yarn, if you have Node/npm installed, type `npm i -g yarn`

For the Quasar CLI, type `npm i -g quasar-cli` or `yarn global add quasar--cli`

# Installation

1. Navigate to `/client` folder
2. Type `npm i` or `yarn install`

# Running

1. Navigate to `/client` folder
2. To run, `quasar dev`
39 changes: 39 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "client",
"version": "1.0.0",
"description": "An open Hawaiian indigenous plant identification and aggregation application.",
"productName": "ohia.ai",
"cordovaId": "org.cordova.quasar.app",
"author": "",
"private": true,
"scripts": {
"lint": "eslint --ext .js,.vue src",
"test": "echo \"No test specified\" && exit 0"
},
"dependencies": {
"axios": "^0.18.0",
"vue-cordova": "^0.1.2",
"vue-i18n": "^7.3.3"
},
"devDependencies": {
"babel-eslint": "^8.2.1",
"eslint": "^4.18.2",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-vue": "^4.3.0",
"quasar-cli": "^0.17.0",
"strip-ansi": "=3.0.1"
},
"engines": {
"node": ">= 8.9.0",
"npm": ">= 5.6.0",
"yarn": ">= 1.6.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
]
}
142 changes: 142 additions & 0 deletions client/quasar.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// Configuration for your app

module.exports = function (ctx) {
return {
// app plugins (/src/plugins)
plugins: [
'i18n',
'axios'
],
css: [
'app.styl'
],
extras: [
ctx.theme.mat ? 'roboto-font' : null,
'material-icons' // optional, you are not bound to it
// 'ionicons',
// 'mdi',
// 'fontawesome'
],
supportIE: false,
build: {
scopeHoisting: true,
// vueRouterMode: 'history',
// vueCompiler: true,
// gzip: true,
// analyze: true,
// extractCSS: false,
extendWebpack (cfg) {
cfg.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /node_modules/
})
}
},
devServer: {
// https: true,
// port: 8080,
open: true // opens browser window automatically
},
// framework: 'all' --- includes everything; for dev only!
framework: {
components: [
'QLayout',
'QLayoutHeader',
'QLayoutDrawer',
'QPageContainer',
'QPage',
'QToolbar',
'QToolbarTitle',
'QBtn',
'QIcon',
'QList',
'QListHeader',
'QItem',
'QItemMain',
'QItemSide'
],
directives: [
'Ripple'
],
// Quasar plugins
plugins: [
'Notify'
]
// iconSet: ctx.theme.mat ? 'material-icons' : 'ionicons'
// i18n: 'de' // Quasar language
},
// animations: 'all' --- includes all animations
animations: [],
ssr: {
pwa: false
},
pwa: {
// workboxPluginMode: 'InjectManifest',
// workboxOptions: {},
manifest: {
// name: 'Quasar App',
// short_name: 'Quasar-PWA',
// description: 'Best PWA App in town!',
display: 'standalone',
orientation: 'portrait',
background_color: '#ffffff',
theme_color: '#027be3',
icons: [
{
'src': 'statics/icons/icon-128x128.png',
'sizes': '128x128',
'type': 'image/png'
},
{
'src': 'statics/icons/icon-192x192.png',
'sizes': '192x192',
'type': 'image/png'
},
{
'src': 'statics/icons/icon-256x256.png',
'sizes': '256x256',
'type': 'image/png'
},
{
'src': 'statics/icons/icon-384x384.png',
'sizes': '384x384',
'type': 'image/png'
},
{
'src': 'statics/icons/icon-512x512.png',
'sizes': '512x512',
'type': 'image/png'
}
]
}
},
cordova: {
// id: 'org.cordova.quasar.app'
},
electron: {
// bundler: 'builder', // or 'packager'
extendWebpack (cfg) {
// do something with Electron process Webpack cfg
},
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options

// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',

// Window only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration

// appId: 'quasar-app'
}
}
}
}
14 changes: 14 additions & 0 deletions client/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<div id="q-app">
<router-view />
</div>
</template>

<script>
export default {
name: 'App',
};
</script>

<style>
</style>
Loading

0 comments on commit c5fae5c

Please sign in to comment.