#jqroom npm test
learn npm modules publish.
Installation
npm install --save jqroom
source code
module.exports = {
foo () {
return 'Hello';
},
bar () {
return 'world!';
}
}
including jqroom
Babel
Babel is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
import jqroom from "jqroom";
Browserify/Webpack
There are several ways to use Browserify and Webpack. For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
var jqroom = require("jqroom");