Skip to content

Commit

Permalink
Project structure overhaul
Browse files Browse the repository at this point in the history
Instead of having the popup be built by Vite and the extension itself be
built by extension-cli, this commit moves the popup code into the root
folder and creates individual Vite configs for the different parts of
the extension.

This way, we have more control over the project build process, which in
turn allows us to easily build for either Firefox or Chromium depending
on the chosen build script.
  • Loading branch information
jareddantis committed Apr 21, 2023
1 parent b9280f9 commit df6f95c
Show file tree
Hide file tree
Showing 46 changed files with 12,185 additions and 23,814 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ dist

# Built extension
release.zip
*.local
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
# ariadne

Detect deceptive design on the Web

## Development

This extension was created with [Extension CLI](https://oss.mobilefirst.me/extension-cli/)!

If you find this software helpful [star](https://github.com/MobileFirstLLC/extension-cli/) or [sponsor](https://github.com/sponsors/MobileFirstLLC) this project.


### Available Commands

| Commands | Description |
| --- | --- |
| `npm run start` | build extension, watch file changes |
| `npm run build` | generate release version |
| `npm run docs` | generate source code docs |
| `npm run clean` | remove temporary files |
| `npm run test` | run unit tests |
| `npm run sync` | update config files |

For CLI instructions see [User Guide →](https://oss.mobilefirst.me/extension-cli/)

### Learn More

**Extension Developer guides**

- [Getting started with extension development](https://developer.chrome.com/extensions/getstarted)
- Manifest configuration: [version 2](https://developer.chrome.com/extensions/manifest) - [version 3](https://developer.chrome.com/docs/extensions/mv3/intro/)
- [Permissions reference](https://developer.chrome.com/extensions/declare_permissions)
- [Chrome API reference](https://developer.chrome.com/docs/extensions/reference/)

**Extension Publishing Guides**

- [Publishing for Chrome](https://developer.chrome.com/webstore/publish)
- [Publishing for Edge](https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/publish/publish-extension)
- [Publishing for Opera addons](https://dev.opera.com/extensions/publishing-guidelines/)
- [Publishing for Firefox](https://extensionworkshop.com/documentation/publish/submitting-an-add-on/)
10 changes: 10 additions & 0 deletions background/background.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ariadne control panel</title>
</head>
<body>
<p>hello from ariadne in the background</p>
<script type="module" src="./background.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/background/_index.js → background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class AriadneBackground {
this._tabStates = [];
this._reportStats = {};
this._API_URL = 'https://ariadne.dantis.me/api/v1';

// Determine if running in unpacked mode
const that = this;
browser.management.get(browser.runtime.id)
Expand Down
10 changes: 10 additions & 0 deletions content/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ariadne control panel</title>
</head>
<body>
<p>dummy</p>
<script type="module" src="./content.js"></script>
</body>
</html>
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit df6f95c

Please sign in to comment.