• Docs

Getting Started

  1. Introduction

CLI

  1. General

    1. Installation
    2. Commands
    3. Scaffold a new project
    4. Generate a new component
    5. Install a component
  2. Generators

    1. Veams Generator

Framework

  1. Base

    1. Base Class
    2. Component Class
    3. Core
    4. Helpers
  2. Plugins

    1. Overview
    2. Logger
    3. Modules
    4. Media Query Handler
    5. Store
    6. Templater
    7. Vent
  3. Other Packages

    1. Http-Service

Methodology

  1. General

    1. Overview
  2. Instruments

    1. Regions
    2. Components
    3. Utilities
  3. Classes and Markup

    1. Introduction
    2. Global Styling
    3. Context Styling
    4. Modifier Styling
  4. JavaScript

    1. Modules
    2. Items
    3. Options
    4. Bringing It All Together

Base (@veams/base)

Base Class for Components and Services which will be used in Veams projects.


Features

  • Deep merge support for option objects
  • Unique id generation
  • mixin support
  • TypeScript support

Installation

NPM

npm install @veams/base --save

Yarn

yarn add @veams/base

Usage

class Test extends Base {
	constructor(obj) {
		let options = {
			selectors: {
				'container': '.test',
				'btn': '.btn-danger'
			},
			classes: {
				active: 'is-active'
			}
		};

		super(obj, options);
	}
}

const test = new Test({
	// el: $(''),
	namespace: 'test',
	options: {
		selectors: {
			'container': '.container'
		}
	}
});

Output

{
	"_namespace": "test",
	"_instanceId": "test_1518477164034_266f9fa5-6faf-064b-7d2e-e23cfaf2855e",
	"options": {
		"selectors": {
			"test": ".container",
			"btn": ".btn-danger"
		},
		"classes": {
			"active": "is-active"
		}
	},
	"_el": {}
}
If you've spotted a typo or a mistake, or wish to add something on, you could write about this on Github | Gitter | © Made in Berlin with love