The new Dojo Foundation Package repository is an easy and powerful new way to host Node packages for installation with NPM. This new repository allows you to directly link packages to git repositories and it works with NPM without changes. Developing a Node package couldn’t be easier. Simply submit your package URL to the repository, and instantly it will be available for installation for NPM! Not only that, but you never have to resubmit version updates. Since the package repository is linked to git, any new version tags that you create on your github package repository will automatically be reflected as a new package version available for NPM installation. NPM does not need to be reconfigured at all, just run install like you would with any other package:
npm install my-new-package
When you have updates for your package that you want to designate as a new version, simply tag it in Git. And that’s it! Next time your package is installed or upgraded the newest version will be there.
The put-selector package provides a small yet powerful function for creating and manipulating the DOM through brief, familiar CSS selector syntax. CSS selectors are well understood by most front-end developers, used both for CSS and element selection through query engines. This function leverages this syntax for creating and updating elements quickly and efficiently. For example, to use the provided put() function to create a div with a class name of “foo” and append it to a parent element, we could write:
We can also update existing elements, here we add the class “updated” to an element: