Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Add webpack to bundle assets #467

Merged
merged 16 commits into from
Sep 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.idea
.git
debug.log
stats.json
node_modules
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/*
**/*.min.js
**/*.min.css
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 100
}
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Contributor's Guide

First off, thanks for taking the time to contribute! :tada::+1:

WebUI-Aria2 is an Angular JS 1.x application bundled with webpack. Follow the [Get Started Guide](#get-started) to setup the development environment. You'll need `Node > 6` and latest version of `npm` to build the source files.

## Get Started

To start developing an awesome feature or to fix a bug [fork and clone the repo](https://help.github.com/articles/fork-a-repo/) and then install Node.js > 6 and npm.

Next, install this package's dependencies with npm using `npm install` command.

Then run `npm run dev` command to start an HTTP development server on http://localhost:8888 and to watch and compile the source files.

Use `npm run build` to create a production ready build from source files.

### Useful commands

| Command | Purpose |
| ------------------------- | --------------------------------------------------------------------------------------------------------- |
| `npm install` | will install required dependencies |
| `npm run dev` | will start an HTTP dev server on http://localhost:8888 and will watch and compile the source files |
| `npm run build` | will create a production build from source files |
| `npm run analyze` | will open a bundle analyzer on port http://localhost:9999. Useful for visualizing contents of your bundle |
| `npm run format --silent` | will format your code for consistency using Prettier |
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
&& apt-get install -y aria2 busybox curl unzip \
&& rm -rf /var/lib/apt/lists/*

ADD . /webui-aria2
ADD ./docs /webui-aria2

# gosu install latest
RUN GITHUB_REPO="https://github.com/tianon/gosu" \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm32v7
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ COPY --from=aria2-builder /builds/aria2c/aria2c /usr/bin/
COPY --from=go-builder /builds/goreman/goreman /usr/local/bin/
COPY --from=go-builder /builds/gosu/gosu /usr/local/bin/

ADD . /webui-aria2
ADD ./docs /webui-aria2

RUN groupadd -r aria \
&& useradd -m -r -g aria aria -u 1000 \
Expand Down
71 changes: 41 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
webui-aria2
===========
# WebUI-Aria2

![Main interface](/screenshots/overview.png?raw=true)

The aim for this project is to create the worlds best and hottest interface to interact with aria2. aria2 is the worlds best file downloader, but sometimes the command line brings more power than necessary. The project was initially created as part of the GSOC scheme, however it has rapidly grown and changed with tremendous support and feedback from the aria2 community.

Very simple to use, no build scripts, no installation scripts. First start aria2 in the background either in your local machine or in a remote one. You can do that as follows:
````bash
aria2c --enable-rpc --rpc-listen-all
````

```bash
aria2c --enable-rpc --rpc-listen-all
```

If aria2 is not installed in your local machine then head on to https://aria2.github.io/ and follow the instructions there.

Then download the webui, you can either do that by downloading this repository and running index.html in the browser. Or you could just head on to https://ziahamza.github.io/webui-aria2/ and just start downloading files! After that you can also save it for offline use by saving from the browser save page as option. You can also use node js to create simple server by using the following command from the download folder.
````bash
Then to use the WebUI-Aria2,

- You can either download this repository and open index.html from `docs` folder.
- Or you could just head on to https://ziahamza.github.io/webui-aria2/ and start downloading files! Once you have visited the URL thanks to [Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) you can open the same URL even when you are offline.
- Or you can also use NodeJS to create simple server by using the following command from the project folder.

```bash
node node-server.js
````
```

# Tips

Tips
====
1. You can always select which files to download in case of torrents or metalinks. Just pause a download and a list icon should appear next to the settings button. To select which files to download before starting the download, give the flag --pause-metadata to aria2. See [link](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption--pause-metadata)

Configuration
=============
Read and edit [configuration.js](configuration.js).
# Configuration

Read and edit [configuration.js](src/js/services/configuration.js).

## DirectURL

DirectURL
---------
This feature allows users to download files that they download from aria2 directly from the webui dashboard. If you are familiar with how webservers work, setup a http server that points at the configured aria2 download directory, check permissions. Then Specify a full url: ```http://server:port/``` in the webui directURL configuration.
This feature allows users to download files that they download from aria2 directly from the webui dashboard. If you are familiar with how webservers work, setup a http server that points at the configured aria2 download directory, check permissions. Then Specify a full url: `http://server:port/` in the webui directURL configuration.

If the above is not obvious, keep reading what this is about in [directurl.md](directurl.md)

Dependencies
============
# Dependencies

Well, you need aria2. And a web browser (if that even counts!)

Docker support
==============
# Docker support

There is two Dockerfile in this project, one is a common Dockerfile, which can be use for **testing purpose**.<br>
The second is a **production ready** Dockerfile for arm32v7 plateforms (which includes raspberry).

Expand All @@ -47,15 +51,15 @@ You can also try or use webui-aria2 in your LAN inside a Docker sandbox.

Build the image

````bash
```bash
sudo docker build -t yourname/webui-aria2 .
````
```

..and run it! It will be available at: `http://localhost:9100`

````bash
```bash
sudo docker run -v /Downloads:/data -p 6800:6800 -p 9100:8080 --name="webui-aria2" yourname/webui-aria2
````
```

`/Downloads` is the directory in the host where you want to keep the downloaded files

Expand All @@ -64,11 +68,13 @@ sudo docker run -v /Downloads:/data -p 6800:6800 -p 9100:8080 --name="webui-aria
This image contains both aria2 and webui-aria2.

Build it (may take several hours due to the aria2 compilation process. Don't panic and grab a coffee).

```
docker build -f Dockerfile.arm32v7 -t yourname/webui-aria2 .
```

This command will ends up building three images:

- The first one is just about compiling aria2 and goreman binaries. It MUST be deleted each time the `ARIA2_VERSION` is changed in the Dockerfile, otherwise you won't benefit from the update.
- The second is about building and downloading some go dependencies (goreman and gosu).
- The second one is the acutal aria2 container, the one you must use.
Expand All @@ -84,6 +90,7 @@ This image required few file to be mounted in the container.
```

Run it

```
docker run --restart=always \
-v /home/<USER>/data/aria2/downloads:/data/downloads \
Expand All @@ -93,14 +100,18 @@ docker run --restart=always \
-d yourname/webui-aria2
```

Deploy to Heroku
==============
# Contributing

Checkout [contributor's guide](CONTRIBUTING.md) to know more about how to contribute to this project.

# Deploy to Heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

Support
=======
# Support

For any support, feature request and bug report add an issue in the github project. [link](https://github.com/ziahamza/webui-aria2/issues)

License
=======
# License

Refer to the LICENSE file (MIT License). If the more liberal license is needed then add it as an issue
46 changes: 0 additions & 46 deletions configuration.js

This file was deleted.

6 changes: 0 additions & 6 deletions css/bootstrap.min.css

This file was deleted.

1 change: 0 additions & 1 deletion css/flag-icon.min.css

This file was deleted.

4 changes: 0 additions & 4 deletions css/font-awesome.min.css

This file was deleted.

Loading