A collection of vanilla JavaScript components used in Odopod projects.
Switch branches/tags
@odopod/odo-window-events@1.2.0 @odopod/odo-window-events@1.1.0 @odopod/odo-window-events@1.0.3 @odopod/odo-window-events@1.0.2 @odopod/odo-window-events@1.0.1 @odopod/odo-viewport@1.1.1 @odopod/odo-viewport@1.1.0 @odopod/odo-viewport@1.0.3 @odopod/odo-viewport@1.0.2 @odopod/odo-viewport@1.0.1 @odopod/odo-video@1.2.2 @odopod/odo-video@1.2.1 @odopod/odo-video@1.2.0 @odopod/odo-video@1.1.1 @odopod/odo-video@1.1.0 @odopod/odo-video@1.0.1 @odopod/odo-tap@1.1.2 @odopod/odo-tap@1.1.1 @odopod/odo-tap@1.1.0 @odopod/odo-tap@1.0.3 @odopod/odo-tap@1.0.2 @odopod/odo-tap@1.0.1 @odopod/odo-tabs@2.0.2 @odopod/odo-tabs@2.0.1 @odopod/odo-tabs@2.0.0 @odopod/odo-tabs@1.0.3 @odopod/odo-tabs@1.0.2 @odopod/odo-tabs@1.0.1 @odopod/odo-sticky-headers@1.2.0 @odopod/odo-sticky-headers@1.1.0 @odopod/odo-sticky-headers@1.0.3 @odopod/odo-sticky-headers@1.0.2 @odopod/odo-sticky-headers@1.0.1 @odopod/odo-share@1.1.1 @odopod/odo-share@1.1.0 @odopod/odo-share@1.0.3 @odopod/odo-share@1.0.2 @odopod/odo-share@1.0.1 @odopod/odo-scroll-feedback@1.2.0 @odopod/odo-scroll-feedback@1.1.0 @odopod/odo-scroll-feedback@1.0.3 @odopod/odo-scroll-feedback@1.0.2 @odopod/odo-scroll-feedback@1.0.1 @odopod/odo-scroll-animation@1.2.0 @odopod/odo-scroll-animation@1.1.0 @odopod/odo-scroll-animation@1.0.2 @odopod/odo-scroll-animation@1.0.1 @odopod/odo-sassplate@2.0.1 @odopod/odo-sassplate@2.0.0 @odopod/odo-sassplate@1.1.1 @odopod/odo-reveal@2.0.2 @odopod/odo-reveal@2.0.1 @odopod/odo-reveal@2.0.0 @odopod/odo-reveal@1.0.3 @odopod/odo-reveal@1.0.2 @odopod/odo-reveal@1.0.1 @odopod/odo-responsive-images@1.2.0 @odopod/odo-responsive-images@1.1.0 @odopod/odo-responsive-images@1.0.3 @odopod/odo-responsive-images@1.0.2 @odopod/odo-responsive-images@1.0.1 @odopod/odo-responsive-classes@1.1.1 @odopod/odo-responsive-classes@1.1.0 @odopod/odo-responsive-classes@1.0.3 @odopod/odo-responsive-classes@1.0.2 @odopod/odo-responsive-classes@1.0.1 @odopod/odo-responsive-attributes@1.1.1 @odopod/odo-responsive-attributes@1.1.0 @odopod/odo-responsive-attributes@1.0.3 @odopod/odo-responsive-attributes@1.0.2 @odopod/odo-responsive-attributes@1.0.1 @odopod/odo-pointer@1.2.1 @odopod/odo-pointer@1.2.0 @odopod/odo-pointer@1.1.0 @odopod/odo-pointer@1.0.3 @odopod/odo-pointer@1.0.2 @odopod/odo-pointer@1.0.1 @odopod/odo-on-swipe@1.1.2 @odopod/odo-on-swipe@1.1.1 @odopod/odo-on-swipe@1.1.0 @odopod/odo-on-swipe@1.0.3 @odopod/odo-on-swipe@1.0.2 @odopod/odo-on-swipe@1.0.1 @odopod/odo-object-fit@1.1.1 @odopod/odo-object-fit@1.1.0 @odopod/odo-object-fit@1.0.3 @odopod/odo-object-fit@1.0.2 @odopod/odo-object-fit@1.0.1 @odopod/odo-module@1.2.1 @odopod/odo-module@1.2.0 @odopod/odo-module@1.1.0 @odopod/odo-module@1.0.1 @odopod/odo-hotspots@1.2.1 @odopod/odo-hotspots@1.2.0 @odopod/odo-hotspots@1.1.3 @odopod/odo-hotspots@1.1.2 @odopod/odo-hotspots@1.1.1 @odopod/odo-hotspots@1.1.0 @odopod/odo-hotspots@1.0.2 @odopod/odo-hotspots@1.0.1
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
docs-src
docs
gulp-tasks
packages
scripts
utils
.editorconfig
.eslintignore
.eslintrc.json
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
gulpfile.js
karma.conf.js
lerna.json
package.json
yarn.lock

README.md

Odopod Code Library (Odo) Build Status

A collection of vanilla JavaScript components used in Odopod projects.

Want to contribute to Odo?

Take a look at CONTRIBUTING.md.

Packages

The Odo repo is managed as a monorepo; it's composed of many npm packages.

Package Version
@odopod/odo-affix npm
@odopod/odo-background-video npm
@odopod/odo-base-component npm
@odopod/odo-carousel npm
@odopod/odo-device npm
@odopod/odo-dialog npm
@odopod/odo-draggable npm
@odopod/odo-dropdown npm
@odopod/odo-dual-viewer npm
@odopod/odo-expandable npm
@odopod/odo-helpers npm
@odopod/odo-hotspots npm
@odopod/odo-module npm
@odopod/odo-object-fit npm
@odopod/odo-on-swipe npm
@odopod/odo-pointer npm
@odopod/odo-responsive-attributes npm
@odopod/odo-responsive-classes npm
@odopod/odo-responsive-images npm
@odopod/odo-reveal npm
@odopod/odo-sassplate npm
@odopod/odo-scroll-animation npm
@odopod/odo-scroll-feedback npm
@odopod/odo-share npm
@odopod/odo-sticky-headers npm
@odopod/odo-tabs npm
@odopod/odo-tap npm
@odopod/odo-video npm
@odopod/odo-viewport npm
@odopod/odo-window-events npm

Tips for advanced webpack configuration

If you use webpack (or another bundler) for your project and are already using a compiler for your JavaScript (like babel), you have the option of using odo component source files and compiling them with your project.

This has a couple benefits:

  • No dependencies for odo are bundled with their dist files. For example, the debounce package is bundled in a couple odo components.
  • Use the same babel preset for your app's code and odo components. Maybe you're using babel-preset-env so that you can compile less.

Use the alias object to map requests for odo components to their source files instead of dist files. This configuration is intended for webpack 2, 3, or 4.

// Webpack config
{
  resolve: {
    alias: {
      '@odopod/odo-carousel$': '@odopod/odo-carousel/src/carousel.js',
      '@odopod/odo-device$': '@odopod/odo-device/src/device.js',
      '@odopod/odo-draggable$': '@odopod/odo-draggable/src/draggable.js',
      '@odopod/odo-helpers$': '@odopod/odo-helpers/src/helpers.js',
      '@odopod/odo-pointer$': '@odopod/odo-pointer/src/pointer.js',
    },
  },
}

Don't exclude odo components from being compiled with babel.

module: {
  rules: [
    {
      test: /\.js$/,
      exclude: /node_modules\/(?!@odopod\/odo-)/,
      loader: 'babel-loader',
    },
  }
]