├── .babelrc ├── .travis.yml ├── src └── renderer.js ├── CHANGELOG.md ├── .gitignore ├── package.json ├── LICENSE └── Readme.md /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-0", "react"] 3 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'node' 5 | - '6' 6 | - '5' 7 | - '4' 8 | -------------------------------------------------------------------------------- /src/renderer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | module.exports = function ( context ) { 6 | const hooks = context.hooks 7 | const React = context.React 8 | const remote = context.electron.remote 9 | 10 | // Development Helpers 11 | remote.getCurrentWindow().openDevTools() 12 | window.reload = remote.getCurrentWebContents().reloadIgnoringCache 13 | }; 14 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). 3 | 4 | Generated by [auto-changelog](https://github.com/CookPete/auto-changelog) 5 | 6 | 7 | ## v1.0.1 - 2017-06-14 8 | 9 | ### Fixes 10 | * updated addon to work with version 2.0 of flywheel [`3fc51f`](https://github.com/tpkemme/local-addon-devtools/commit/3fc51f84bff82fd723eb025c59a71b8ef2763ed9) 11 | 12 | 13 | ## v1.0.0 - 2017-02-16 14 | 15 | ### Commits 16 | * inital commit, adding dev tools to separate plugin [`7b84a6d`](https://github.com/tpkemme/local-addon-devtools/commit/7b84a6d3565cf59c65fc12da0e71a3089a9f9453) 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | 39 | #compiled js 40 | lib/* 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "local-addon-devtools", 3 | "productName": "Devtools Addon for Local", 4 | "version": "1.0.1", 5 | "author": "Tyler Kemme", 6 | "contributors": [ 7 | { 8 | "name": "Tyler Kemme", 9 | "email": "tylerkemme@gmail.com" 10 | } 11 | ], 12 | "keywords": [ 13 | "local-addon" 14 | ], 15 | "description": "A simple addon for Local that opens devTools when active.", 16 | "renderer": "lib/renderer.js", 17 | "license": "MIT", 18 | "scripts": { 19 | "build": "babel src -d lib", 20 | "watch": "run-when-changed --watch 'src/*.js' --exec 'npm run-script build'", 21 | "version": "auto-changelog --package; git add CHANGELOG.md" 22 | }, 23 | "devDependencies": { 24 | "auto-changelog": "*", 25 | "babel": "^6.5.2", 26 | "babel-cli": "^6.9.0", 27 | "babel-preset-es2015": "^6.9.0", 28 | "babel-preset-react": "^6.5.0", 29 | "babel-preset-stage-0": "^6.5.0", 30 | "run-when-changed": "^1.3.0" 31 | }, 32 | "engines": { 33 | "local-by-flywheel": "^2.0.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jeff Gould 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Chrome Developer Tools Addon for Local By Flywheel 2 | 3 | ## Description 4 | Add this addon to Local By Flywheel to access the Chrome Developer Tools while Local is open. This is a useful tool when for developing addons for Local. Also includes a function reload() that can be run in the Developer Tools Console to reload the application. 5 | 6 | ## Quick Start 7 | 1. Clone this repo: `git clone git@github.com:tpkemme/local-addon-devtools.git local-addon-devtools && cd local-addon-devtools` 8 | 2. Run `npm install` 9 | 3. Run initial build: `npm run-script build` 10 | 4. Link into Local's `addon` directory: `ln -s "$(pwd)" ~/Library/Application\ Support/Local\ by\ Flywheel/addons` 11 | 5. Restart Local and activate addon from Settings > Addons 12 | 13 | ## Developing 14 | 15 | - To automatically transpile your JS while developing, just start watch task: `npm run-script watch`. 16 | - The only thing this starter addon currently does is open dev tools in Local and add a `reload()` function to the window object, type `reload()` into the dev tools console after you've saved/transpiled to see your changes. 17 | 18 | 19 | ### Installing Dev Dependencies 20 | `npm install` 21 | 22 | ### Folder Structure 23 | All files in `/src` will be transpiled to `/lib` using [Babel](https://github.com/babel/babel/). Anything in `/lib` will be overwritten. 24 | 25 | ### Transpiling 26 | `npm run-script build` or `npm run-script watch` to transpile when source files are saved 27 | 28 | ### Babel, transpiling, ES6, Node.js, what? 29 | Not familiar with some or any of these terms? Here are a few resources to get you up to speed. 30 | 31 | - Node.js 32 | - [The Art of Node](https://github.com/maxogden/art-of-node#the-art-of-node) 33 | - Babel 34 | - [Babel Introduction](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/user-handbook.md#toc-introduction) 35 | - [Source-to-source compiler (Wikipedia)](https://en.wikipedia.org/wiki/Source-to-source_compiler) 36 | - ES6/ES2015 37 | - [Learn ES2015](https://babeljs.io/docs/learn-es2015/) 38 | - [JavaScript — Just another introduction to ES6](https://medium.com/sons-of-javascript/javascript-an-introduction-to-es6-1819d0d89a0f#.a11ayxe2p) 39 | 40 | ## Dev Dependencies 41 | 42 | - [babel](https://github.com/babel/babel/tree/master/packages): Turn ES6 code into readable vanilla ES5 with source maps 43 | - [babel-cli](https://github.com/babel/babel/tree/master/packages): Babel command line. 44 | - [babel-preset-es2015](https://github.com/babel/babel/tree/master/packages): Babel preset for all es2015 plugins. 45 | - [babel-preset-react](https://github.com/babel/babel/tree/master/packages): Babel preset for all React plugins. 46 | - [babel-preset-stage-0](https://github.com/babel/babel/tree/master/packages): Babel preset for stage 0 plugins 47 | 48 | 49 | ## License 50 | 51 | MIT 52 | --------------------------------------------------------------------------------