npm install -g chrome-extension-cli
npm install
npm run watch
- Write chrome://extensions in the browser search box
- Check the Developer mode checkbox
- Click on the Load unpacked extension button
- Select the folder scrapp-ext/build
- You'll see the extension in the page, click in the extension icon in the top right corner of the browser and click the extension to use it
- Visit a page with paragraph information this one for example
- Right click inside the extension and inspect, the browser devtool will open
- Click on console tab
- Back on the extension, click the 'obtener url' button
- See the json with the scrapp information in the console of the browser devtool
When you're ready to publish to Chrome Web Store, create a minified bundle with npm run build
and zip it with npm run pack
.
Or you can zip the build
folder manually.
- Make sure that the command
npm run watch
is running so all the changes are saved automatically - Look for public/popup.html to modify the estructure (like a ordinary html)
- The src/popup.js and src/popup.css are for logic code and styles respectively (ignore the popup2.js it is a code example)