Skip to content

Commit db4e130

Browse files
author
Kevin Ngai
committed
Initial upload from internal GitLab
0 parents  commit db4e130

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+22611
-0
lines changed

.babelrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": [
5+
[
6+
"@babel/preset-env",
7+
{
8+
"targets": {
9+
"node": "current"
10+
}
11+
}
12+
]
13+
]
14+
}
15+
}
16+
}

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.env.sample

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BASE_URL=https://woudc.org
2+
ROUTER_BASE=/woudc-ui/
3+
SERVICES_HOSTNAME=https://geo.woudc.org
4+
CSW_URL=https://geo.woudc.org/csw
5+
OWS_URL=https://geo.woudc.org/ows
6+
WAF_URL=https://woudc.org/archive
7+
DEF_URL=https://geo.woudc.org/def
8+
WPS_URL=https://geo.woudc.org/wps
9+
CODELISTS_URL=https://geo.woudc.org/codelists.xml
10+
EMAIL_ADDRESS=[email protected]

.eslintrc.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true
6+
},
7+
parserOptions: {
8+
parser: 'babel-eslint'
9+
},
10+
extends: [
11+
'@nuxtjs',
12+
'prettier',
13+
'prettier/vue',
14+
'eslint:recommended',
15+
'plugin:vue/recommended',
16+
// 'plugin:prettier/recommended',
17+
'plugin:nuxt/recommended'
18+
],
19+
plugins: [
20+
'vue',
21+
'prettier'
22+
],
23+
// add your custom rules here
24+
rules: {
25+
'indent': ['error', 2],
26+
'semi': ['error', 'never'],
27+
'no-console': ['error', { allow: ['warn', 'error'] }],
28+
'no-alert': 'error',
29+
'arrow-spacing': 'error',
30+
'vue/max-attributes-per-line': 'off'
31+
}
32+
}

.gitignore

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# parcel-bundler cache (https://parceljs.org/)
63+
.cache
64+
65+
# next.js build output
66+
.next
67+
68+
# nuxt.js build output
69+
.nuxt
70+
71+
# Nuxt generate
72+
dist
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless
79+
80+
# IDE / Editor
81+
.idea
82+
83+
# Service worker
84+
sw.*
85+
86+
# Mac OSX
87+
.DS_Store
88+
89+
# Vim swap files
90+
*.swp

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": false,
3+
"arrowParens": "always",
4+
"singleQuote": true
5+
}

README.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# woudc-www
2+
3+
> Next version of WOUDC UI using Nuxt and VueJS.
4+
5+
## Build Setup
6+
7+
- Install NodeJS
8+
9+
- Create a **copy** of the `.env.sample` file and **rename** to `.env`
10+
11+
``` bash
12+
# install dependencies
13+
$ npm install
14+
15+
# serve with hot reload at localhost:3000
16+
$ npm run dev
17+
18+
# build for production and launch server
19+
$ npm run build
20+
$ npm run start
21+
22+
# generate static project: https://nuxtjs.org/guide#static-generated-pre-rendering-
23+
$ npm run generate
24+
```
25+
26+
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
27+
28+
## Environment variables (.env)
29+
30+
This project includes a `.env.sample` file. **You must rename the file to `.env` and fill in your environment variables so that Nuxt will load it in by default.** If you don't rename or you want to have multiple `.env` files, you must [configure the options of the `dotenv-module`](https://github.com/nuxt-community/dotenv-module#options) module within the `nuxt.config.js` file to match the correct `.env` file accordingly.
31+
32+
## Linting
33+
34+
Linting is incorporated when running `npm run dev` and when you `git commit`.
35+
36+
Your code can be linted by running `npm run lint` to check for validation. You can also run `npm run lintfix` to apply corrections where it can to your code.
37+
38+
## Design
39+
40+
[Vuetify](https://vuetifyjs.com/en/introduction/why-vuetify) was chosen for the styling and theme, which applies the [Material design specification](https://material.io/design/). [UI components](https://vuetifyjs.com/en/components/api-explorer) from Vuetify should be used for any user interactable components. Some of the UI components have `nuxt` support (ie. for routing).
41+
42+
## SEO
43+
44+
SEO is handled by Nuxt in the [`head()` method](https://nuxtjs.org/api/pages-head).
45+
46+
### Microdata
47+
48+
In addition, [Microdata](https://schema.org/docs/gs.html) is incorporated to give further context to individual pages (ie. including html attributes `itemscope`, `itemprop`, `itemtype`). To validate your Microdata, use [Google's structured data testing tool](https://search.google.com/structured-data/testing-tool); using "View page source" of your page, and copying and pasting into the code snippet.
49+
50+
### i18n
51+
52+
Translation of SEO text is handled by `nuxt-i18n`. Please see the [nuxt-i18n SEO guide](https://nuxt-community.github.io/nuxt-i18n/seo.html) on how it works and other configuration.
53+
54+
## Translation (i18n)
55+
56+
The i18n framework is configured with [nuxt-i18n](https://nuxt-community.github.io/nuxt-i18n/) and is integrated with `vue-i18n`.
57+
58+
### Syntax
59+
60+
The translation [syntax formatting is done using vue-i18n](http://kazupon.github.io/vue-i18n/guide/formatting.html), specifically using [Vue single file components](http://kazupon.github.io/vue-i18n/guide/sfc.html#basic-usage).
61+
62+
### Routing
63+
64+
Please see the [nuxt-i18n routing guide](https://nuxt-community.github.io/nuxt-i18n/routing.html).
65+
66+
### Translate
67+
68+
To translate text, use [BabelEdit](https://www.codeandweb.com/babeledit/download) and load the `.babel` file in the root of the project. If there are new `.vue` components, they need to be added in (by file or by folder). If translation needs to be sent to a 3rd party translator, BabelEdit can export the translation to a `CSV` which can be sent off to the translator. Once completed, import the `CSV` in to BabelEdit to apply the completed translations.
69+
70+
## Testing
71+
72+
Unit testing is done using [Jest](https://jestjs.io/docs/en/expect#content) and can be run by the command: `npm run test`.
73+
74+
Please see the guide on [testing single file components with Jest](https://vue-test-utils.vuejs.org/guides/#testing-single-file-components-with-jest).
75+
76+
**Tip:** Don't write unit test for every single case. Instead, the next time you get an error in your development, write a unit test in the `/test` folder to help validate your code.

assets/gaw_acronym_vertical_sm.jpg

14.7 KB
Loading
106 KB
Loading

assets/wmo-logo.gif

4.22 KB
Loading

assets/wmo_acronym_vertical_sm.jpg

23.4 KB
Loading

0 commit comments

Comments
 (0)