{"__v":35,"_id":"56c425e12e75e01700986068","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Promise\",\n  \"body\": \"This library uses `Promise` but it is not bundled with the library. So you need to load the polyfill \\n[es6-promise](https://github.com/stefanpenner/es6-promise) before loading the plugin. You can install it by using `npm install --save es6-promise`\"\n}\n[/block]\n##CDN\n\nCSS : [https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.css](https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.css)\nJS    : [https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.js](https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.js)\n\n\n##NPM\n\n```shell\n$ npm install --save embed-js\n```\n\n##Bower\n\n```\n$ bower install --save embed-js\n```\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Bower\",\n  \"body\": \"Its preferred that you use the npm package manager as Bower support may be deprecated in future.\"\n}\n[/block]\nIf you’re using [npm](https://www.npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io/) or [Browserify](http://browserify.org/) to consume CommonJS modules, you can use the default UMD build of the plugin by simply requiring it.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var EmbedJS = require('embed-js')\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**embed.js** was developed with a modern JavaScript workflow in mind. To use it, it's recommended you have a build system in place that can transpile ES6, and bundle modules. But at the same time you get an already transpiled version to make your development easier.\n\nIn case you wan't to use the ES2015 build of the plugin, you will find that version named `embed.es2015.js`. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import EmbedJS from 'embed-js'\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"jsnext:main\",\n  \"body\": \"This plugin also contains the `jsnext:main` field in package.json that points to ES2015 build ( in case you are using [Rollup](https://github.com/rollup/rollup) module bundler )\"\n}\n[/block]","category":"56c425e02e75e01700986066","createdAt":"2016-02-17T07:48:49.246Z","excerpt":"This page will help you get started with embed.js.","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"56c425df2e75e01700986062","slug":"installation","sync_unique":"","title":"Installation","type":"basic","updates":[],"user":"561a4e3413874c0d00703931","version":"56c425df2e75e01700986065","childrenPages":[]}

Installation

This page will help you get started with embed.js.

[block:callout] { "type": "warning", "title": "Promise", "body": "This library uses `Promise` but it is not bundled with the library. So you need to load the polyfill \n[es6-promise](https://github.com/stefanpenner/es6-promise) before loading the plugin. You can install it by using `npm install --save es6-promise`" } [/block] ##CDN CSS : [https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.css](https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.css) JS : [https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.js](https://cdn.jsdelivr.net/embed.js/3.6.2/embed.min.js) ##NPM ```shell $ npm install --save embed-js ``` ##Bower ``` $ bower install --save embed-js ``` [block:callout] { "type": "warning", "title": "Bower", "body": "Its preferred that you use the npm package manager as Bower support may be deprecated in future." } [/block] If you’re using [npm](https://www.npmjs.com/) package manager with a module bundler like [Webpack](http://webpack.github.io/) or [Browserify](http://browserify.org/) to consume CommonJS modules, you can use the default UMD build of the plugin by simply requiring it. [block:code] { "codes": [ { "code": "var EmbedJS = require('embed-js')", "language": "javascript" } ] } [/block] **embed.js** was developed with a modern JavaScript workflow in mind. To use it, it's recommended you have a build system in place that can transpile ES6, and bundle modules. But at the same time you get an already transpiled version to make your development easier. In case you wan't to use the ES2015 build of the plugin, you will find that version named `embed.es2015.js`. [block:code] { "codes": [ { "code": "import EmbedJS from 'embed-js'", "language": "javascript" } ] } [/block] [block:callout] { "type": "info", "title": "jsnext:main", "body": "This plugin also contains the `jsnext:main` field in package.json that points to ES2015 build ( in case you are using [Rollup](https://github.com/rollup/rollup) module bundler )" } [/block]