Shim packages for popular libraries installable with nodes package manager: npm, designed for use in requirejs AMD projects.
So what's comming down the shimney tonight? It's a lot of nice packages!
shimney tries to solve the frontend packaging problem for the most popular javascript libraries. But instead of using an own package manager and some non used format for frontend libraries, it cherishes shim repositories for popular libraries on npm.
Our main goal is to provide EASY to use packages for one scenario:
- your package loader is requirejs
- you want all your modules loaded and written in amd
- your mainly developing for client side applications (browser environment)
You can find all packages for shimney if you search npm for shimney-
. Every package avaible is prefixed with shimney-
.
If you haven't got a package.json
for npm create one with:
npm init
cd to the directory where your package.json
resides. You can install your desired Package with npm:
npm install shimney-<yourPackage> --save
this updates your package.json
with the dependency to shimney and pulls the package from npm.
Configure your requirejs to include the node module as an requirejs package.
requirejs.config({
"packages": [
{
name: '<yourPackage>',
location: 'web/path/to/node_modules/shimney-<yourPackage>'
}
]
});
Notice: You can pick any named as an alias for your requirejs config. But its recommended to use the package name without the shimney-
part.
And you're ready to use your installed shimney package with requirejs:
define(['<yourPackage>'], function(myPackageAlias) {
});
for example with knockout:
npm install shimney-knockout --save
requirejs.config({
"packages": [
{
name: 'knockout',
location: '/js/modules/shimney-knockout'
}
]
});
define(['knockout'], function(ko) {
var observableItem = ko.observable();
});
Notice: in this example /js/modules is rewritten to the node_modules/ directory in the project root (next to the package.json). You can use apache's /alias
for this. But be aware that this will conflict with r.js which is not able to read those aliases.
please file a issue on this repository
please file a issue on this repository
Every shimney needs a good sweeper, to work perfectly. So hear it is: grunt-shimney-sweeper. Install your shimneys with npm told above. Run the update-config task from the sweeper to generate your config.
no. This repository is only used to build the handcrafted shimneys for npm.
We are a small company developing for clients and open source projects in php an javascript. ps-webforge.com
MIT (but consider the licenses from every single shimney package in package.json)