0.0.0 • Published 3 years ago

explore-components v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

ExploreComponents

Library

This project contains the explore components Angular library explore-components-lib that contains the explore tools created by Playpower team.

Assets

This library contains graphic assets for the explroe tools in the projects/explore-components-lib/assets folder. Each tool has its own subfolder where its assets reside. The ng-package.json file of the library contains a line "assets": ["./assets"], that ensures that these assets end up in the dist folder.

If you want to change how the assets are referenced in the components, please edit the component.ts files directly.

Build

Run npm run build-lib or ng build explore-components-lib to build the library.

Packaging

After building the module, for local testing, please use npm pack to make an npm package archive and install it using the direct file path e.g. npm install /path/explore-components/dist/explore-components-lib/explore-components-lib-0.0.1.tgz

Build and Pack in a single command

Run npm run build-pack to create the final tgz package inside dist/explore-components-lib directory.

Main Application

Peer Dependency

The createjs-module package in this library is added as a peer depedency, so you will have to install it in the main application. It is not carried with this library.

Including Assets in the Main Application

In your main application's angular.json, you will need to add the following to make the assets avaiable to the explore tools:

{
    "glob": "**/*",
    "input": "./node_modules/explore-components-lib/assets",
    "output": "./assets"
}

This will allow explore tools to access their assets using assets/tool-name/asset_path URI.