@adplenty-tech/adplenty-components-library
v1.9.30
Published
A library of components used across adPlenty products.
Keywords
Readme
adplenty-components-library
Install on other projects
1. Execute
npm i -s @adplenty-tech/adplenty-components-library2. JS file
In the main angular file where modules are imported add:
import "@adplenty-tech/adplenty-components-library"Then:
const app = angular.module('admin', ["@adplenty-tech/adplenty-components-library"])3. Import CSS
In your main CSS file add:
@import "../../node_modules/@adplenty-tech/adplenty-components-library/build/index";Module organization
Directives: app/components
Filters: app/filters
Services: app/services
Adding a module
There are 2 ways to add a module into this repo:
- Copy the compnent folder from the project into the component folder.
- Create a directive using the
directcreacommand (needs to be installed first:npm install -Sg git+ssh://[email protected]/albion_team/directcrea.git) - Optional: Create a readme.MD in the module directory to explain more in details how this module works
- Optional: Add examples in the
overview.htmlfile
Rules around adding a module
In order to keep this repository as clean as possible it is not allowed to add directives that:
- Use a specific product API
- Use a specific service/filter/etc. only available in a product
- Have drastic functional and design differences across products
Updating a module
It is important to keep in mind that this repository might be updated over time across all our products, so before changing anything you need to make sure it doesn't:
- impact the way it is being called (ex: change the tag name)
- impact the way attributes are used (ex: change attribute name or remove attributes)
- change the object formats of inputs and outputs (ex: changing config property names or return format from event based actions like 'onClick')
Try to always extend on the current directive code, and if it is too different create a new directive
Creating a new version
In order to create a new version please follow this checklist:
- run
npm run build - edit
package.jsonto reflect a new version - edit this file if needed with important information
