ams html5,GitHub - Veams/core: Veams is one of the most flexible and efficient system to build scala...

VEAMS框架的核心库可以通过NPM或Yarn进行安装。基本使用只需导入JavaScript库和SCSS文件。对于更高级的用法,可以创建Core类的实例,自定义命名空间并决定是否添加到全局对象。VEAMS Core提供了API来注册助手和使用插件,还包含了事件对象、版本信息、设备检测和内置助手。此外,还可以扩展框架以满足特定需求。
摘要由CSDN通过智能技术生成

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值