1.0.12 • Published 5 years ago

@cargowebserver/cargowebcomponents v1.0.12

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 years ago

Published on webcomponents.org

Cargo Web Components

A usefull collection of Web Components based on polymer 3.

Installation

To append compoments to your application all you need to do is...

npm install --save  @cargowebserver/cargowebcomponents

Usage

Webcomponents are a fast and easy way to create web application. Because each component are self contain, it's easy to make it work with each other. Just like any other HTML elements, components can be stylized at the application level, in order to give them a uniform look and feel.

Cargo Web Component are based on Polymer 3 and try to follow the material design principles.

Quick start

Welcome to Cargo Web Components

Here I will explain to you all the steps to made use of components.

Dependencies

I order to create a web application you will need:

  • NPM
  • Node.js

Step by Step

Create a new folder for your project

mkdir test
cd test

Initilayse your package file

npm init

Append the components and other depencies in your file.

npm install --save @cargowebserver/cargowebcomponents

now append your element in the html file where you want to use it (index.html)...

<html>
  <head>
    <script type="module">
      import '@cargowebserver/cargowebcomponents/components/growl/growl.js';
    </script>
  </head>
  <body>
<growl-element w="350" h="150" shadow="5" delay="3000" style="display:none;">I am growl!</growl-element>
  </body>
</html>

(for local use) intall the polymer client utilities

sudo npm install -g polymer-cli

finaly serve it

polymer server --npm

For include the result in IIS or CargoWebServer, for exemple, you need to build your project, that will create a build directory that contain all neccessary file.

polymer build

History

Cargo Web Components were part of Cargo Web Server project can see list here. here is the list of components that will be rewritten as webcomponent...

  • growl (in process)
  • splitter
  • dialog
  • menu
  • table
  • wizard
  • object panel

Credits

Written by Dave Courtois.

License

Apache License 2.0 (Apache-2.0)