1.0.24 • Published 10 months ago

vite-plugin-balafon v1.0.24

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

balafon-vite-plugin

goal

help handling balafon project configuration.

require

check with this command:

balafon --version

installation

npm -i vite-plugin-balafon

or

yarn add vite-plugin-balafon

Note: this package depend on cli-color and vite

usage

  • in vite.config.js
import balafon from 'balafon-vite-plugin'

export default defineConfig({
    // ...
    plugins:[
        // ...
        balafon()
    ]
})

in application

  • virtual:balafon-corejs : to inject balafon core script. used in development to gain access to balafon.core.js library. will inject $igk as globalVariable and globalThis.igk

-- usage

import 'virtual:balafon-corejs';

$igk(...);
  • virtual:balafon-corejs: inject framework dynamic core css.

  • virtaul:balafon-project-settings : retrieve controller application session depend of the plugins (dev|production must be dynamic resolved)

option to pass to balafon config

{
    "leaveIndexHtml": {
        "type":"boolean",
        "description":"do not remove index.html"
    },
    "cwdir":{
        "type":"string",
        "description":"controller working directory"
    },
    "controller":{
        "type":"string",
        "description":"target controller name"
    },
    "useRoute":{
        "type":"boolean",
        "description":"active plugin use of routes definition"
    },
    "usePiniaStore":{
        "type":"boolean",
        "description":"active plugin use of pinia store"
    },
    "logo":{
        "type":"string",
        "description":"location to .svg logo relative to application working directory to be included "
    },
    "defaultUser":{
        "type":"string",
        "description":"login of the user to uses"
    },
    "buildCoreAssetOutput":{
        "type":"string",
        "description": "sub assets folder wher to store core assets. default will be \"balafon/\""
    },
    "buildCoreJSAsAsset":{
        "type":["boolean"],
        "description":"ask to deploy CoreJs as asset"
    },
    "buildCoreCssAsAsset":{
        "type":["boolean"],
        "description":"ask to deploy CoreCss as assets"
    },
    "buildIconLibAsAsset":{
        "type":"boolean",
        "default":false,
        "description":"ask to deploy Icons libraries as assets"
    },
    "icons":{
        "type":"object",
        "description":"manage svg icons for the projects"
    },
    "componentUri":{
        "type":"string",
        "description": "indicate entry component server."
    }

}

plugins createApp Override

import { createApp } from 'virtual:balafon-vite-app'
import { createSSRApp } from 'virtual:balafon-vite-app'

declerate icons for production

library: string => folder_that_contains_svg_or_vue, list_of_file_to_import

  • Features I18n

"formats" in json spécifie formatting to used

or "text.formats" the new text to use

RELEASE

1.0.22

10 months ago

1.0.20

10 months ago

1.0.24

10 months ago

1.0.23

10 months ago

1.0.19

10 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.1

10 months ago