0.6.15 • Published 5 years ago

milnode v0.6.15

Weekly downloads
421
License
MIT
Repository
github
Last release
5 years ago

Build Status Release Status

MilNode package project

MilNode is a vue.js plugin based on vue-router, vuex, vuetify. MilNode provides a ready-to-use template for your vue.js applications, with the following features:

  • Localization/Globalization
  • Light/Dark theme selection
  • User authentication
  • API data retrievement
  • Privacy and Cookies management (RGPD)
  • HTML meta management (pages title) for SEO
  • Lots of ready-to-use vue-js components, such as complete dialogs, table buttons, items lists...

MilNode works well with an ASP.NET Core API application, using MilNet packages. See MilNet documentation to know how to use MilNet template, with the following main features:

  • APIs for About, Contact, Feedback, Help pages
  • Error handling
  • Open API documentation
  • User authentication

Contribute

If you want to propose a feature or to report a bug, please create a new issue. If you want to propose code source changes, please follow the steps below.

  1. Installation process From your local computer, clone the repository.

    • npm install to install all dependencies
    • npm build-bundle to build MilNode as a bundle
  2. GitFlow Please follow the GitHub Flow:

    • Create a branch from master
    • Commit your code changes
    • Create a Pull Request to merge into the master branch
  3. Conditions to complete Pull Request To ensure minimal quality, branch policies have been set up for pull requests to the master branch:

    • A new build must be validated before each pull request
    • A project administrator must validate the code changes

Installation and Usage

  1. Import MilNode with npm install milnode
  2. Use MilNode library by using following snippet into your main.js:
    import MilNode from 'milnode'
    Vue.use(MilNode)
  3. Import MilNode styles (provided as .stylus file) into your main.js file:

    import 'roboto-fontface/css/roboto/roboto-fontface.css'
    import 'material-design-icons-iconfont/dist/material-design-icons.css'
    import 'milnode/src/stylus/app.styl'

    Or, from your main .stylus project file:

    @import '~roboto-fontface/css/roboto/roboto-fontface.css'
    @import '~material-design-icons-iconfont/dist/material-design-icons.css'
    @import '~milnode/src/stylus/app.styl'

    Note that you can use other icon fonts, by defining layout.iconfont setting, and importing the correct style. See here for more details.

  4. Add proper compilation settings into your vue.config.js file:

    const webpack = require('webpack')
    
    module.exports = {
      transpileDependencies: [
        'milnode',
        'vuex-persist'
      ],
      productionSourceMap: false,
      configureWebpack: {
        plugins: [
          new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en|fr/)
        ]
      },
      chainWebpack: config => {
        config.plugins.delete('prefetch')
      }
    }

Documentation

Settings

The simplest way to install MilNode is by using int with the following snippet:

import MilNode from 'milnode'
Vue.use(MilNode)

You can provide more information to MilNode, to adapt the default template to your needs:

import MilNode from 'milnode'
Vue.use(MilNode, {
  // Your settings here
})

The following settings are available.

KeyDefault valueDescription
application{}Main application information
application.name'APP_NAME'Application name displayed on top toolbar and in Privacy page
application.contact'CONTACT_NAME'Contact name used on Contact and Privacy pages
layout{}Layout information
layout.navigationDrawerItems[]Items to add in navigation drawer; these will be added before template items (Help, Your feedback, Privacy, About)
layout.accountItems[]Items to add in account toolbar; these will be added before template items (Logout)
layout.applicationItems[]Items to add in applications toolbar; let this array empty or undefined to disable the applications toolbar
layout.languagesItems[]Languages to propose on settings toolbar
layout.enableThemefalseEnable dark theme support on settings toolbar
layout.iconfontmdIcon font to use BETA
services{}Services (API) information
services.disabledfalseDisable services support, and disabled Help, Feedback and About pages
services.baseUrl'http://mysite.com/api'Base URL for your API
router{}Router information
router.mode'history'Vue-router mode: default is history, a common setting is to set up router mode to hash
router.routes[]Routes to add; these will be added to template routes
router.rootComponent() => import('@/pages/Root.vue')Address to import your custom Root page as a vue.js component
router.homeComponent() => import('@/pages/home/Home.vue')Address to import your custom home page as a vue.js component
store{}Store information
store.modules[]Vuex modules to add; these will be added to template modules
i18n{}Internationalization information
i18n.messages{}Vue-i18n messages to add; these will be added to template messages
authentication{}Users authentication information
authentication.disabledfalseDisable user authentication
authentication.userManagerSettings{}Oidc-client user manager settings

With all the settings defined, here is a complete example:

import MilNode from 'milnode'
Vue.use(MilNode, {
  application: {
    name: 'APP_NAME',
    contact: 'CONTACT_NAME'
  },
  layout: {
    navigationDrawerItems: [],
    accountItems: [],
    applicationItems: [],
    languagesItems: [],
    enableTheme: false,
    iconfont: 'md'
  },
  services: {
    disabled: false,
    baseUrl: 'http://mysite.com/api'
  },
  router: {
    mode: 'history',
    routes: [],
    rootComponent: () => import('@/pages/Root.vue'),
    homeComponent: () => import('@/pages/home/Home.vue')
  },
  store: {
    modules: []
  },
  i18n: {
    messages: {}
  },
  authentication: {
    disabled: false,
    userManagerSettings: {}
  }
})
0.6.15

5 years ago

0.6.14

5 years ago

0.6.13

5 years ago

0.6.12

5 years ago

0.6.11

5 years ago

0.6.10

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.6.0-0

5 years ago

0.5.0

5 years ago

0.5.0-5

5 years ago

0.5.0-4

5 years ago

0.5.0-3

5 years ago

0.5.0-2

5 years ago

0.5.0-1

5 years ago

0.5.0-0

5 years ago

0.4.9

5 years ago

0.4.8

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.13-4

5 years ago

0.3.13-3

5 years ago

0.3.13-2

5 years ago

0.3.13-1

5 years ago

0.3.13-0

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.89

5 years ago

0.1.88

5 years ago

0.1.87

5 years ago

0.1.86

5 years ago

0.1.85

5 years ago

0.1.84

5 years ago

0.1.83

5 years ago

0.1.82

5 years ago

0.1.81

5 years ago

0.1.80

5 years ago

0.1.79

5 years ago

0.1.78

5 years ago

0.1.77

5 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74

5 years ago

0.1.73

5 years ago

0.1.72

5 years ago

0.1.71

5 years ago

0.1.70

5 years ago

0.1.69

5 years ago

0.1.68

5 years ago

0.1.67

5 years ago

0.1.66

5 years ago

0.1.65

5 years ago

0.1.64

5 years ago

0.1.63

5 years ago

0.1.62

5 years ago

0.1.61

5 years ago

0.1.60

5 years ago

0.1.59

5 years ago

0.1.58

5 years ago

0.1.57

5 years ago

0.1.56

5 years ago

0.1.55

5 years ago

0.1.54

5 years ago

0.1.53

5 years ago

0.1.52

5 years ago

0.1.51

5 years ago

0.1.50

5 years ago

0.1.49

5 years ago

0.1.48

5 years ago

0.1.47

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.44

5 years ago

0.1.43

5 years ago

0.1.42

5 years ago

0.1.41

5 years ago

0.1.40

5 years ago

0.1.39

5 years ago

0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.35

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago