🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@dmsi/wedgekit

Package Overview
Dependencies
Maintainers
3
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dmsi/wedgekit

Web UI pattern library for DMSi Software

latest
npmnpm
Version
9.2.0
Version published
Maintainers
3
Created
Source

Getting Started

Wedgekit is meant as a starter guide and kit to quickly begin a DMSi project or help apply consistency in your project.

Methodology

Wedgekit follows BEM methodology for naming classnames and the Atomic Design methodology for sorting and organizing components.

BEM (Block, Element, Modifier)

The Block, Element, Modifier methodology (commonly referred to as BEM) is a popular naming convention for classes in HTML and CSS. Developed by the team at Yandex, its goal is to help developers better understand the relationship between the HTML and CSS in a given project.

Good documentation on this

Atomic design

Atomic design is way to structure and organize your stylesheets in a way that makes sense to you and your team. Read this - http://atomicdesign.bradfrost.com/chapter-2/ to learn more about the methodology.

Importing WedgeKit

You may either import wedgekit.scss or the individual components. NOTE the order of this is very important.

@import "settings/settings"; // required
@import "mixins/mixins"; // required
@import "tools/tools"; // required
@import "atoms/atoms";
@import "molecules/molecules";
@import "organisms/organisms";
@import "utilities/utilities";

Adding new SCSS components

This is a working style guide. Add new components and documentation as needed for DMSi project. Make sure to follow the atomic design approach to decide where to place the new component.

Let's say you want to add a new organism. Simply add _.myNew.organisms.scss to the /scss/organisms directory. To import your new component, add @import "myNew.organisms"; to /scss/organisms/_organisms.scss file.

Adding new JS components

To add a new JS component, use the command:

yarn run add-component

Enter the name of the component, and indicate whether it can be created as a stateless function. For more information about stateless functions, see here.

Library Use

yarn add @dmsi/wedgekit

OR

npm install --save @dmsi/wedgekit

######Importing

import { Alerts } from '@dmsi/wedgekit'

######Webpack

//webpack.config.js

module.exports = {
  entry: [
    '!!style-loader!css-loader!../node_modules/@dmsi/wedgekit/wedgekit.css'
  ]
};

Grid

In addition to @dmsi/wedgekit, this repository also contains the code for a grid component published to npm as @dmsi/grid. This component contains a lot of functionality from various grid & data processing libraries, so it's published as a separate module.

yarn add @dmsi/grid

OR

npm install --save @dmsi/grid

Releasing

To create a new release of Wedgekit or the Grid, first make sure all changes are merged into develop. Then make a release branch off of develop, titled release/SEMVER_LEVEL. The semver level should be 'patch', 'minor', or 'major', following semver rules. Generally, a fix to an existing component would be a patch, a new component would be a minor release, and breaking changes would be a major release.

It is important to follow the pattern of release/patch, release/minor, or release/major because the automated release publishing is looking for that pattern.

Once the release branch is created with the correct name, merge the release branch into master. This can be achieved by creating a pull request in Bitbucket. Once it is merged, CircleCI will handle bumping the version, tagging it, and publishing it in npm.

Once the build has finished on master, pull the master branch into develop to make sure all development work has the correct version going forward.

TODO

  • Reminder: add DMSi rules for when/how to use a component.
  • Document settings, tools, mixins and utilities.

FAQs

Package last updated on 16 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts