├── .gitignore ├── README.md ├── examples ├── activity-monitor │ ├── README.md │ ├── activity-monitor.build.qrk │ └── activity-monitor.qrk ├── arduino-dashboard │ ├── README.md │ ├── arduino-dashboard.build.qrk │ ├── arduino-dashboard.qrk │ └── arduino │ │ └── arduino.ino ├── hash │ ├── README.md │ ├── hash.build.qrk │ └── hash.qrk ├── mirror │ ├── README.md │ ├── mirror.build.qrk │ └── mirror.qrk └── prices │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── prices.build.qrk │ └── prices.qrk └── libraries ├── using-electron ├── using-electron.build.qrk └── using-electron.qrk ├── using-react ├── using-react.build.qrk └── using-react.qrk ├── using-serialport ├── using-serialport.build.qrk └── using-serialport.qrk └── using-vue ├── using-vue.build.qrk └── using-vue.qrk /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | .env.test 60 | 61 | # parcel-bundler cache (https://parceljs.org/) 62 | .cache 63 | 64 | # next.js build output 65 | .next 66 | 67 | # nuxt.js build output 68 | .nuxt 69 | 70 | # vuepress build output 71 | .vuepress/dist 72 | 73 | # Serverless directories 74 | .serverless/ 75 | 76 | # FuseBox cache 77 | .fusebox/ 78 | 79 | # DynamoDB Local files 80 | .dynamodb/ 81 | 82 | .quark/ 83 | .vscode/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quark samples 2 | Sample [Quark](https://quarkjs.io) projects with ideas for taking them further. 3 | 4 | ![image](https://i.imgur.com/vnvEMNx.gif) 5 | 8 | 9 |
10 | Quark app screenshot 11 | Quark app screenshot 12 | Quark app screenshot 13 |
14 | 15 | ## Getting Started 16 | The first thing to do is to install Quark, if you haven't already. You can [download it from here.](https://quarkjs.io/download) 17 | 18 | Once you've got that out of the way, clone the repository. If you're new to git, check out the guide to [cloning a repository.](https://help.github.com/en/articles/cloning-a-repository) 19 | 20 | ``` 21 | git clone https://github.com/Nishkalkashyap/Quark-samples 22 | ``` 23 | 24 | Each folder in `examples` directory contains a different app with its own `README.md` file explaining what it does, how to run it, and how it could be improved. 25 | 26 | And each folder in `libraries` directory contains a Quark sketch describing how to use various libraries and frameworks in Quark. e.g. using `React.js`, `Vue.js`, `Serialport` and `Electron`. 27 | 28 | ## Links 29 | * [Website](https://quarkjs.io) 30 | * [Download](https://quarkjs.io/download) 31 | * [Github repo](https://github.com/Nishkalkashyap/Quark-docs) 32 | 33 | -------------------------------------------------------------------------------- /examples/activity-monitor/README.md: -------------------------------------------------------------------------------- 1 | # Activity Monitor 2 | Simple sketch that shows a doughnut chart of the CPU system, user, and idle activity time. 3 | 4 | > Note: This project is inspired from [this electron sample app.](https://github.com/electron/simple-samples/tree/master/activity-monitor) 5 | 6 |

7 | 8 |

9 | 10 | ## Getting started 11 | 12 | - Clone this repository 13 | - `cd examples/activity-monitor` 14 | - Open project file `activity-monitor.qrk`, or build file `activity-monitor.build.qrk` in Quark. 15 | 16 | ## Going further 17 | 18 | Here are some ideas on how it can be improved using other [Quark API's.](https://quarkjs.io/references/) 19 | 20 | - Add tooltips that show times in hours/days instead of milliseconds 21 | - Support exporting CPU times to a comma-separated (.csv) file 22 | - Support saving chart as PNG 23 | - Support copying chart image to clipboard 24 | - Add second chart of free vs. used memory -------------------------------------------------------------------------------- /examples/activity-monitor/activity-monitor.qrk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nishkalkashyap/Quark-samples/d8e501277990aadf0752e3c654612dc94edf696d/examples/activity-monitor/activity-monitor.qrk -------------------------------------------------------------------------------- /examples/arduino-dashboard/README.md: -------------------------------------------------------------------------------- 1 | # Arduino Dashboard 2 | Create a dashboard and a data logger for Arduino in javascript with [node-serialport](https://www.npmjs.com/package/serialport) library. __Under 250 lines of code!!__ 😁 3 | 4 | ![image](https://i.imgur.com/vnvEMNx.gif) 5 | 6 | ## Features 7 | __Serialport selector:__ A graphical user interface component that allows you to select the serialport for your Arduino. 8 | 9 |

10 | 11 |

12 | 13 | __Dashboard:__ A dashboard that prints the real time values on the screen and also draws charts. 14 | 15 |

