3.1.0 • Published 3 years ago

@averjs/shared-utils v3.1.0

Weekly downloads
54
License
MIT
Repository
github
Last release
3 years ago

Be aware that this package is currently tailored to our own needs and lacks flexibility. We are currently working on that in our spare time. It is used in several production websites and if you feel like using it, go ahead.

aver.js

This plugin has everything you need to start a new Vue project which is capable of server side rendering.

Installation

The @averjs/core holds the core with express and all the other stuff which is necessary for server side rendering. And than there is @averjs/renderer for all the webpack stuff. The 2 packages are seperated so you are able to have the rendering stuff in the devDependencies and therefore it is not getting installed in production.

To install both, execute the following commands inside a new and empty directory.

yarn add @averjs/core
yarn add --dev @averjs/renderer

npm install @averjs/core
npm install -D @averjs/renderer

Setup

To get you started as fast as possible with a new project, there is a executable, which lets you set this up with ease.

Jump into your working directory and execute tohe follwing command.

node_modules/.bin/aver --init

When the executable is done setting up the new Project, you can start the app by executing yarn run dev or npm run dev.

Folder structure

There are 2 main root folders, api and src. All your Vue.js code belongs inside the src and all the server side code belongs in the api folder. When you setup the project by running the aver --init command, you will see how the api and src folders should be strucuted. If you stick to the same structure, you are able to use the provided modules aliases which are listed in the folder structure below.

api folder

api
└───database (@database)
│   └───seeds
└───errors (@errors)
└───mail (@mail)
│   └───templates
└───middlewares (@middlewares)
└───models (@models)
└───queues (@queues)
└───routes (@routes)

src folder

src (@)
└───components (@components)
└───mixins (@mixins)
└───pages (@pages)
└───vuex (@vuex)
└───resources (@resources)

Vuex

TODO

Vue router

Server Routes

TODO

Middlewares

TODO

Configuration

By creating a aver-config.js file inside your root directory, you can configure Aver.js or provide plugins. You can find all parameters listed below.

Core Paramters

ParameterTypeDefaultDescription
progressbarBoolean|ObjectfalseThe vue-progressbar is used to prive a progressbar on page loading or switching. For configuration options see here

Webpack Paramters

ParameterTypeDefaultDescription

Plugins

This is a list of all the plugins currently available:

PluginLinkDescription
@averjs/rendererhttps://www.npmjs.com/package/@averjs/rendererThis package holds everything you need to render your server and client code.
@averjs/mailerhttps://www.npmjs.com/package/@averjs/mailerThis package holds nodemailer and email-templates for your mailing purposes.
@averjs/mongodbhttps://www.npmjs.com/package/@averjs/mongodbTODO
@averjs/queuehttps://www.npmjs.com/package/@averjs/queueTODO
@averjs/sessionhttps://www.npmjs.com/package/@averjs/sessionTODO
@averjs/vuex-decoratorshttps://www.npmjs.com/package/@averjs/vuex-decoratorsTODO
@averjs/websockethttps://www.npmjs.com/package/@averjs/websocketTODO

TODO

  • Add documentation
  • Add jest
  • Add tests
  • Add modern mode
  • Add more css preprocessors
  • Use joi in config package (https://github.com/hapijs/joi)
  • Add eslint
  • Use lodash/template to pass configuration to vue app
3.0.0

3 years ago

3.1.0

3 years ago

3.0.0-7

4 years ago

3.0.0-6

4 years ago

3.0.0-5

4 years ago

3.0.0-3

4 years ago

3.0.0-4

4 years ago

3.0.0-2

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.6.3

4 years ago

2.6.2

4 years ago

3.0.0-1

4 years ago

3.0.0-0

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.4.7

4 years ago

2.4.6

4 years ago

2.4.5

4 years ago

2.4.3

4 years ago

2.4.4

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.4.2

4 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.0

4 years ago

2.3.1

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-18

5 years ago

2.0.0-17

5 years ago

2.0.0-16

5 years ago

2.0.0-15

5 years ago

2.0.0-14

5 years ago

2.0.0-13

5 years ago

2.0.0-12

5 years ago

2.0.0-11

5 years ago

2.0.0-10

5 years ago

2.0.0-9

5 years ago

2.0.0-8

5 years ago

2.0.0-7

5 years ago

2.0.0-6

5 years ago

2.0.0-5

5 years ago

2.0.0-4

5 years ago

2.0.0-3

5 years ago

2.0.0-2

5 years ago

2.0.0-1

5 years ago

2.0.0-0

5 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.4.0

6 years ago