@activeprospect/integration-components

A Vue component library for LeadConduit integrations. The intent of this library is to speed up development and enfore DRY standards by providing the boilerplate for the most oft-repeated components. This library uses the following technologies:

Usage no npm install needed!

<script type="module">
  import activeprospectIntegrationComponents from 'https://cdn.skypack.dev/@activeprospect/integration-components';
</script>

README

leadconduit-integration-components

A Vue component library for LeadConduit integrations. The intent of this library is to speed up development and enfore DRY standards by providing the boilerplate for the most oft-repeated components. This library uses the following technologies:

  • Vue to write the components
  • Rollup for bundling the Vue files
  • Storybook as a development and documentation framework
  • Cypress as a testing suite

Vue


All Vue components are stored in /src/components. To make sure each Vue component is picked up by Rollup, it must be added to the /src/index.js file like so:

export { default as Navigation } from './Navigation.vue';

Rollup


Rollup bundles our Vue components for distribution. The Rollup config file is located in /build.

To run Rollup and build the Vue components, simply run npm run build. This will take all the Vue components listed in /src/index.js and compile them, outputting the result into /dist.

Storybook


Storybook is used as a development and documentation framework. To read more on Storybook, you can find their docs here. Storybook stories are stored in /src/stories, and the Storybook configuration files are stored in /storybook.

To use storybook, you can run npm run storybook. This will start the storybook server and open a new browser window to localhost:6006. In that new window, you will be able to see the Storybook stories. Storybook does support hot reloading, so any changes to the Vue files should be automatically reflected.

Cypress


Cypress is used to test our components to ensure changes don't break critical functionality. Cypress runs its tests using the Storybook server, so Storybook must be running on port 6006 for the tests to not timeout.

There are two methods to run Cypress tests.

npm run cypress:open - Opens the Cypress GUI

npm run cypress:run - runs the test in the terminal

Cypress tests are located in /cypress/integration. To view more on Cypress, you can find their docs here