├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONCEPTS.md ├── README.md ├── bin └── index.js ├── dist ├── build.js └── index.html ├── docs ├── index.html └── psychic-min.css ├── index.js ├── package.json ├── screenshots ├── main.png └── notebook.png ├── src ├── app.js ├── components │ ├── block.js │ ├── chart │ │ ├── axis.js │ │ ├── curve.js │ │ ├── index.js │ │ ├── line.css │ │ ├── line.js │ │ ├── pie.css │ │ ├── pie.js │ │ ├── point.js │ │ ├── points.js │ │ ├── slice.js │ │ └── tooltip.js │ ├── layout.js │ ├── result.js │ └── table.js ├── main.js ├── notebook.js ├── router.js └── style.css └── webpack.config.js /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | docs 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint:recommended", 4 | "plugin:react/recommended" 5 | ], 6 | "env": { 7 | "es6": true, 8 | "node": true, 9 | "browser": true 10 | }, 11 | "parserOptions": { 12 | "ecmaVersion": 6, 13 | "sourceType": "module", 14 | "ecmaFeatures": { 15 | "jsx": true 16 | } 17 | }, 18 | "plugins": [ 19 | "react" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # v1.0.0 (05/17/2017) 2 | 3 | - complete rewrite of the application 4 | -------------------------------------------------------------------------------- /CONCEPTS.md: -------------------------------------------------------------------------------- 1 | # Concepts 2 | 3 | > These are some concepts to what would be good addition to node-notebook 4 | 5 | - Be able to save code snippets to accounts? 6 | - just save reference to the notebook key to the accounts for now 7 | - be able to have notebooks referenced to user account have named hashes 8 | - ex: /{username}/{hash} 9 | - Running asynchonous code 10 | - running a server in a notebook, something that requires a forever loop or the spawn of a new process 11 | - Being able to transform data 12 | - arrays of objects to a table 13 | - arrays of arrays to a graph 14 | - location data to be displayed on a map 15 | - being able to view canvas or buffer data 16 | - Be able to give the notebook a code snippet and ask it to seed the data? 17 | - Be able to give the notebook a code snippet and ask it to run regression over the code paths to optimize it and point out where optimizations can be done 18 | - Be able to have two or more code snippets and compare the output between the three over time as data is being added or removed to see how well they perform 19 | - Be able to run code in specific vms? (might need to dehydrate heap and rehydrate onto different vm?) 20 | - Use docker as host for the node instance and call it when needed 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-notebook 2 | 3 | [](https://www.npmjs.com/package/node-notebook) 4 | [](https://travis-ci.org/gabrielcsapo/node-notebook) 5 | [](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/node-notebook) 6 | [](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/node-notebook#info=devDependencies) 7 |  8 | []() 9 | []() 10 | 11 | > A notebook service that runs Javascript through the node vm 12 | 13 | # [Concepts](CONCEPTS.md) 14 | 15 | > what are some ideas for node-notebook? 16 | 17 | # Screenshots 18 | 19 |  20 | 21 |  22 | -------------------------------------------------------------------------------- /bin/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const program = require('commander'); 4 | 5 | program 6 | .version(require('../package.json').version) 7 | .option('-d, --db [db]', 'Set the db connection', 'mongodb://localhost/node-notebook') 8 | .parse(process.argv); 9 | 10 | process.env.MONGO_URL = process.env.MONGO_URL || program.db; 11 | 12 | require('../index'); 13 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |64 | Took {time} ms 65 |66 |
70 | { error } 71 |72 |
76 | { context.console.map((value, i) => { return `${i}: ${value.toString()} \n`}) } 77 |78 |
82 |107 |key !== 'console') 84 | .reduce((obj, key) => { 85 | obj[key] = context[key]; 86 | return obj; 87 | }, {})} theme={{ 88 | scheme: 'monokai', 89 | base00: 'rgba(#ffffff, 0)', 90 | base01: '#383830', 91 | base02: '#49483e', 92 | base03: '#75715e', 93 | base04: '#a59f85', 94 | base05: '#f8f8f2', 95 | base06: '#f5f4f1', 96 | base07: '#f9f8f5', 97 | base08: '#f92672', 98 | base09: '#fd971f', 99 | base0A: '#f4bf75', 100 | base0B: '#a6e22e', 101 | base0C: '#a1efe4', 102 | base0D: '#66d9ef', 103 | base0E: '#ae81ff', 104 | base0F: '#cc6633' 105 | }} invertTheme={true} /> 106 |
112 |132 |131 |
81 | { this.renderResult(result, renderOption)} 82 |83 |
226 | {window.location.href} 227 |228 |