grasp/README.md

113 lines
5.8 KiB
Markdown
Raw Normal View History

2019-01-06 05:52:53 -08:00
Build status: [![CircleCI](https://circleci.com/gh/karlicoss/grasp.svg?style=svg)](https://circleci.com/gh/karlicoss/grasp)
2020-02-08 09:12:37 -08:00
Grasp is a browser extension for [Chrome](https://chrome.google.com/webstore/detail/org-grasp/ohhbcfjmnbmgkajljopdjcaokbpgbgfa) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/grasp), which adds a button/keybinding to capture current page title and url,
2019-01-27 02:06:14 -08:00
possibly selected text, additional comments or tags and adds it into your [Org Mode](https://orgmode.org/) file.
2019-01-06 05:52:53 -08:00
2019-01-27 02:19:29 -08:00
[Screenshot](https://user-images.githubusercontent.com/291333/51799721-a984eb80-221c-11e9-9612-8eb7f553dc01.png), [short demo](https://www.youtube.com/watch?v=Z8Bk-IazdGo).
2019-01-06 15:22:31 -08:00
2020-02-08 09:12:37 -08:00
- [Chrome](https://chrome.google.com/webstore/detail/org-grasp/ohhbcfjmnbmgkajljopdjcaokbpgbgfa)
- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/grasp)
- or, install from a zip: [releases](https://github.com/karlicoss/grasp/releases).
2019-01-06 14:15:53 -08:00
# Running
2019-01-27 02:06:14 -08:00
In the simplest setup, the server runs locally, and you can use 'localhost' version of the extension. If you have to work on a computer where you can't run python scripts,
or your target capture file is just not there, you can selfhost the server part elsewhere and use the 'any host' version. Don't forget to set the endpoint in extension settings!
2019-01-13 07:34:13 -08:00
1. Install server counterpart as systemd service (to autostart it): `server/setup --path /path/to/your/capture.org [--port <custom port>] [--template <custom org-capture template>]`.
2019-01-07 14:53:08 -08:00
2019-01-13 07:34:13 -08:00
Or alternatively, just run it directly if you don't want to autostart it: `server/grasp_server.py --path /path/to/your/capture.org [--port <custom_port>] [--template <custom org-capture template>]`.
2019-01-06 14:15:53 -08:00
2. Install chrome extension and configure hotkeys
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2020-02-08 08:24:14 -08:00
That's it! If you're using custom port make sure it's the same as in the extension settings (default is `12212`).
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2019-01-06 14:15:53 -08:00
# Motivation
2020-02-08 08:24:14 -08:00
Why use org-capture? Well, it's hard to explain, maybe some other time... However, if you do know you want to use it instead of/alongside your browser bookmarks, by default
you don't have much choice and have to copy everything manually. For an experienced enough org-mode user it's no less than a torture.
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2020-02-08 08:24:14 -08:00
This tool:
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2020-02-08 08:24:14 -08:00
- \+ shows a notification when capturing fails/succeeds, so you won't lose your notes
- \+ doesn't require always running Emacs, simply appends an org-mode text entry to a file
- \+ can capture things that org-protocol can't handle (e.g. extra comment or tags)
- \+ can potentially use any plaintext format as a storage.
2019-01-27 02:06:14 -08:00
2020-02-08 08:24:14 -08:00
E.g. you might be more of a Markdown or Todo.txt fan (let me know if you are interested in that!).
- \- doesn't talk to Emacs, so can't benefit from Emacs capture templates
E.g. currently you can't point at a specific header in an org file, it would just append at the end.
- \- requires running a small HTTP server
However, there are no dependencies apart from python3, so in many ways, it's even more portable than Emacs.
Comparison with similar tools:
## [org-capture-extension](https://github.com/sprig/org-capture-extension)
- \- relies on [org-protocol](https://orgmode.org/worg/org-contrib/org-protocol.html) and MIME handler: flaky for many people and has no feedback whether capture failed or succeeded
Losing few days of captured stuff due to MIME handler mysteriously not working was the main motivator for me to develop grasp.
2019-01-27 02:06:14 -08:00
2020-02-08 08:24:14 -08:00
- \- requires always running Emacs, which might not be the case for some people
- \+ relies on org-protocol, so can potentially be better integrated with Emacs and your org-mode files
## [org-protocol-capture-html](https://github.com/alphapapa/org-protocol-capture-html)
Same pros/cons as `org-capture-extension` as it's relying on org-protocol.
In addition:
- \+ using a bookmarklet, hence browser-agnostic
- \+ capable of on the fly HTML to org-mode markup conversion
2019-01-27 02:06:14 -08:00
# Requirements
2019-06-29 06:44:54 -07:00
No third party dependencies! Just `python3`.
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2020-02-08 08:24:14 -08:00
# Potential improvements
2019-01-27 02:06:14 -08:00
* see [todos](./TODO.org)
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2019-06-29 06:44:54 -07:00
# Permissions used
2020-02-08 08:24:14 -08:00
* `http://localhost/capture` for talking with the backend
2020-02-08 08:28:37 -08:00
If you want to use an external URL as an endpoint, you will be prompted for a permission dynamically.
2019-06-29 06:44:54 -07:00
* `storage` for settings
2020-02-08 08:28:37 -08:00
* `notifications` for showing notification
* `activeTab` for requesting page info
2019-06-29 06:44:54 -07:00
# Building & developing
2019-01-06 14:15:53 -08:00
The most up-to-date instructions should be in [CI config](./.circleci/config.yml).
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2020-02-08 08:24:14 -08:00
You need `npm` for building the extension.
Collapse boilerplate in a single commit First prototype Added the README Fixed the hot module replacement Minor adjustments on readme Normalizing the env vars and using it capitalized Added info about the react.js branch Fix babel transpiling Using yarn Removing the babel package, just the babel-core does the job Using just the dependencies key on package.json Since it isn't a lib package doesn't matter the separation between devDependencies and dependencies. Updating the css-loader Updating the fs-extra Moving the utility packages to utils folder Better description Adds the license closes #3 Write the env vars on the bundle file http://dev.topheman.com/make-your-react-production-minified-version-with-webpack/ Fixs the hot reload setup Sringifies the env object to define plugin Uses the webpack html plugin to generate the pages in a less hacky way Uses the write-file-webpack-plugin this plugin allows the webpack write on disk all files, even running with the webserver, which is necessary to the hot reload. this plugin also help us to remove nasty hacks and expose bundles to other extension features. Allows exclude some entry points to be hot reloaded It's useful for content scripts that can't keep the connection with the webpack endpoint. Updates the webpack Updates the README with instructions about the content scripts resolves #4 Updates to Webpack 2 closes #8 Expand the DefinePlugin usage In Webpack 1, the replaced value at compile time by define plugin was placed with parenthesis, like ({"NODE_ENV":"development","PORT":3000}), now, it not works in this way, breaking the app. So, to simplify the things, this commit just passes the NODE_ENV var. Fix README Exclude /node_modules/ from babel and css transpiling #9 Source maps to help debugging closes #10 Removes the forbidden webpack config 'chromeExtensionBoilerplate' before build and webserver's start Although I know that it's not a good practice, right now I don't know a good way to keep the boilerplate configs simple as it is today without this hacky solution, so, until we came with a better solution, we'll remove the key before build and webserver's start. #9 Update README.md Removing babel.js Basically, we don't need transpiling with babel since Webpack 2 take care of ES6 modules transpiling and the ES2015 is supported by Chrome. kudos @gagarine resolve #16 Setup boilerplate to load images and other assets in html and css resolves #18 resolves #23 resolves #14 resolves #12 Added icons and images boilerplate Split dependencies on package.json resolves #15 Webpack config improvements (#26) - Use CopyWebpackPlugin to generate `manifest.json` file - Use CleanWebpackPlugin to clear build folder Minor README adjustments * explicitly the required node version * pointing to yarn install instructions page instead suggest install with npm. the yarn page will be always updated to the best way to install the yarn. closes #28 Adding the contribution guidelines
2016-04-14 06:16:50 -07:00
2019-01-06 14:15:53 -08:00
npm install
2019-12-09 12:43:38 -08:00
./build --target <browser> # e.g. ./build --target chrome or ./build --target firefox
2019-01-06 14:15:53 -08:00
2019-12-09 12:43:38 -08:00
After that you can find the extension in `dist` directory and 'Load unpacked** if necessary. There is also Flow and Eslint set up.
2019-01-16 14:24:10 -08:00
## testing and linting
2019-06-29 11:11:15 -07:00
Check [CI config](./.circleci/config.yml) to figure out all the checks I'm doing.
The only test(s) that don't run on CI at the moment (e.g. due to lack of X server) are marked with `@skip_if_ci`. You can run them manually though.
2019-12-09 12:43:38 -08:00
Extra tests (not integrated in CI yet):
- `scripts/test_with_browser.py`
## publishing
2020-02-08 09:12:37 -08:00
- run `./publish` to generate extension zip files
- firefox: `./build --firefox --release --lint --sign`
After than, upload the signed `xpi` file on [AMO](https://addons.mozilla.org/en-GB/developers/addon/grasp/versions)
- chrome: `./build --chrome --release --lint`
2020-02-08 09:12:37 -08:00
After that, upload the zip (generated by publish script) on [Web store](https://chrome.google.com/webstore/developer/dashboard)
2019-06-29 11:11:15 -07:00
2019-01-06 14:15:53 -08:00
# Credits
* Icon made by <a href="https://www.freepik.com/" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>, licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>
* [Original Org Capture extension](https://github.com/sprig/org-capture-extension)
2019-01-13 08:10:05 -08:00
* [Boilerplate for Webpack Chrome extension](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate)