louisbarclay / nudge

Nudge makes the internet less addictive.
https://nudgeware.io
MIT License
144 stars 9 forks source link

Add "Get Started" documentation for development #51

Closed aadilayub closed 4 years ago

aadilayub commented 4 years ago

I want to contribute to this extension and am not sure where to start with the codebase. It would be nice if there were some minimal instructions like there are in other open source projects.

Something as simple as:

This project is built using xyz

Get  started by installing dependencies:

$ npm install

$ yarn install

Then:

$ npm run dev
louisbarclay commented 4 years ago

@aadilayub, apologies. I used to have instructions like that in the README but then I started using GitHub pages and overwrote the README for good.

Here are some temporary instructions which I'll find a better place for soon:

This project is built using vanilla JavaScript. It's a Node.js project because various Node.js modules are used to set up the dev environment. However the JavaScript of the extension itself all lives in the extension/js folder and is vanilla, with the exceptions of using the two libraries that are included in the extension/js/vendor folder.

HTML and CSS in the extension are compiled from .sass and .pug files. This means that to efficiently contribute to the HTML and CSS parts you have to make sure to get set up using yarn.

$ yarn install

Then, to run the dev environment - which basically watches the aforementioned .sass and .pug files - run:

$ yarn dev

Note: no need to run yarn dev if you're only tweaking JS.

To run your local version of Nudge in your browser, use Chrome's developer tool 'Load unpacked extension' and select the extension folder.

I recommend using an extension reloading extension like this one, with a keyboard shortcut enabled, to make developing more efficient:

https://chrome.google.com/webstore/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid?hl=en

aadilayub commented 4 years ago

Thanks for your response!

louisbarclay commented 4 years ago

I have now put this here permanently:

https://github.com/lgwb89/nudge/blob/master/instructions.md

This is linked at the bottom of the main README.