Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vtex/front.utils
VTEX Underscore extensions
https://github.com/vtex/front.utils
srv-checkout-ui xp-shopping
Last synced: about 1 month ago
JSON representation
VTEX Underscore extensions
- Host: GitHub
- URL: https://github.com/vtex/front.utils
- Owner: vtex
- License: mit
- Created: 2013-07-12T20:57:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T20:06:46.000Z (over 4 years ago)
- Last Synced: 2024-04-14T22:51:55.360Z (9 months ago)
- Topics: srv-checkout-ui, xp-shopping
- Language: CoffeeScript
- Size: 321 KB
- Stars: 7
- Watchers: 225
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# VTEX Front End Utils
Common extensions used by various projects
## Structure
This repo contains several directories under `src/`, each with common snippets, extensions or patterns used accross projects.
Usually, they are grouped by the framework or library that they extend, i.e. `angular`, `knockout`, `underscore`.
### Exporting
You can expect that any given file will be exported to the global `window` under the following template:
`window.vtex.{path}`
Directories will be expanded into namespaces and dashes (`my-file`) will be converted to camelCase (`myFile`).
For example, the `common/append-template.coffee` will be exported into `window.vtex.common.appendTemplate`.
## Importing with webpack
If your project uses webpack, you can `require` the dependencies from the window via [webpack externals](http://webpack.github.io/docs/library-and-externals.html) configuration.
For example:
externals: {
// require("appendTemplate") is external and available
// on the global var window.vtex.common.appendTemplate
"appendTemplate": "window.vtex.common.appendTemplate"
}### Common
### Knockout
### Angular
### Underscore
`underscore-extensions` extends the global `_` with new utilitary functions.
------
VTEX - 2015