1.1.51 • Published 9 days ago

@intellias/menu v1.1.51

Weekly downloads
-
License
ISC
Repository
-
Last release
9 days ago

intems-menu

Project setup

npm install

Compiles and minifies for production

npm run dev

Lints and fixes files

npm run lint

NPM publish guideline:

  1. Login to NPM

If you aren't already logged in, you should use corporate npm account(intems) to get access to this package, as it's private on npm. Use user that's added as a collaborator to organization, or organization account.

npm login
  1. Build
npm run dev
  1. Publish
npm publish

Introduction

Entry point of the project is "wrapper.ts" file. Here our component is registered, all data transfered to it from options parameter. MenuOptions interface is declaring, which options can be passed when importing module. If there's a demand to add anything new, you can extend this interface and add necessary data. It's automatically parsed and sent as props to "./Menu.vue" component.

Using the Package

Since now have our package published, Let's take a look at how we can use this package in other repositories

To Install

npm install --save @intellias/menu

Once you have installed the package, in your entry file of the repository (wrapper.ts) if you are using it in a Vue CLI project. Write the import command

import MainMenu, { MenuOptions, MenuLayout } from '@intellias/menu';
// Importing necessary chunks for dynamic modules from menu( will be fixed if moving to webpack ^5.0.0)
import '@intellias/menu/dist/js/kudosForm.js';
import '@intellias/menu/dist/js/vendors~kudosForm.js';
import '@intellias/menu/dist/js/rejectComponent.js';
import '@intellias/menu/dist/js/vendors~kudosForm~rejectComponent.js';
import '@intellias/menu/dist/js/vue.js';

To install it globally.

const menuOptions: MenuOptions = {
            // Pass your options here
        };
        Vue.use(MainMenu, menuOptions);

It's also necessary to install styles(You can import them to App.vue or main.scss file) as follows:

import '@intellias/menu/dist/css/main.css'  // Menu css import must be here for correct adding to the DOM

MenuOptions explained

export interface MenuOptions {
  layout: MenuLayout;
  storeAdapter: keyable;
  subMenus?: Submenus;
  helperFunctions: Helpers;
  // add more options here if needed
}
  • layout -> provide specific value from MenuLayout enum (Lite/Portals)
  • storeAdapter -> provide necessary Vuex store adapters( StoreAdapter)
  • subMenus -> provide subMenuList object, optional. DEMANDED ONLY WHEN IMPORTING TO LITE PROJECT (@app/core/helpers/sub-menu/SubMenuList)
  • helperFunctions -> provide necessary helpers functions (add getUrlPathByName from @/bootstrap/vue-router)

Updating the package and versioning

So you have the package published on NPM and now you need to change certain things on the package and re-publish it with new changes. This process involves a list of steps which I am listing down below.

Make changes to the codebase Before we can publish the changes we need to make sure the working directory is clean

git add -A

git commit -m "Fix bug in the package"

Increment the version number in NPM NPM follows the semantic version (semver) versions, in which each number denotes if it's a major release, minor change, or a patch fix. (Read details about semver here )

In this case, let's just bump the patch version by 1

npm version patch -m "Minor changes to the Hello World Text"

This will update the version number in your package.json file.

And since we have the GitHub repository linked to the npm. It will also create a tag for the bumped up version number.

Run the following command to check the latest tag

git tag

Next up, push the latest changes to git along with the new tag.

git push --follow-tags

Now you can go ahead and publish the new changes on npm

npm publish

Additional information

1.1.51

9 days ago

1.1.50

9 days ago

1.1.49

14 days ago

1.1.48

18 days ago

1.1.47

18 days ago

1.1.46

21 days ago

1.1.45

1 month ago

1.1.44

1 month ago

1.1.43

2 months ago

1.1.42

2 months ago

1.1.41

2 months ago

1.1.40

2 months ago

1.1.38

2 months ago

1.1.37

2 months ago

1.1.36

2 months ago

1.1.35

3 months ago

1.1.34

3 months ago

1.1.33

3 months ago

1.1.32

3 months ago

1.1.31

3 months ago

1.1.30

3 months ago

1.1.29

3 months ago

1.1.27

3 months ago

1.1.26

4 months ago

1.1.25

5 months ago

1.1.24

5 months ago

1.1.23

5 months ago

1.1.22

5 months ago

1.1.21

5 months ago

1.1.20

5 months ago

1.1.19

5 months ago

1.1.18

5 months ago

1.1.17

5 months ago

1.1.16

5 months ago

1.1.15

6 months ago

1.1.14

6 months ago

1.1.13

6 months ago

1.1.12

6 months ago

1.1.11

7 months ago

1.1.10

7 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.39

8 months ago

1.0.38

8 months ago

1.0.37

8 months ago

1.0.36

8 months ago

1.0.35

8 months ago

1.0.34

8 months ago

1.0.33

8 months ago

1.0.32

8 months ago

1.0.31

8 months ago

1.0.30

8 months ago

1.0.29

8 months ago

1.0.28

9 months ago

1.0.27

9 months ago

1.0.26

9 months ago

1.0.25

9 months ago

1.0.24

9 months ago

1.0.23

9 months ago

1.0.22

9 months ago

1.0.21

9 months ago

1.0.20

9 months ago

1.0.19

9 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

9 months ago

1.0.15

9 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.2

11 months ago

1.0.0

11 months ago