├── .gitignore
├── .vscode
├── keybindings.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CONTRIBUTING.md
├── README.md
├── aesop-0.1.0.vsix
├── out
├── extension.js
├── extension.js.map
├── src
│ ├── extension.js
│ ├── extension.js.map
│ └── test
│ │ ├── runTest.js
│ │ ├── runTest.js.map
│ │ └── suite
│ │ ├── extension.test.js
│ │ ├── extension.test.js.map
│ │ ├── index.js
│ │ └── index.js.map
├── test.js
├── test.js.map
└── test
│ ├── runTest.js
│ ├── runTest.js.map
│ └── suite
│ ├── extension.test.js
│ ├── extension.test.js.map
│ ├── index.js
│ └── index.js.map
├── package-lock.json
├── package.json
├── resources
└── Aesop128x128.png
├── samples
├── React_Sample
│ ├── .babelrc
│ ├── .eslintrc.js
│ ├── .storybook
│ │ └── config.js
│ ├── client
│ │ ├── components
│ │ │ ├── CharacterCard.jsx
│ │ │ ├── CharacterCard.stories.js
│ │ │ ├── CreateCharacter.jsx
│ │ │ ├── CreateCharacter.stories.js
│ │ │ ├── Task.js
│ │ │ ├── Task.stories.js
│ │ │ ├── TaskList.js
│ │ │ ├── TaskList.stories.js
│ │ │ └── index.css
│ │ └── data
│ │ │ ├── films.json
│ │ │ ├── planets.json
│ │ │ └── species.json
│ ├── package-lock.json
│ └── package.json
└── Vue_Sample
│ ├── .storybook
│ ├── config.js
│ └── main.js
│ ├── package-lock.json
│ ├── package.json
│ └── src
│ ├── App.vue
│ ├── components
│ ├── EmployeeForm.js
│ ├── EmployeeForm.stories.js
│ ├── EmployeeForm.vue
│ ├── EmployeeTable.js
│ ├── EmployeeTable.stories.js
│ ├── EmployeeTable.vue
│ ├── HelloWorld.vue
│ └── index.css
│ └── main.js
├── src
├── extension.ts
├── processes
│ ├── commands.ts
│ └── process.service.ts
├── test
│ ├── runTest.ts
│ └── suite
│ │ ├── extension.test.ts
│ │ └── index.ts
├── utils
│ ├── logger.ts
│ └── sbChecks.ts
└── webview
│ └── create-webview.ts
├── tsconfig.json
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .gitignore
2 | /node_modules
3 |
4 | #ignore dist folder
5 | /dist
6 |
7 | #ignore out
8 | /out
9 |
10 | #ignore react node modules
11 | /samples/React_Sample/
12 | /samples/Vue_Sample/
--------------------------------------------------------------------------------
/.vscode/keybindings.json:
--------------------------------------------------------------------------------
1 |
2 | [{
3 | "key": "ctrl+k a",
4 | "mac": "cmd+k a",
5 | "command": "extension.aesopAwaken"
6 | }]
7 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "node",
11 | "request": "launch",
12 | "runtimeExecutable": "${execPath}",
13 | "args": [
14 | "--extensionDevelopmentPath=${workspaceFolder}"
15 | ],
16 | "outFiles": [
17 | "${workspaceFolder}/dist/**/*.js"
18 | ],
19 | "preLaunchTask": "${defaultBuildTask}"
20 | },
21 | {
22 | "name": "Extension Tests",
23 | "type": "extensionHost",
24 | "request": "launch",
25 | "runtimeExecutable": "${execPath}",
26 | "args": [
27 | "--extensionDevelopmentPath=${workspaceFolder}",
28 | "--extensionTestsPath=${workspaceFolder}/out/test/"
29 | ],
30 | "outFiles": [
31 | "${workspaceFolder}/out/test/**/*.js"
32 | ],
33 | "preLaunchTask": "test-compile"
34 | }
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off",
11 | "git.ignoreLimitWarning": true
12 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "webpack",
9 | "problemMatcher": "$tsc-watch",
10 | "isBackground": true,
11 | "presentation": {
12 | "reveal": "never"
13 | },
14 | "group": {
15 | "kind": "build",
16 | "isDefault": true
17 | }
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | node_modules
3 | out/
4 | src/
5 | tsconfig.json
6 | webpack.config.js
7 | .gitignore
8 | vsc-extension-quickstart.md
9 | **/tsconfig.json
10 | **/tslint.json
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing To Aesop for Storybook
2 |
3 | Thanks for your consideration on contributing to Aesop for Storybook! Each contribution helps make using Aesop for Storybook a better experience for everyone.
4 |
5 | Aesop for Storybook is an open source project and thrives on community contributions! These contributions can come in many forms-- anywhere from improving documentation to submitting bug reports and feature requests.
6 |
7 | We are also open to any code contributions that can be assimilated into the extension itself! For inspiration, take a look at our roadmap below.
8 |
9 | ## First Time Contributing?
10 |
11 | First time contributing to an open source project? You can learn more [here!](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
12 |
13 | Now, you’re ready to contribute.
14 |
15 | ## Getting Started
16 |
17 | If you find an area where you want to contribute, please fork the repository and create a branch with a descriptive name.
18 |
19 | A good branch name would be (where issue #234 is the ticket you're working on):
20 | `git checkout -b 234-add-treeview`
21 |
22 | Afterwards, if you feel like this contribution might help the project, feel free to send a pull request.
23 |
24 | ## Testing and Debugging Locally
25 |
26 | After forking and cloning the repository, open the folder in VS Code. Make sure that your root directory is the Aesop folder. Once there, you can launch the VS Code built-in debugger using the shortcut F5. You can learn more about this [here](https://code.visualstudio.com/docs/editor/debugging)
27 |
28 | After pressing F5, VS Code will build the extension and launch an Extension Development Host window as seen below. In order to test the extension, you will need to open a Storybook project as your root directory in VS Code, making sure that Storybook is a dependency in your node modules folder.
29 |
30 | 
31 |
32 | Once you've gotten everything set up, you can launch Aesop's webview by selecting 'Aesop Awaken' from the command palette *(CTRL+SHIFT+P)* or using the shortcut *(CTRL K+A)*.
33 |
34 | You can also make use of VS Code's Webview Developer tools by selecting them in the command palette.
35 |
36 | 
37 |
38 | Closing the Extension Development Host will also close all Aesop child processes and Storybook instances run within it.
39 |
40 | However, be mindful. **The Extension Development Host will run the LAST WORKING VERSION of the extension. This means if you've introduced breaking changes, the version you're seeing might not be running the code you think.** To get around this, we usually implement a sort of hack-around solution by including a text counter as an HTML element within the web-view, changing it as we iterate. ...There's probably a better solution to this, but it's been working thus far.
41 |
42 | ## How to Report a Bug
43 |
44 | If you find a security vulnerability, please do NOT open an issue. Send a message to AesopStorybook@gmail.com instead.
45 |
46 | When filing an issue, make sure to answer these questions:
47 |
48 | 1. What version of VS Code are you using?
49 | 2. What version of Storybook are you using for your project?
50 | 3. What operating system and processor architecture are you using?
51 | 4. What did you do? Please also include the following details:
52 | a. Was Storybook currently running before you launched the extension command?
53 | b. Did you have a port flag defined in your package.json storybook script?
54 | 5. What did you expect to see?
55 | 6. What did you see instead?
56 |
57 | ## How to Suggest a Feature
58 |
59 | Aesop’s philosophy is to provide a seamless developer experience for using Storybook within VS Code. We want to keep the extension as light weight and easy to use as possible out of the box.
60 |
61 | If you think of any feature that you might like to see in Aesop for Storybook, please open an issue on our issues list on Github describing the feature you’d like to see, why you need it, and how it should work.
62 |
63 | ## Roadmap
64 |
65 | 1. Fine-tuning windows compatibility for all developer workflows
66 | a. Storybook is already running w/ port flag defined in npm run storybook script(*working*)
67 | b. Storybook is already running w/o port flag defined
68 | (*working*)
69 | c. Storybook is not currently running w/ port flag defined (*not working*)
70 | d. Storybook is not currently running w/o port flag defined (*not working*)
71 |
72 | 2. Add cross-platform testing.
73 |
74 | 3. Separate Storybook Manager from Preview iframe, replacing it with a vscode tree-view allowing you to interact with the Storybook preview from within the vscode explorer menu.
75 |
76 | ## Code Review Process
77 |
78 | Under Construction
79 |
80 | ## Community
81 |
82 | Under Construction
83 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # AESOP
4 | Meet Aesop: the lightweight Storybook preview extension.
5 |
6 | This humble helper displays your Storybook alongside a codebase for more responsive workflow. It integrates with existing Storybook addons and features, and it is optimized to use minimal system resources.
7 |
8 | ## Screenshots
9 | 
10 |
11 | Here we activate the "Aesop Awaken" command from the command palette to jumpstart the initialization process that checks whether your storybook is currently running. In this case, we have already run a Storybook server from the command line, so Aesop dynamically selects the port where the content is being served and displays it in a webview.
12 |
13 | ## Features
14 | If you are working in a project folder on a Storybook-enabled application, Aesop will run a Storybook process at startup and display the same suite you're used to right inside Visual Studio Code as an attached Node child process.
15 |
16 | Or, if you're used to starting up your Storybook from the CLI with additional arguments, Aesop won't impede your workflow — it understands Node processes, and will happily retrieve your running Storybook.
17 |
18 | ## How To Use The Extension
19 | Simply install the extension from the Visual Studio Code Marketplace and open a project folder with a Storybook dependency as your main workspace folder.
20 |
21 | Then you can start previewing Storybook directly in your editor after following a few steps:
22 |
23 | First, execute the 'Aesop Awaken' command from the command palette, or by using the shortcut keybinding.
24 |
25 | From here, Aesop checks to see whether or not you currently have a Storybook process running.
26 |
27 | If it does not find a Storybook process, it will spin up a new instance of Storybook using your npm script within your package.json, along with any arguments you've supplied.
28 |
29 | If it does find a Storybook process, it dynamically captures the location in which the content is being served and displays it within a webview directly in your IDE.
30 |
31 | ## Requirements
32 | Aesop only depends on the ps-node library. This is used to simplify certain lookup functions while accessing running Node processes, but will likely be removed in a future version to make Aesop dependency-free.
33 |
34 | If your system does not support Netstat, you may experience some issues using this beta release.
35 |
36 | ## Extension Settings
37 | Because Aesop is lightweight, it is also minimal config. It contributes one hotkey command chord to activate: CTRL / CMD K + A
38 |
39 | The Aesop team aims to provide further customization options and improved UI integration within Visual Studio Code as development continues.
40 |
41 | ## Release Notes
42 | Please contact the developers at https://github.com/storybookjs/vs-code-plugin with comments, questions, and any features you would like to see in a future version of Aesop.
43 |
44 | ## Known Issues
45 | On Windows, you MUST have Storybook already running for Aesop to work. We are currently tackling this issue and expect it to be resolved soon.
46 |
47 | ### 0.1.0
48 | Aesop is pleased to make your acquaintance.
49 |
50 | If you are downloading the repository to play with Aesop's code, you may need to install dependencies for the sample React and Vue component files before use. Happy testing!
51 |
--------------------------------------------------------------------------------
/aesop-0.1.0.vsix:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/storybookjs/vs-code-plugin/4e3eb00ad58c45b52fd5da4cb2e7e7e07c230dba/aesop-0.1.0.vsix
--------------------------------------------------------------------------------
/out/extension.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const vscode = require("vscode");
4 | const url_1 = require("url");
5 | const path = require("path");
6 | const fs = require("fs");
7 | const ps = require("ps-node");
8 | const child_process = require("child_process");
9 | const events = require("events");
10 | const os = require("os");
11 | function activate(context) {
12 | //define PORT and host variables to feed the webview content from SB server
13 | let PORT;
14 | let host = 'localhost'; //arl
15 | const aesopEmitter = new events.EventEmitter();
16 | let emittedAesop = false;
17 | const platform = os.platform();
18 | const commands = {
19 | linux: {
20 | cmd: 'netstat',
21 | args: ['-apntu'],
22 | },
23 | darwin: {
24 | cmd: 'netstat',
25 | args: ['-v', '-n', '-p', 'tcp'],
26 | },
27 | win32: {
28 | cmd: 'netstat.exe',
29 | args: ['-a', '-n', '-o'],
30 | },
31 | };
32 | const command = commands[platform];
33 | let instances = 0;
34 | //@TODO: if aesop already opened sb in webview - subsequent calls to aesop should not open a new webview
35 | //set context "aesop-awake" to true; enabling views
36 | vscode.commands.executeCommand("setContext", "aesop-awake", true);
37 | //create the status bar to let the user know what Aesop is doing
38 | const statusText = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 7);
39 | statusText.text = "Aesop is finding your Storybook dependency...";
40 | statusText.color = "#FFFFFF";
41 | statusText.command = undefined;
42 | statusText.tooltip = "Aesop status";
43 | //create disposable to register Aesop Awaken command to subscriptions
44 | let disposable = vscode.commands.registerCommand('extension.aesopAwaken', () => {
45 | statusText.show();
46 | //declare variable to toggle whether a running SB process was found
47 | let foundSb = false;
48 | //define a path to the user's root working directory
49 | const rootDir = url_1.fileURLToPath(vscode.workspace.workspaceFolders[0].uri.toString(true));
50 | //first test whether Storybook has been depended into your application
51 | fs.access(path.join(rootDir, '/node_modules/@storybook'), (err) => {
52 | //if the filepath isn't found, show the user what Aesop is reading as the root path
53 | if (err) {
54 | vscode.window.showErrorMessage(`Aesop could not find Storybook as a dependency in the active folder, ${rootDir}`);
55 | throw new Error('Error finding a storybook project');
56 | }
57 | else {
58 | statusText.text = "Aesop found a Storybook project.";
59 | //check to see if a storybook node process is already running
60 | ps.lookup({
61 | command: 'node',
62 | psargs: 'ux'
63 | }, (err, resultList) => {
64 | if (err) {
65 | vscode.window.showErrorMessage(`Failed looking for running Node processes. Error: ${err}`);
66 | statusText.dispose();
67 | throw new Error('Failed looking for running Node processes.');
68 | }
69 | else {
70 | //notify the user that Aesop is checking for a running Storybook instances
71 | statusText.text = `Reviewing Node processes...`;
72 | //if the process lookup was able to find running processes, iterate through to review them
73 | resultList.forEach((process) => {
74 | //check if any running processes are Storybook processes
75 | //stretch feature: check for multiple instances of storybook and reconcile
76 | if (process.arguments[0].includes('node_modules') && process.arguments[0].includes('storybook')) {
77 | //if so, extract port number and use that value to populate the webview with that contents
78 | const pFlagIndex = process.arguments.indexOf('-p');
79 | //also grab the process id to use netstat in the else condition
80 | const processPid = parseInt(process['pid']).toString();
81 | //if a port flag has been defined in the process args, retrieve the user's config
82 | if (pFlagIndex !== -1) {
83 | PORT = parseInt(process.arguments[pFlagIndex + 1]);
84 | aesopEmitter.emit('sb_on');
85 | return;
86 | }
87 | else {
88 | //if no port flag defined, dynamically retrieve port with netstat
89 | const netStatProcess = child_process.spawn(command.cmd, command.args);
90 | const grepProcess = child_process.spawn('grep', [processPid]);
91 | netStatProcess.stdout.pipe(grepProcess.stdin);
92 | grepProcess.stdout.setEncoding('utf8');
93 | grepProcess.stdout.on('data', (data) => {
94 | const parts = data.split(/\s/).filter(String);
95 | //@TODO: refactor for platform specific or grab port dynamically
96 | const partIndex = (platform === 'win32') ? 1 : 3;
97 | console.log(parts);
98 | PORT = parseInt(parts[partIndex].replace(/[^0-9]/g, ''));
99 | aesopEmitter.emit('sb_on');
100 | process.send('killNet');
101 | process.send('killGrep');
102 | return;
103 | });
104 | process.on('killGrep', () => {
105 | console.log(`Killed Grep`);
106 | grepProcess.kill();
107 | });
108 | netStatProcess.on('killNet', () => {
109 | console.log(`Killed Net`);
110 | netStatProcess.kill();
111 | });
112 | netStatProcess.stdout.on('exit', (code) => {
113 | vscode.window.showInformationMessage(`Netstat ended with ${code}`);
114 | });
115 | grepProcess.stdout.on('exit', (code) => {
116 | vscode.window.showInformationMessage(`Grep ended with ${code}`);
117 | });
118 | }
119 | //set foundSb to true to prevent our function from running another process
120 | foundSb = true;
121 | //once port is known, fire event emitter to instantiate webview
122 | statusText.text = `Retrieving running Storybook process...`;
123 | } //---> close if process.arguments[0] contains storybook
124 | }); //---> close resultList.forEach()
125 | //having checked running Node processes, set that variable to true
126 | //if no processes matched 'storybook', we will have to spin up the storybook server
127 | if (foundSb === false) {
128 | //starts by checking for/extracting any port flags from the SB script in the package.json
129 | fs.readFile(path.join(rootDir, 'package.json'), (err, data) => {
130 | if (err) {
131 | vscode.window.showErrorMessage(`Aesop is attempting to read ${rootDir}. Is there a package.json file here?`);
132 | statusText.dispose();
133 | }
134 | else {
135 | statusText.text = `Checking package.json...`;
136 | //enter the package.JSON file and retrieve its contents as an object
137 | let packageJSON = JSON.parse(data.toString());
138 | let storybookScript = packageJSON.scripts.storybook;
139 | //iterate through the text string (stored on "storybook" key) and parse out port flag
140 | //it is more helpful to split it into an array separated by whitespace to grab this
141 | let retrievedScriptArray = storybookScript.split(' ');
142 | //@TODO if script already includes --ci, no need to add it
143 | //older Windows systems support here: check platform, change process command accordingly
144 | let platform = os.platform();
145 | const sbCLI = './node_modules/.bin/start-storybook';
146 | const sbStartIndex = retrievedScriptArray.indexOf('start-storybook');
147 | retrievedScriptArray[sbStartIndex] = sbCLI;
148 | retrievedScriptArray.push('--ci');
149 | //now launch the child process on the port you've derived
150 | const childProcessArguments = (platform === 'win32') ? ['run', 'storybook'] : retrievedScriptArray;
151 | const childProcessCommand = (platform === 'win32') ? 'npm.cmd' : 'node';
152 | const runSb = child_process.spawn(childProcessCommand, childProcessArguments, { cwd: rootDir, detached: true, env: process.env, windowsHide: false, windowsVerbatimArguments: true });
153 | // if (platform === 'win32') {
154 | // let runSb = child_process.spawn('npm.cmd', ['run', 'storybook'], {cwd: rootDir, detached: true, env: process.env, windowsHide: false, windowsVerbatimArguments: true });
155 | // } else {
156 | // let runSb = child_process.spawn('node', retrievedScriptArray, {cwd: rootDir, detached: false, env: process.env });
157 | // }
158 | statusText.text = `Done looking. Aesop will now launch Storybook in the background.`;
159 | runSb.stdout.setEncoding('utf8');
160 | let counter = 0;
161 | //Storybook outputs three messages to the terminal as it spins up
162 | //grab the port from the last message to listen in on the process
163 | runSb.stdout.on('data', (data) => {
164 | if (emittedAesop === true)
165 | return;
166 | let str = data.toString().split(" ");
167 | counter += 1;
168 | if (counter >= 2) {
169 | for (let i = 165; i < str.length; i += 1) {
170 | if (str[i].includes('localhost')) {
171 | const path = str[i];
172 | const regExp = (/[^0-9]/g);
173 | PORT = (path.replace(regExp, ""));
174 | emittedAesop = true;
175 | aesopEmitter.emit('sb_on');
176 | return;
177 | }
178 | }
179 | }
180 | });
181 | runSb.on('error', (err) => {
182 | console.log(err);
183 | process.exit(1);
184 | });
185 | //make sure the child process is terminated on process exit
186 | runSb.on('exit', (code) => {
187 | console.log(`child process exited with code ${code}`);
188 | });
189 | }
190 | });
191 | } //close spin up server
192 | }
193 | ; //CLOSE else psLookup
194 | }); //close ps LOOKUP //close depend found, not checked processes
195 | } //close else statement in fs.access
196 | }); //close fs access
197 | aesopEmitter.on('sb_on', () => {
198 | createAesopOnce(PORT, host);
199 | });
200 | const createAesopOnce = once(createAesop);
201 | function once(func) {
202 | return function addedOnce(...args) {
203 | if (instances < 1) {
204 | instances += 1;
205 | const panel = func(...args);
206 | panel.onDidDispose(() => {
207 | vscode.window.showInformationMessage(`We got a disposed`);
208 | instances = 0;
209 | }, null, context.subscriptions);
210 | return;
211 | }
212 | vscode.window.showInformationMessage(`Aesop has already been run`);
213 | throw new Error();
214 | };
215 | }
216 | function createAesop(PORT, host) {
217 | statusText.hide();
218 | vscode.window.showInformationMessage(`Welcome to Aesop Storybook`);
219 | const panel = vscode.window.createWebviewPanel('aesop-sb', 'Aesop', vscode.ViewColumn.Beside, {
220 | enableCommandUris: true,
221 | enableScripts: true,
222 | portMapping: [{
223 | webviewPort: PORT,
224 | extensionHostPort: PORT
225 | }],
226 | localResourceRoots: [vscode.Uri.file(context.extensionPath)],
227 | });
228 | panel.webview.html = `
229 |
230 |
231 |
232 |
233 |
234 | Aesop
235 |
239 |
240 |
241 |
242 |
243 | `;
244 | // panel.onDidDispose(() => {
245 | // vscode.window.showInformationMessage(`We got a disposed`);
246 | // },
247 | // null,
248 | // context.subscriptions)
249 | return panel;
250 | } // close createAesop helper function
251 | }); //close disposable
252 | context.subscriptions.push(disposable);
253 | }
254 | exports.activate = activate;
255 | function deactivate() {
256 | process.exit();
257 | }
258 | exports.deactivate = deactivate;
259 | //# sourceMappingURL=extension.js.map
--------------------------------------------------------------------------------
/out/extension.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AACjC,6BAAoC;AACpC,6BAA6B;AAC7B,yBAAyB;AACzB,8BAA8B;AAC9B,+CAA+C;AAC/C,iCAAiC;AACjC,y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,KAAK,EAAE,CAAA;YAElB,CAAC,CAAA;QACF,CAAC;QAED,SAAS,WAAW,CAAC,IAAI,EAAE,IAAI;YAC9B,UAAU,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,4BAA4B,CAAC,CAAC;YACnE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAC7C,UAAU,EACV,OAAO,EACP,MAAM,CAAC,UAAU,CAAC,MAAM,EACxB;gBACC,iBAAiB,EAAE,IAAI;gBACvB,aAAa,EAAE,IAAI;gBACnB,WAAW,EAAE,CAAC;wBACb,WAAW,EAAE,IAAI;wBACjB,iBAAiB,EAAE,IAAI;qBACvB,CAAC;gBACF,kBAAkB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;aAC5D,CACD,CAAC;YAEF,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG;;;;;;;;;;;;;2BAaG,IAAI,IAAI,IAAI;;WAE5B,CAAA;YAGR,6BAA6B;YAC7B,8DAA8D;YAC9D,OAAO;YACP,UAAU;YACV,2BAA2B;YAE3B,OAAO,KAAK,CAAC;QACd,CAAC,CAAC,oCAAoC;IAIvC,CAAC,CAAC,CAAC,CAAC,kBAAkB;IAEtB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AA7SD,4BA6SC;AAGD,SAAgB,UAAU;IACzB,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAFD,gCAEC"}
--------------------------------------------------------------------------------
/out/src/extension.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const vscode = require("vscode");
4 | const express = require("express");
5 | //port should be variable to listen for action in the user's active terminal
6 | const PORT = 6006;
7 | const server = express();
8 | function activate(context) {
9 | server.get('/', (req, res) => {
10 | vscode.window.showInformationMessage('Aesop server online');
11 | res.end();
12 | });
13 | server.listen(PORT);
14 | //create disposable variable type, registers awaken command & opens webview
15 | let disposable = vscode.commands.registerCommand('extension.aesopAwaken', () => {
16 | const panel = vscode.window.createWebviewPanel('aesop-sb', 'Aesop', vscode.ViewColumn.Beside, {
17 | enableScripts: true,
18 | portMapping: [
19 | //should extensionHostPort be variable to enable remote machine access?
20 | //PORT is presently undefined
21 | //how to use express with a d.ts file
22 | { webviewPort: PORT, extensionHostPort: PORT }
23 | ],
24 | // (!) look in to workspace file system access
25 | localResourceRoots: [vscode.Uri.file(context.extensionPath)]
26 | });
27 | //{
28 | //also register this command at startup to crawl the file path
29 | // ${vscode.commands.executeCommand('extension.getStories')}
30 | // vscode.window.showInformationMessage('Aesop is reading from your Storybook.');
31 | //
32 | //access the first opened folder of the workspace array
33 | //a potentially problematic assumption in multi-folder workspaces
34 | const rootPath = vscode.workspace.workspaceFolders[0];
35 | //define a path to SB webpack bundle outputs (in user workspace /node_modules/ folder)
36 | const distGlob = new vscode.RelativePattern(rootPath, "*/node_modules/@storybook/core/dist/public/");
37 | //instantiate a watcher to listen for fs path changes (e.g. file creation/update)
38 | //bools = options for ignoreCreateEvents?, ignoreChangeEvents?, ignoreDeleteEvents?
39 | const observer = vscode.workspace.createFileSystemWatcher(distGlob, false, false, true);
40 | // observer.onDidChange = /*resolve*/;
41 | // observer.onDidCreate = /*resolve*/;
42 | //extract the index.html file that outputs into SB's preview pane
43 | const htmlGlob = new vscode.RelativePattern(rootPath, "*/node_modules/@storybook/core/dist/public/*.html");
44 | //extract the necessary bundle scripts to leverage in-app dependencies
45 | const scriptGlob = new vscode.RelativePattern(rootPath, "*/node_modules/@storybook/core/dist/public/*.js");
46 | //do we need to resolve the Storybook UI script from the /dll/ folder?
47 | //if extract methods above fail, determine logic to parse out HTML/.js scripts (index 0?);
48 | //retrieve files with findFiles/relativeFilePath
49 | const arrayOfScripts = vscode.workspace.findFiles(distGlob, null, 100);
50 | //dev check: have we successfully pulled down script files?
51 | //if so, should we then store them locally, or is there no point?
52 | if (arrayOfScripts !== undefined) {
53 | vscode.window.showInformationMessage("Hey, dog: " + arrayOfScripts);
54 | }
55 | //use retrieved info to fill out our HTML template inside the webview
56 | //figure out how to use a tsx rule in webpack
57 | //signal to babel to interpret this block as tsx, e.g.
58 | //something like: @ tsx babel// (to determine syntax)
59 | //a toggle for the background -> black if no stories to show
60 | const backgroundColor = (rootPath === undefined) ? "black" : "white";
61 | panel.webview.html =
62 | `
63 |
64 |
65 |
66 |
67 | Aesop
68 |
73 |
74 |
75 |
78 |
79 |
80 |
81 | `;
82 | // vscode.window.showInformationMessage(`Aesop is ready to chronicle your stories!\n\nPlease use a command to begin: ${vscode.commands.getCommands(true)}`);
83 | });
84 | //subscribe this extension to the disposable
85 | context.subscriptions.push(disposable);
86 | //break up subscription pushes, and register each command sequentially.
87 | //this lets us overwrite "disposable," avoiding creation of unnecessary variables
88 | disposable = vscode.commands.registerCommand('extension.tollTheHour', () => {
89 | const nowadays = new Date(Date.now()).toTimeString();
90 | vscode.window.showInformationMessage(`The hour tolls: ${nowadays}`);
91 | });
92 | context.subscriptions.push(disposable);
93 | disposable = vscode.commands.registerCommand('extension.getStories', () => {
94 | //build a command that retrieves Storybook files on startup
95 | //can be executed later if Storybook server is spun up after the extension opens
96 | vscode.window.showInformationMessage(`Aesop has read the script in your webview HTML!`);
97 | });
98 | context.subscriptions.push(disposable);
99 | }
100 | exports.activate = activate;
101 | function deactivate() {
102 | }
103 | exports.deactivate = deactivate;
104 | //# sourceMappingURL=extension.js.map
--------------------------------------------------------------------------------
/out/src/extension.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"extension.js","sourceRoot":"","sources":["../../src/extension.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AACjC,mCAAmC;AAGnC,4EAA4E;AAC5E,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,MAAM,MAAM,GAAG,OAAO,EAAE,CAAC;AAEzB,SAAgB,QAAQ,CAAC,OAAgC;IAC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AAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAEvC,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,sBAAsB,EAAE,GAAG,EAAE;QACzE,2DAA2D;QAC3D,gFAAgF;QAEhF,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,iDAAiD,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AAhHD,4BAgHC;AAED,SAAgB,UAAU;AAE1B,CAAC;AAFD,gCAEC"}
--------------------------------------------------------------------------------
/out/src/test/runTest.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4 | return new (P || (P = Promise))(function (resolve, reject) {
5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8 | step((generator = generator.apply(thisArg, _arguments || [])).next());
9 | });
10 | };
11 | Object.defineProperty(exports, "__esModule", { value: true });
12 | const path = require("path");
13 | const vscode_test_1 = require("vscode-test");
14 | function main() {
15 | return __awaiter(this, void 0, void 0, function* () {
16 | try {
17 | // The folder containing the Extension Manifest package.json
18 | // Passed to `--extensionDevelopmentPath`
19 | const extensionDevelopmentPath = path.resolve(__dirname, '../../');
20 | // The path to test runner
21 | // Passed to --extensionTestsPath
22 | const extensionTestsPath = path.resolve(__dirname, './suite/index');
23 | // Download VS Code, unzip it and run the integration test
24 | yield vscode_test_1.runTests({ extensionDevelopmentPath, extensionTestsPath });
25 | }
26 | catch (err) {
27 | console.error('Failed to run tests');
28 | process.exit(1);
29 | }
30 | });
31 | }
32 | main();
33 | //# sourceMappingURL=runTest.js.map
--------------------------------------------------------------------------------
/out/src/test/runTest.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"runTest.js","sourceRoot":"","sources":["../../../src/test/runTest.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA6B;AAE7B,6CAAuC;AAEvC,SAAe,IAAI;;QAClB,IAAI;YACH,4DAA4D;YAC5D,yCAAyC;YACzC,MAAM,wBAAwB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAEnE,0BAA0B;YAC1B,iCAAiC;YACjC,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YAEpE,0DAA0D;YAC1D,MAAM,sBAAQ,CAAC,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,CAAC,CAAC;SACjE;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChB;IACF,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
--------------------------------------------------------------------------------
/out/src/test/suite/extension.test.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const assert = require("assert");
4 | // You can import and use all API from the 'vscode' module
5 | // as well as import your extension to test it
6 | const vscode = require("vscode");
7 | // import * as myExtension from '../extension';
8 | suite('Extension Test Suite', () => {
9 | vscode.window.showInformationMessage('Start all tests.');
10 | test('Sample test', () => {
11 | assert.equal(-1, [1, 2, 3].indexOf(5));
12 | assert.equal(-1, [1, 2, 3].indexOf(0));
13 | });
14 | });
15 | //# sourceMappingURL=extension.test.js.map
--------------------------------------------------------------------------------
/out/src/test/suite/extension.test.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"extension.test.js","sourceRoot":"","sources":["../../../../src/test/suite/extension.test.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,0DAA0D;AAC1D,8CAA8C;AAC9C,iCAAiC;AACjC,+CAA+C;AAE/C,KAAK,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAEzD,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;QACxB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
--------------------------------------------------------------------------------
/out/src/test/suite/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const path = require("path");
4 | const Mocha = require("mocha");
5 | const glob = require("glob");
6 | function run() {
7 | // Create the mocha test
8 | const mocha = new Mocha({
9 | ui: 'tdd',
10 | });
11 | mocha.useColors(true);
12 | const testsRoot = path.resolve(__dirname, '..');
13 | return new Promise((c, e) => {
14 | glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
15 | if (err) {
16 | return e(err);
17 | }
18 | // Add files to the test suite
19 | files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
20 | try {
21 | // Run the mocha test
22 | mocha.run(failures => {
23 | if (failures > 0) {
24 | e(new Error(`${failures} tests failed.`));
25 | }
26 | else {
27 | c();
28 | }
29 | });
30 | }
31 | catch (err) {
32 | e(err);
33 | }
34 | });
35 | });
36 | }
37 | exports.run = run;
38 | //# sourceMappingURL=index.js.map
--------------------------------------------------------------------------------
/out/src/test/suite/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/test/suite/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,+BAA+B;AAC/B,6BAA6B;AAE7B,SAAgB,GAAG;IAClB,wBAAwB;IACxB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACvB,EAAE,EAAE,KAAK;KACT,CAAC,CAAC;IACH,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAEhD,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,IAAI,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACxD,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;YAED,8BAA8B;YAC9B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAE9D,IAAI;gBACH,qBAAqB;gBACrB,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;oBACpB,IAAI,QAAQ,GAAG,CAAC,EAAE;wBACjB,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,QAAQ,gBAAgB,CAAC,CAAC,CAAC;qBAC1C;yBAAM;wBACN,CAAC,EAAE,CAAC;qBACJ;gBACF,CAAC,CAAC,CAAC;aACH;YAAC,OAAO,GAAG,EAAE;gBACb,CAAC,CAAC,GAAG,CAAC,CAAC;aACP;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAhCD,kBAgCC"}
--------------------------------------------------------------------------------
/out/test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/storybookjs/vs-code-plugin/4e3eb00ad58c45b52fd5da4cb2e7e7e07c230dba/out/test.js
--------------------------------------------------------------------------------
/out/test.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":"AAAA,SAAS,aAAa,CAAC,CAAC;IACpB,OAAO,CAAC,GAAC,CAAC,CAAA;AACd,CAAC;AAAA,CAAC;AAEF,aAAa,CAAC,KAAK,CAAC,CAAC;AAGrB,MAAM,GAAG,GAAG,CAAC,CAAC;AAEd,KAAI,IAAI,CAAC,GAAE,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAC;CAE5B"}
--------------------------------------------------------------------------------
/out/test/runTest.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4 | return new (P || (P = Promise))(function (resolve, reject) {
5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8 | step((generator = generator.apply(thisArg, _arguments || [])).next());
9 | });
10 | };
11 | Object.defineProperty(exports, "__esModule", { value: true });
12 | const path = require("path");
13 | const vscode_test_1 = require("vscode-test");
14 | function main() {
15 | return __awaiter(this, void 0, void 0, function* () {
16 | try {
17 | // The folder containing the Extension Manifest package.json
18 | // Passed to `--extensionDevelopmentPath`
19 | const extensionDevelopmentPath = path.resolve(__dirname, '../../');
20 | // The path to test runner
21 | // Passed to --extensionTestsPath
22 | const extensionTestsPath = path.resolve(__dirname, './suite/index');
23 | // Download VS Code, unzip it and run the integration test
24 | yield vscode_test_1.runTests({ extensionDevelopmentPath, extensionTestsPath });
25 | }
26 | catch (err) {
27 | console.error('Failed to run tests');
28 | process.exit(1);
29 | }
30 | });
31 | }
32 | main();
33 | //# sourceMappingURL=runTest.js.map
--------------------------------------------------------------------------------
/out/test/runTest.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"runTest.js","sourceRoot":"","sources":["../../src/test/runTest.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA6B;AAE7B,6CAAuC;AAEvC,SAAe,IAAI;;QAClB,IAAI;YACH,4DAA4D;YAC5D,yCAAyC;YACzC,MAAM,wBAAwB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;YAEnE,0BAA0B;YAC1B,iCAAiC;YACjC,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YAEpE,0DAA0D;YAC1D,MAAM,sBAAQ,CAAC,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,CAAC,CAAC;SACjE;QAAC,OAAO,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAChB;IACF,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
--------------------------------------------------------------------------------
/out/test/suite/extension.test.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const assert = require("assert");
4 | // You can import and use all API from the 'vscode' module
5 | // as well as import your extension to test it
6 | const vscode = require("vscode");
7 | // import * as myExtension from '../extension';
8 | suite('Extension Test Suite', () => {
9 | vscode.window.showInformationMessage('Start all tests.');
10 | test('Sample test', () => {
11 | assert.equal(-1, [1, 2, 3].indexOf(5));
12 | assert.equal(-1, [1, 2, 3].indexOf(0));
13 | });
14 | });
15 | //# sourceMappingURL=extension.test.js.map
--------------------------------------------------------------------------------
/out/test/suite/extension.test.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"extension.test.js","sourceRoot":"","sources":["../../../src/test/suite/extension.test.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,0DAA0D;AAC1D,8CAA8C;AAC9C,iCAAiC;AACjC,+CAA+C;AAE/C,KAAK,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;IAEzD,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;QACxB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
--------------------------------------------------------------------------------
/out/test/suite/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | const path = require("path");
4 | const Mocha = require("mocha");
5 | const glob = require("glob");
6 | function run() {
7 | // Create the mocha test
8 | const mocha = new Mocha({
9 | ui: 'tdd',
10 | });
11 | mocha.useColors(true);
12 | const testsRoot = path.resolve(__dirname, '..');
13 | return new Promise((c, e) => {
14 | glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
15 | if (err) {
16 | return e(err);
17 | }
18 | // Add files to the test suite
19 | files.forEach(f => mocha.addFile(path.resolve(testsRoot, f)));
20 | try {
21 | // Run the mocha test
22 | mocha.run(failures => {
23 | if (failures > 0) {
24 | e(new Error(`${failures} tests failed.`));
25 | }
26 | else {
27 | c();
28 | }
29 | });
30 | }
31 | catch (err) {
32 | e(err);
33 | }
34 | });
35 | });
36 | }
37 | exports.run = run;
38 | //# sourceMappingURL=index.js.map
--------------------------------------------------------------------------------
/out/test/suite/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test/suite/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,+BAA+B;AAC/B,6BAA6B;AAE7B,SAAgB,GAAG;IAClB,wBAAwB;IACxB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACvB,EAAE,EAAE,KAAK;KACT,CAAC,CAAC;IACH,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAEhD,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC3B,IAAI,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACxD,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;aACd;YAED,8BAA8B;YAC9B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAE9D,IAAI;gBACH,qBAAqB;gBACrB,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;oBACpB,IAAI,QAAQ,GAAG,CAAC,EAAE;wBACjB,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,QAAQ,gBAAgB,CAAC,CAAC,CAAC;qBAC1C;yBAAM;wBACN,CAAC,EAAE,CAAC;qBACJ;gBACF,CAAC,CAAC,CAAC;aACH;YAAC,OAAO,GAAG,EAAE;gBACb,CAAC,CAAC,GAAG,CAAC,CAAC;aACP;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAhCD,kBAgCC"}
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "aesop",
3 | "displayName": "Aesop",
4 | "description": "An IDE-native suite for previewing Storybook.",
5 | "version": "0.1.0",
6 | "publisher": "async-aesop",
7 | "repository": "https://github.com/storybookjs/vs-code-plugin",
8 | "icon": "resources/Aesop128x128.png",
9 | "engines": {
10 | "vscode": "^1.41.0"
11 | },
12 | "categories": [
13 | "Other"
14 | ],
15 | "activationEvents": [
16 | "onCommand:extension.aesopAwaken",
17 | "workspaceContains:**/node_modules/@storybook/core/*.json"
18 | ],
19 | "main": "./dist/extension",
20 | "contributes": {
21 | "commands": [
22 | {
23 | "command": "extension.aesopAwaken",
24 | "title": "Aesop Awaken"
25 | }
26 | ],
27 | "configuration": {
28 | "type": "object",
29 | "title": "Configuration",
30 | "properties": {
31 | "aesop.port": {
32 | "type": "number",
33 | "default": 8509,
34 | "description": "Port number"
35 | },
36 | "aesop.host": {
37 | "type": "string",
38 | "default": "localhost",
39 | "description": "Host address"
40 | }
41 | }
42 | },
43 | "keybindings": [
44 | {
45 | "command": "extension.aesopAwaken",
46 | "key": "ctrl+k a",
47 | "mac": "cmd+k a"
48 | }
49 | ]
50 | },
51 | "scripts": {
52 | "vscode:prepublish": "webpack --mode production",
53 | "webpack": "webpack --mode development",
54 | "webpack-dev": "webpack --mode development --watch",
55 | "test-compile": "tsc -p ./",
56 | "compile": "tsc -p ./",
57 | "watch": "tsc -watch -p ./",
58 | "pretest": "npm run compile",
59 | "test": "node ./out/test/runTest.js"
60 | },
61 | "devDependencies": {
62 | "@types/express": "^4.17.2",
63 | "@types/glob": "^7.1.1",
64 | "@types/mocha": "^5.2.7",
65 | "@types/node": "^12.12.21",
66 | "@types/vscode": "^1.41.0",
67 | "glob": "^7.1.5",
68 | "mocha": "^10.2.0",
69 | "ts-loader": "^6.2.1",
70 | "tslint": "^5.20.0",
71 | "typescript": "^3.6.4",
72 | "vscode-test": "^1.2.2",
73 | "webpack": "^4.41.4",
74 | "webpack-cli": "^3.3.10"
75 | },
76 | "dependencies": {
77 | "npm": "^6.14.6",
78 | "ps-node": "^0.1.6",
79 | "vsce": "^1.71.0"
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/resources/Aesop128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/storybookjs/vs-code-plugin/4e3eb00ad58c45b52fd5da4cb2e7e7e07c230dba/resources/Aesop128x128.png
--------------------------------------------------------------------------------
/samples/React_Sample/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
--------------------------------------------------------------------------------
/samples/React_Sample/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: [
3 | "airbnb"
4 | ],
5 | env: {
6 | browser: true,
7 | node: true,
8 | es6: true,
9 | jest: true,
10 | },
11 | rules: {
12 | "consistent-return": "off",
13 | "func-names": "off",
14 | "no-console": "off",
15 | "curly": "off",
16 | "react/destructuring-assignment": "off",
17 | "react/jsx-filename-extension": "off",
18 | "react/prop-types": "off",
19 | "react/jsx-wrap-multilines": "off",
20 | "react/jsx-one-expression-per-line": "off",
21 | "react/jsx-closing-tag-location": "off",
22 | }
23 | }
--------------------------------------------------------------------------------
/samples/React_Sample/.storybook/config.js:
--------------------------------------------------------------------------------
1 | import { configure } from '@storybook/react';
2 | import '../client/components/index.css';
3 |
4 | configure(require.context('../client/components', true, /\.stories\.js$/), module);
--------------------------------------------------------------------------------
/samples/React_Sample/client/components/CharacterCard.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase, react/no-array-index-key, global-require, import/no-dynamic-require */
2 | import React from 'react';
3 |
4 | const CharacterCard = (info) => {
5 | const name = 'Luke Skywalker';
6 | const height = '172';
7 | const mass = '77';
8 | const hair_color = 'blond';
9 | const skin_color = 'fair';
10 | const eye_color = 'blue';
11 | const birth_year = '19BBY';
12 | const gender = 'male';
13 |
14 | return (
15 |
16 |