1.0.0 • Published 6 years ago

via-websites v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

VIA Websites

Setup

Node version used: 9.5.0

npm i

npm run publish

Creating a component

gulp new will create a new component.

Developing

npm start

Triggers a build of the templates, vueify, sass, and finally a basic webserver. Adds watchers too, so file changes will be reflected on the viewed site.

Publisher

// IGNORE THIS SECTION FOR NOW

Entrypoint: node run publish

The publisher will amalgamate date from directus to buld a static handlebars-rendered site (templates defined in publisher/layouts), that will be put into /dist - TBD. At this point the Vue renderer should take over - Lawrence to handle

Folder Structure Explained

.
├── Dockerfile
├── README.md
├── base // used for generating new components
│   └── vue-component
│       ├── [name].scss
│       └── [name].vue
├── dist // where the site will be built
├── example.env // example env variables
├── gulp // gulp tasks
│   ├── lib
│   │   └── replace-name.js
│   └── tasks
│       ├── build.scss.js
│       ├── build.vue.js
│       ├── new.vue.js
│       ├── publish.js
│       ├── publisher // publisher-specific code
│       │   ├── builder.js
│       │   └── cms.js
│       └── run.server.js
├── gulpfile.babel.js
├── index.js
├── karma.conf.js
├── package-lock.json
├── package.json
├── src
│   ├── components // individiual vue components
│   │   └── component-name
│   │       ├── component-name.scss
│   │       └── component-name.vue
│   ├── styles // global styles
│   │   ├── colours
│   │   │   └── _colours.scss
│   │   ├── fonts
│   │   │   ├── _font-families.scss
│   │   │   └── _typography.scss
│   │   ├── overrides
│   │   │   └── _overrides.scss
│   │   ├── imports.scss // splits out functions/vars etc for components
│   │   └── via.scss
│   └── templates
│       └── template-name
│           ├── template-name.html
│           └── template-name.js
├── test
│   └── unit
│       └── component-name.spec.js
├── via-demo-kube-app.yaml
└── via-demo-kube-route.yaml

Deploying the generated site to a dev static host

This is done via a Jenkins Job which can be accessed here:

https://devops.tribalddb.co.uk/jenkins/job/VIA%20Dev%201/

You'll need to login as via with a password known to the dev team.

This uses the file Jenkinsfile found in this folder and several other configuration file in the deploy folder