skypager-project-types-react
Version:
skypager react project type
85 lines (62 loc) • 15.6 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // identity function for calling harmory imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/ // define getter function for harmory exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ };
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 16);
/******/ })
/************************************************************************/
/******/ ({
/***/ 1:
/***/ function(module, exports) {
module.exports = "{\"ast\":{\"type\":\"root\",\"children\":[{\"type\":\"yaml\",\"value\":\"type: example\\nspec: true\",\"position\":{\"start\":{\"line\":1,\"column\":1,\"offset\":0},\"end\":{\"line\":4,\"column\":4,\"offset\":32},\"indent\":[1,1,1]}},{\"type\":\"heading\",\"depth\":1,\"children\":[{\"type\":\"text\",\"value\":\"Example\",\"position\":{\"start\":{\"line\":6,\"column\":3,\"offset\":36},\"end\":{\"line\":6,\"column\":10,\"offset\":43},\"indent\":[]}}],\"position\":{\"start\":{\"line\":6,\"column\":1,\"offset\":34},\"end\":{\"line\":6,\"column\":10,\"offset\":43},\"indent\":[]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"These are some introductory nodes.\",\"position\":{\"start\":{\"line\":8,\"column\":1,\"offset\":45},\"end\":{\"line\":8,\"column\":35,\"offset\":79},\"indent\":[]}}],\"position\":{\"start\":{\"line\":8,\"column\":1,\"offset\":45},\"end\":{\"line\":8,\"column\":35,\"offset\":79},\"indent\":[]}},{\"type\":\"list\",\"ordered\":false,\"start\":null,\"loose\":false,\"children\":[{\"type\":\"listItem\",\"loose\":false,\"checked\":null,\"children\":[{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"list item one\",\"position\":{\"start\":{\"line\":10,\"column\":3,\"offset\":83},\"end\":{\"line\":10,\"column\":16,\"offset\":96},\"indent\":[]}}],\"position\":{\"start\":{\"line\":10,\"column\":3,\"offset\":83},\"end\":{\"line\":10,\"column\":16,\"offset\":96},\"indent\":[]}}],\"position\":{\"start\":{\"line\":10,\"column\":1,\"offset\":81},\"end\":{\"line\":10,\"column\":16,\"offset\":96},\"indent\":[]}},{\"type\":\"listItem\",\"loose\":false,\"checked\":null,\"children\":[{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"list item two\",\"position\":{\"start\":{\"line\":11,\"column\":3,\"offset\":99},\"end\":{\"line\":11,\"column\":16,\"offset\":112},\"indent\":[]}}],\"position\":{\"start\":{\"line\":11,\"column\":3,\"offset\":99},\"end\":{\"line\":11,\"column\":16,\"offset\":112},\"indent\":[]}}],\"position\":{\"start\":{\"line\":11,\"column\":1,\"offset\":97},\"end\":{\"line\":11,\"column\":16,\"offset\":112},\"indent\":[]}}],\"position\":{\"start\":{\"line\":10,\"column\":1,\"offset\":81},\"end\":{\"line\":11,\"column\":16,\"offset\":112},\"indent\":[1]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"I Highlight some \",\"position\":{\"start\":{\"line\":13,\"column\":1,\"offset\":114},\"end\":{\"line\":13,\"column\":18,\"offset\":131},\"indent\":[]}},{\"type\":\"inlineCode\",\"value\":\"Domain Specific Words\",\"position\":{\"start\":{\"line\":13,\"column\":18,\"offset\":131},\"end\":{\"line\":13,\"column\":41,\"offset\":154},\"indent\":[]}}],\"position\":{\"start\":{\"line\":13,\"column\":1,\"offset\":114},\"end\":{\"line\":13,\"column\":41,\"offset\":154},\"indent\":[]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"And I include \",\"position\":{\"start\":{\"line\":15,\"column\":1,\"offset\":156},\"end\":{\"line\":15,\"column\":15,\"offset\":170},\"indent\":[]}},{\"type\":\"link\",\"title\":null,\"url\":\"toSomeShit\",\"children\":[{\"type\":\"text\",\"value\":\"Links\",\"position\":{\"start\":{\"line\":15,\"column\":16,\"offset\":171},\"end\":{\"line\":15,\"column\":21,\"offset\":176},\"indent\":[]}}],\"position\":{\"start\":{\"line\":15,\"column\":15,\"offset\":170},\"end\":{\"line\":15,\"column\":34,\"offset\":189},\"indent\":[]}}],\"position\":{\"start\":{\"line\":15,\"column\":1,\"offset\":156},\"end\":{\"line\":15,\"column\":34,\"offset\":189},\"indent\":[]}},{\"type\":\"heading\",\"depth\":2,\"children\":[{\"type\":\"text\",\"value\":\"Actual Input\",\"position\":{\"start\":{\"line\":17,\"column\":4,\"offset\":194},\"end\":{\"line\":17,\"column\":16,\"offset\":206},\"indent\":[]}}],\"position\":{\"start\":{\"line\":17,\"column\":1,\"offset\":191},\"end\":{\"line\":17,\"column\":17,\"offset\":207},\"indent\":[]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"This section contains code blocks. Skypager should be able to convert these into a module for us. \",\"position\":{\"start\":{\"line\":19,\"column\":1,\"offset\":209},\"end\":{\"line\":19,\"column\":99,\"offset\":307},\"indent\":[]}}],\"position\":{\"start\":{\"line\":19,\"column\":1,\"offset\":209},\"end\":{\"line\":19,\"column\":99,\"offset\":307},\"indent\":[]}},{\"type\":\"heading\",\"depth\":3,\"children\":[{\"type\":\"text\",\"value\":\"Code Sample One\",\"position\":{\"start\":{\"line\":21,\"column\":5,\"offset\":313},\"end\":{\"line\":21,\"column\":20,\"offset\":328},\"indent\":[]}}],\"position\":{\"start\":{\"line\":21,\"column\":1,\"offset\":309},\"end\":{\"line\":21,\"column\":20,\"offset\":328},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"import Skypager from 'skypager'\\nimport project from 'skypager/current'\\n\\nexport default (project) => {\\n return project\\n}\",\"position\":{\"start\":{\"line\":23,\"column\":1,\"offset\":330},\"end\":{\"line\":30,\"column\":4,\"offset\":468},\"indent\":[1,1,1,1,1,1,1]}},{\"type\":\"heading\",\"depth\":3,\"children\":[{\"type\":\"text\",\"value\":\"Code Sample Two\",\"position\":{\"start\":{\"line\":32,\"column\":5,\"offset\":474},\"end\":{\"line\":32,\"column\":20,\"offset\":489},\"indent\":[]}}],\"position\":{\"start\":{\"line\":32,\"column\":1,\"offset\":470},\"end\":{\"line\":32,\"column\":20,\"offset\":489},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"const project = require('skypager/current')\\n\\nmodule.exports = {\\n getProject() {\\n return project\\n }\\n}\",\"position\":{\"start\":{\"line\":34,\"column\":1,\"offset\":491},\"end\":{\"line\":42,\"column\":4,\"offset\":614},\"indent\":[1,1,1,1,1,1,1,1]}},{\"type\":\"heading\",\"depth\":3,\"children\":[{\"type\":\"text\",\"value\":\"Code Sample Three\",\"position\":{\"start\":{\"line\":44,\"column\":5,\"offset\":620},\"end\":{\"line\":44,\"column\":22,\"offset\":637},\"indent\":[]}}],\"position\":{\"start\":{\"line\":44,\"column\":1,\"offset\":616},\"end\":{\"line\":44,\"column\":22,\"offset\":637},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"const { project } = global\\n\\nproject.cli.print('Hello World')\",\"position\":{\"start\":{\"line\":46,\"column\":1,\"offset\":639},\"end\":{\"line\":50,\"column\":4,\"offset\":717},\"indent\":[1,1,1,1]}},{\"type\":\"heading\",\"depth\":2,\"children\":[{\"type\":\"text\",\"value\":\"Specs\",\"position\":{\"start\":{\"line\":52,\"column\":4,\"offset\":722},\"end\":{\"line\":52,\"column\":9,\"offset\":727},\"indent\":[]}}],\"position\":{\"start\":{\"line\":52,\"column\":1,\"offset\":719},\"end\":{\"line\":52,\"column\":10,\"offset\":728},\"indent\":[]}},{\"type\":\"heading\",\"depth\":3,\"children\":[{\"type\":\"text\",\"value\":\"Querying the markdown AST\",\"position\":{\"start\":{\"line\":54,\"column\":5,\"offset\":734},\"end\":{\"line\":54,\"column\":30,\"offset\":759},\"indent\":[]}}],\"position\":{\"start\":{\"line\":54,\"column\":1,\"offset\":730},\"end\":{\"line\":54,\"column\":31,\"offset\":760},\"indent\":[]}},{\"type\":\"heading\",\"depth\":4,\"children\":[{\"type\":\"text\",\"value\":\"Get all of the heading nodes\",\"position\":{\"start\":{\"line\":56,\"column\":6,\"offset\":767},\"end\":{\"line\":56,\"column\":34,\"offset\":795},\"indent\":[]}}],\"position\":{\"start\":{\"line\":56,\"column\":1,\"offset\":762},\"end\":{\"line\":56,\"column\":35,\"offset\":796},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"const headingNodes = doc.selectHeadingNodes()\\nheadingNodes.should.not.be.empty\",\"position\":{\"start\":{\"line\":58,\"column\":1,\"offset\":798},\"end\":{\"line\":61,\"column\":4,\"offset\":894},\"indent\":[1,1,1]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"You can even pass a test function\",\"position\":{\"start\":{\"line\":63,\"column\":1,\"offset\":896},\"end\":{\"line\":63,\"column\":34,\"offset\":929},\"indent\":[]}}],\"position\":{\"start\":{\"line\":63,\"column\":1,\"offset\":896},\"end\":{\"line\":63,\"column\":34,\"offset\":929},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"const filtered = doc.selectHeadingNodes(n => n.depth > 3)\\n\\nfiltered.should.not.be.empty\",\"position\":{\"start\":{\"line\":65,\"column\":1,\"offset\":931},\"end\":{\"line\":69,\"column\":4,\"offset\":1036},\"indent\":[1,1,1,1]}},{\"type\":\"heading\",\"depth\":4,\"children\":[{\"type\":\"text\",\"value\":\"Get all of the code blocks\",\"position\":{\"start\":{\"line\":71,\"column\":6,\"offset\":1043},\"end\":{\"line\":71,\"column\":32,\"offset\":1069},\"indent\":[]}}],\"position\":{\"start\":{\"line\":71,\"column\":1,\"offset\":1038},\"end\":{\"line\":71,\"column\":32,\"offset\":1069},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"const jsNodes = doc.selectCodeBlocks('javascript')\\njsNodes.should.not.be.empty\",\"position\":{\"start\":{\"line\":73,\"column\":1,\"offset\":1071},\"end\":{\"line\":76,\"column\":4,\"offset\":1167},\"indent\":[1,1,1]}},{\"type\":\"heading\",\"depth\":2,\"children\":[{\"type\":\"text\",\"value\":\"Setup\",\"position\":{\"start\":{\"line\":78,\"column\":4,\"offset\":1172},\"end\":{\"line\":78,\"column\":9,\"offset\":1177},\"indent\":[]}}],\"position\":{\"start\":{\"line\":78,\"column\":1,\"offset\":1169},\"end\":{\"line\":78,\"column\":10,\"offset\":1178},\"indent\":[]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"This code will be run once at the beginning of the document context initialization\",\"position\":{\"start\":{\"line\":80,\"column\":1,\"offset\":1180},\"end\":{\"line\":80,\"column\":83,\"offset\":1262},\"indent\":[]}}],\"position\":{\"start\":{\"line\":80,\"column\":1,\"offset\":1180},\"end\":{\"line\":80,\"column\":83,\"offset\":1262},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"import React from 'react'\\nimport ReactDOM from 'react-dom'\",\"position\":{\"start\":{\"line\":82,\"column\":1,\"offset\":1264},\"end\":{\"line\":85,\"column\":4,\"offset\":1340},\"indent\":[1,1,1]}},{\"type\":\"heading\",\"depth\":2,\"children\":[{\"type\":\"text\",\"value\":\"Teardown\",\"position\":{\"start\":{\"line\":87,\"column\":4,\"offset\":1345},\"end\":{\"line\":87,\"column\":12,\"offset\":1353},\"indent\":[]}}],\"position\":{\"start\":{\"line\":87,\"column\":1,\"offset\":1342},\"end\":{\"line\":87,\"column\":12,\"offset\":1353},\"indent\":[]}},{\"type\":\"paragraph\",\"children\":[{\"type\":\"text\",\"value\":\"This code will be run at the end of each run \",\"position\":{\"start\":{\"line\":89,\"column\":1,\"offset\":1355},\"end\":{\"line\":89,\"column\":46,\"offset\":1400},\"indent\":[]}}],\"position\":{\"start\":{\"line\":89,\"column\":1,\"offset\":1355},\"end\":{\"line\":89,\"column\":46,\"offset\":1400},\"indent\":[]}},{\"type\":\"code\",\"lang\":\"javascript\",\"value\":\"delete(global.$currentDocument)\",\"position\":{\"start\":{\"line\":91,\"column\":1,\"offset\":1402},\"end\":{\"line\":93,\"column\":4,\"offset\":1451},\"indent\":[1,1]}}],\"position\":{\"start\":{\"line\":1,\"column\":1,\"offset\":0},\"end\":{\"line\":93,\"column\":4,\"offset\":1451}}},\"meta\":{\"type\":\"example\",\"spec\":true},\"contents\":\"---\\ntype: example\\nspec: true\\n---\\n\\n# Example\\n\\nThese are some introductory nodes.\\n\\n- list item one\\n- list item two\\n\\nI Highlight some `Domain Specific Words`\\n\\nAnd I include [Links](toSomeShit)\\n\\n## Actual Input \\n\\nThis section contains code blocks. Skypager should be able to convert these into a module for us. \\n\\n### Code Sample One\\n\\n```javascript\\nimport Skypager from 'skypager'\\nimport project from 'skypager/current'\\n\\nexport default (project) => {\\n return project\\n}\\n```\\n\\n### Code Sample Two\\n\\n```javascript\\nconst project = require('skypager/current')\\n\\nmodule.exports = {\\n getProject() {\\n return project\\n }\\n}\\n```\\n\\n### Code Sample Three\\n\\n```javascript\\nconst { project } = global\\n\\nproject.cli.print('Hello World')\\n```\\n\\n## Specs \\n\\n### Querying the markdown AST \\n\\n#### Get all of the heading nodes \\n\\n```javascript\\nconst headingNodes = doc.selectHeadingNodes()\\nheadingNodes.should.not.be.empty\\n```\\n\\nYou can even pass a test function\\n\\n```javascript\\nconst filtered = doc.selectHeadingNodes(n => n.depth > 3)\\n\\nfiltered.should.not.be.empty\\n```\\n\\n#### Get all of the code blocks\\n\\n```javascript\\nconst jsNodes = doc.selectCodeBlocks('javascript')\\njsNodes.should.not.be.empty\\n```\\n\\n## Setup \\n\\nThis code will be run once at the beginning of the document context initialization\\n\\n```javascript\\nimport React from 'react'\\nimport ReactDOM from 'react-dom'\\n```\\n\\n## Teardown\\n\\nThis code will be run at the end of each run \\n\\n```javascript\\ndelete(global.$currentDocument)\\n```\",\"path\":\"/Users/jonathan/Skypager/packages/skypager-react-project/EXAMPLE.spec.md\",\"query\":{}}"
/***/ },
/***/ 16:
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1);
/***/ }
/******/ });