├── .eslintrc ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── dist ├── index.d.ts ├── index.esm.js ├── index.esm.js.map ├── index.js └── index.js.map ├── json.d.ts ├── package.json ├── rollup.config.js ├── src └── index.ts └── tsconfig.json /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "browser": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parser": "typescript-eslint-parser", 8 | "parserOptions": { 9 | "ecmaVersion": 2018 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .localized 3 | node_modules 4 | .vscode 5 | npm-debug.log 6 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Geoffrey Goodman 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plunker SDK 2 | 3 | A set of tools for interacting with the Plunker platform that allow you to: 4 | 5 | 1. Generate dynamic embedded Plunks and show these in target frames or mount these in target DOM elements. 6 | 7 | ## Usage 8 | 9 | Mount the embedded view of Plunker inside the 'embed' element with custom files, title and tags 10 | 11 | ```js 12 | import { showDynamicEmbed } from '@plnkr/sdk'; 13 | 14 | // Generate the files for the dynamic plunk. This could easily 15 | // be generated on the fly by your application. 16 | const files = [ 17 | { 18 | pathname: 'index.html', 19 | content: '