Coder Social home page Coder Social logo

Core of VEAMS framework

When you have scaffolded the project with the CLI you can skip the Installation and Usage section!


Installation without @veams/cli

To install VEAMS as framework you have to work with the core library.

NPM

npm install @veams/core --save

Yarn

yarn add @veams/core 

Usage

Basic Usage

To use VEAMS as framework just install and import the library:

JavaScript

import Veams from '@veams/core';

This imports a starter kit which initialize the core.

SCSS

// Reset (veams-reset or veams-normalize)
@import "./node_modules/veams/scss/veams-reset";
@import "./node_modules/veams/scss/veams";

That's it. The framework is integrated.

Advanced Usage

You can also create your own instance of the core by using the Core class.

import Core from '@veams/core/lib/core';

let app = new Core({
    namespace: 'App',
    addToGlobal: false
});

VEAMS Core

The core of VEAMS is nothing more than a simple object (Veams). In general VEAMS comes with some empty and predefined objects and a basic API.

Veams Core Options

  • namespace {String} ['Veams'] - Add your custom namespace.
  • addToGlobal {Boolean} [false] - Add your previously defined namespace to the global window object.

VEAMS Core API

Veams.addHelper('name', helperFunction)

  • @param {String} name - Helper name which will be used in the registration process.
  • @param {Function} helperFunction - The helper function.

The method allows the registration of provided or custom helpers.

Veams.use(plugin)

  • @param {Object} plugin - Plugin object which extends the VEAMS object.

This method provides the possibility to register a plugin, see section Creation of plugins.

Veams Core Object

Veams.EVENTS {Object}

The events object can be used to communicate between modules. It can be extended with further custom events. Just see @veams/plugin-vent.

Veams.base.version {String}

Display the current VEAMS version.

Veams.dectections {Object}

The detections object contains the current width and height, as well as if you are on a touch device or not.

The detections object will be updated when you use @veams/plugin-media-query-handler.

Veams.helpers {Object}

VEAMS has some helpers which you can use. But you should use @veams/helpers for usage.

Veams.Plugins {Object}

All named plugins will be saved in this object. In the beginning it is empty.

Veams's Projects

Veams doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.