16 | 17 |

18 | 19 | __Datalogger:__ A data logger that will read data from arduino and save it on your computer in csv format. 20 | 21 |

22 | 23 |

24 | 25 | 31 | 32 | ## Getting started 33 | 34 | - Clone this repository 35 | - `cd examples/arduino-dashboard` 36 | - Upload the `arduino.ino` file to the arduino. 37 | - Open project file `arduino-dashboard.qrk` to edit project, or build file `arduino-dashboard.build.qrk` to run the project in Quark. 38 | 39 | ## Running the project 40 | - Open the build file `arduino-dashboard.build.qrk` in Quark. 41 | - Press `ctrl+p` and select the COM port of your arduino from the serial port selector. 42 | 43 |

44 | 45 |

46 | 47 | - To start the data logger, open the [commands palette](https://quarkjs.io/guide/quark-ide.html#command-palette) by pressing `ctrl+shift+p`, and select `Datalogger: Start` command. You will see a notification on the bottom right of your screen if the logger was started. 48 | - To stop the data logger, open the commands palette and select command `Datalogger: Stop`. This will open a save dialog where you can enter the path of the file where you want to save your data. 49 | 50 | ## Going further 51 | 52 | Here are some ideas on how it can be improved using other [Quark API's.](https://quarkjs.io/references/) 53 | 54 | - Add buttons on status bar to start or stop data logger. 55 | - Convert the bar chart into a pie chart. -------------------------------------------------------------------------------- /examples/arduino-dashboard/arduino-dashboard.qrk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nishkalkashyap/Quark-samples/d8e501277990aadf0752e3c654612dc94edf696d/examples/arduino-dashboard/arduino-dashboard.qrk -------------------------------------------------------------------------------- /examples/arduino-dashboard/arduino/arduino.ino: -------------------------------------------------------------------------------- 1 | int dataPoint1 = 0; 2 | int dataPoint2 = 0; 3 | int dataPoint3 = 0; 4 | int dataPoint4 = 0; 5 | 6 | void setup() 7 | { 8 | Serial.begin(115200); 9 | } 10 | 11 | void loop() 12 | { 13 | dataPoint1 = random(100, 200); 14 | dataPoint2 = random(100, 200); 15 | dataPoint3 = random(100, 200); 16 | dataPoint4 = random(100, 200); 17 | 18 | Serial.print(dataPoint1); 19 | Serial.print(","); 20 | 21 | Serial.print(dataPoint2); 22 | Serial.print(","); 23 | 24 | Serial.print(dataPoint3); 25 | Serial.print(","); 26 | 27 | Serial.println(dataPoint4); 28 | 29 | delay(1000); 30 | } 31 | -------------------------------------------------------------------------------- /examples/hash/README.md: -------------------------------------------------------------------------------- 1 | # Hash 2 | Simple sketch that shows the hash values of entered text using different algorithms. 3 | 4 | > Note: This project is inspired from [this electron sample app.](https://github.com/electron/simple-samples/tree/master/hash) 5 | 6 |

7 | 8 |

9 | 10 | ## Getting started 11 | 12 | - Clone this repository 13 | - `cd examples/hash` 14 | - Open project file `hash.qrk`, or build file `hash.build.qrk` in Quark. 15 | 16 | ## Going further 17 | 18 | Here are some ideas on how it can be improved using other [Quark API's.](https://quarkjs.io/references/) 19 | 20 | - Make headings links that open to Wikipedia page for algorithm. 21 | - Support dragging/dropping a file to hash onto the window. 22 | - Support opening a file via a dialog to hash from the app's menu. 23 | - Display time taken to compute each hash. -------------------------------------------------------------------------------- /examples/hash/hash.build.qrk: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | /******/ 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | /******/ 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) { 10 | /******/ return installedModules[moduleId].exports; 11 | /******/ } 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ i: moduleId, 15 | /******/ l: false, 16 | /******/ exports: {} 17 | /******/ }; 18 | /******/ 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | /******/ 22 | /******/ // Flag the module as loaded 23 | /******/ module.l = true; 24 | /******/ 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | /******/ 29 | /******/ 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | /******/ 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | /******/ 36 | /******/ // define getter function for harmony exports 37 | /******/ __webpack_require__.d = function(exports, name, getter) { 38 | /******/ if(!__webpack_require__.o(exports, name)) { 39 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40 | /******/ } 41 | /******/ }; 42 | /******/ 43 | /******/ // define __esModule on exports 44 | /******/ __webpack_require__.r = function(exports) { 45 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47 | /******/ } 48 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 49 | /******/ }; 50 | /******/ 51 | /******/ // create a fake namespace object 52 | /******/ // mode & 1: value is a module id, require it 53 | /******/ // mode & 2: merge all properties of value into the ns 54 | /******/ // mode & 4: return value when already ns object 55 | /******/ // mode & 8|1: behave like require 56 | /******/ __webpack_require__.t = function(value, mode) { 57 | /******/ if(mode & 1) value = __webpack_require__(value); 58 | /******/ if(mode & 8) return value; 59 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60 | /******/ var ns = Object.create(null); 61 | /******/ __webpack_require__.r(ns); 62 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64 | /******/ return ns; 65 | /******/ }; 66 | /******/ 67 | /******/ // getDefaultExport function for compatibility with non-harmony modules 68 | /******/ __webpack_require__.n = function(module) { 69 | /******/ var getter = module && module.__esModule ? 70 | /******/ function getDefault() { return module['default']; } : 71 | /******/ function getModuleExports() { return module; }; 72 | /******/ __webpack_require__.d(getter, 'a', getter); 73 | /******/ return getter; 74 | /******/ }; 75 | /******/ 76 | /******/ // Object.prototype.hasOwnProperty.call 77 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78 | /******/ 79 | /******/ // __webpack_public_path__ 80 | /******/ __webpack_require__.p = "/static"; 81 | /******/ 82 | /******/ 83 | /******/ // Load entry module and return exports 84 | /******/ return __webpack_require__(__webpack_require__.s = "../../src/setup.js"); 85 | /******/ }) 86 | /************************************************************************/ 87 | /******/ ({ 88 | 89 | /***/ "../../Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/cjs.js?!../../src/styles.css": 90 | /*!*********************************************************************************************************************!*\ 91 | !*** /Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/cjs.js??ref--1-oneOf-0-1!/src/styles.css ***! 92 | \*********************************************************************************************************************/ 93 | /*! no static exports found */ 94 | /***/ (function(module, exports, __webpack_require__) { 95 | 96 | eval("exports = module.exports = __webpack_require__(/*! ../Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/runtime/api.js */ \"../../Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \".container-fluid {\\r\\n padding: 20px;\\r\\n user-select: text;\\r\\n height: 100%;\\r\\n background-color: #D6D8DC;\\r\\n}\\r\\n\\r\\npre {\\r\\n white-space: pre-wrap;\\r\\n word-break: keep-all;\\r\\n padding: 8px;\\r\\n background-color: #f5f5f5;\\r\\n border-radius: 3px;\\r\\n}\\r\\n\\r\\n.text-input {\\r\\n font-size: 16px;\\r\\n width: 100%;\\r\\n background-color: #f5f5f5;\\r\\n border-radius: 3px;\\r\\n}\\r\\n\\r\\n.hash-output {\\r\\n color: #626669;\\r\\n font-size: 16px;\\r\\n letter-spacing: 2px;\\r\\n white-space: pre-wrap;\\r\\n}\\r\\n\\r\\n.hash-heading {\\r\\n color: #626669;\\r\\n font-weight: normal;\\r\\n}\", \"\"]);\n\n// Exports\nexports.locals = {\n\t\"container-fluid\": \"container-fluid\",\n\t\"text-input\": \"text-input\",\n\t\"hash-output\": \"hash-output\",\n\t\"hash-heading\": \"hash-heading\"\n};\n\n//# sourceURL=webpack:////src/styles.css?/Program_Files/Quark/resources/app.asar/node_modules/css-loader/dist/cjs.js??ref--1-oneOf-0-1"); 97 | 98 | /***/ }), 99 | 100 | /***/ "../../Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/runtime/api.js": 101 | /*!*******************************************************************************************!*\ 102 | !*** /Program Files/Quark/resources/app.asar/node_modules/css-loader/dist/runtime/api.js ***! 103 | \*******************************************************************************************/ 104 | /*! no static exports found */ 105 | /***/ (function(module, exports, __webpack_require__) { 106 | 107 | "use strict"; 108 | eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}\n\n//# sourceURL=webpack:////Program_Files/Quark/resources/app.asar/node_modules/css-loader/dist/runtime/api.js?"); 109 | 110 | /***/ }), 111 | 112 | /***/ "../../Program Files/Quark/resources/app.asar/node_modules/vue-style-loader/lib/addStylesClient.js": 113 | /*!****************************************************************************************************!*\ 114 | !*** /Program Files/Quark/resources/app.asar/node_modules/vue-style-loader/lib/addStylesClient.js ***! 115 | \****************************************************************************************************/ 116 | /*! exports provided: default */ 117 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 118 | 119 | "use strict"; 120 | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return addStylesClient; });\n/* harmony import */ var _listToStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./listToStyles */ \"../../Program Files/Quark/resources/app.asar/node_modules/vue-style-loader/lib/listToStyles.js\");\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\n\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of