Skip to content

Commit 99c8c92

Browse files
committed
1 parent f4f7147 commit 99c8c92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5105
-7435
lines changed

.babelrc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{
2-
"presets": [
3-
["env", { "modules": false }],
4-
"stage-2"
5-
],
6-
"plugins": ["transform-runtime"],
7-
"env": {
8-
"test": {
9-
"presets": ["env", "stage-2"],
10-
"plugins": [ "istanbul" ]
11-
}
12-
}
13-
}
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-2"
5+
],
6+
"plugins": ["transform-runtime"],
7+
"env": {
8+
"test": {
9+
"presets": ["env", "stage-2"],
10+
"plugins": [ "istanbul" ]
11+
}
12+
}
13+
}

.dockerignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
assets/
2-
testdata/
3-
caddy/
4-
.github/
1+
assets/
2+
testdata/
3+
caddy/
4+
.github/

.editorconfig

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
root = true
2-
3-
[*]
4-
charset = utf-8
5-
indent_style = space
6-
indent_size = 2
7-
end_of_line = lf
8-
insert_final_newline = true
9-
trim_trailing_whitespace = true
10-
11-
# 4 space indentation
12-
[*.go]
13-
indent_style = tab
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# 4 space indentation
12+
[*.go]
13+
indent_style = tab
1414
indent_size = 4

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
build/*.js
2-
config/*.js
1+
build/*.js
2+
config/*.js

.eslintrc.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
// http://eslint.org/docs/user-guide/configuring
2-
3-
module.exports = {
4-
root: true,
5-
parser: 'babel-eslint',
6-
parserOptions: {
7-
sourceType: 'module'
8-
},
9-
env: {
10-
browser: true,
11-
},
12-
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13-
extends: 'standard',
14-
// required to lint *.vue files
15-
plugins: [
16-
'html'
17-
],
18-
// add your custom rules here
19-
'rules': {
20-
// allow paren-less arrow functions
21-
'arrow-parens': 0,
22-
// allow async-await
23-
'generator-star-spacing': 0,
24-
// allow debugger during development
25-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
26-
}
27-
}
1+
// http://eslint.org/docs/user-guide/configuring
2+
3+
module.exports = {
4+
root: true,
5+
parser: 'babel-eslint',
6+
parserOptions: {
7+
sourceType: 'module'
8+
},
9+
env: {
10+
browser: true,
11+
},
12+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13+
extends: 'standard',
14+
// required to lint *.vue files
15+
plugins: [
16+
'html'
17+
],
18+
// add your custom rules here
19+
'rules': {
20+
// allow paren-less arrow functions
21+
'arrow-parens': 0,
22+
// allow async-await
23+
'generator-star-spacing': 0,
24+
// allow debugger during development
25+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
26+
}
27+
}

.github/ISSUE_TEMPLATE.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
### Instructions (remove before submitting):
2-
3-
1. Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com.
4-
2. If you are filing a bug report, please answer the following questions.
5-
3. If your issue is not a bug report, you do not need to use this template.
6-
4. If not using with Caddy, ignore questions 1 and 2.
7-
8-
### 1. Have you downloaded File Manager from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Manager's repository?
9-
10-
### 2. What is your entire Caddyfile?
11-
```text
12-
(Put Caddyfile here)
13-
```
14-
15-
### 3. What are you trying to do?
16-
17-
18-
### 4. What did you expect to see?
19-
20-
21-
### 5. What did you see instead (give full error messages and/or log)?
22-
23-
24-
### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible?
1+
### Instructions (remove before submitting):
2+
3+
1. Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com.
4+
2. If you are filing a bug report, please answer the following questions.
5+
3. If your issue is not a bug report, you do not need to use this template.
6+
4. If not using with Caddy, ignore questions 1 and 2.
7+
8+
### 1. Have you downloaded File Manager from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Manager's repository?
9+
10+
### 2. What is your entire Caddyfile?
11+
```text
12+
(Put Caddyfile here)
13+
```
14+
15+
### 3. What are you trying to do?
16+
17+
18+
### 4. What did you expect to see?
19+
20+
21+
### 5. What did you see instead (give full error messages and/or log)?
22+
23+
24+
### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible?

.goreleaser.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
build:
2-
main: cmd/filemanager/main.go
3-
binary: filemanager
4-
goos:
5-
- darwin
6-
- linux
7-
- windows
8-
- freebsd
9-
- netbsd
10-
- openbsd
11-
goarch:
12-
- amd64
13-
- 386
14-
- arm
15-
- arm64
16-
ignore:
17-
- goos: openbsd
18-
goarch: arm
19-
goarm: 6
20-
- goos: freebsd
21-
goarch: arm
22-
goarm: 6
23-
24-
archive:
25-
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}"
26-
format: tar.gz
27-
format_overrides:
28-
- goos: windows
29-
format: zip
1+
build:
2+
main: cmd/filemanager/main.go
3+
binary: filemanager
4+
goos:
5+
- darwin
6+
- linux
7+
- windows
8+
- freebsd
9+
- netbsd
10+
- openbsd
11+
goarch:
12+
- amd64
13+
- 386
14+
- arm
15+
- arm64
16+
ignore:
17+
- goos: openbsd
18+
goarch: arm
19+
goarm: 6
20+
- goos: freebsd
21+
goarch: arm
22+
goarm: 6
23+
24+
archive:
25+
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}"
26+
format: tar.gz
27+
format_overrides:
28+
- goos: windows
29+
format: zip

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
# Contributor Covenant Code of Conduct
2-
3-
## Our Pledge
4-
5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6-
7-
## Our Standards
8-
9-
Examples of behavior that contributes to creating a positive environment include:
10-
11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
16-
17-
Examples of unacceptable behavior by participants include:
18-
19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
24-
25-
## Our Responsibilities
26-
27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28-
29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30-
31-
## Scope
32-
33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34-
35-
## Enforcement
36-
37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hacdias@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38-
39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40-
41-
## Attribution
42-
43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44-
45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hacdias@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Contributing
2-
3-
If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following:
4-
5-
1. `go get github.com/hacdias/filemanager`
6-
2. `cd $GOPATH/src/github.com/hacdias/filemanager`
7-
3. `npm install`
8-
4. `npm run dev` - regenerates the static assets automatically
9-
5. `go install github.com/hacdias/filemanager/cmd/filemanager`
10-
6. Execute `$GOPATH/bin/filemanager`
11-
12-
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository.
13-
14-
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`.
1+
# Contributing
2+
3+
If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following:
4+
5+
1. `go get github.com/hacdias/filemanager`
6+
2. `cd $GOPATH/src/github.com/hacdias/filemanager`
7+
3. `npm install`
8+
4. `npm run dev` - regenerates the static assets automatically
9+
5. `go install github.com/hacdias/filemanager/cmd/filemanager`
10+
6. Execute `$GOPATH/bin/filemanager`
11+
12+
The steps 3 and 4 are only required **if you want to develop the front-end**. Otherwise, you can ignore them. Before pulling, if you made any change on assets folder, you must run the `build.sh` script on the root of this repository.
13+
14+
If you are using this as a Caddy plugin, you should use its [official instructions for plugins](https://github.com/mholt/caddy/wiki/Extending-Caddy#2-plug-in-your-plugin) and import `github.com/hacdias/filemanager/caddy/filemanager`.

Dockerfile

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
FROM golang:alpine
2-
3-
COPY . /go/src/github.com/hacdias/filemanager
4-
5-
WORKDIR /go/src/github.com/hacdias/filemanager
6-
RUN apk add --no-cache git
7-
RUN go get ./...
8-
9-
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager
10-
RUN CGO_ENABLED=0 go build -a
11-
RUN mv filemanager /go/bin/filemanager
12-
13-
FROM scratch
14-
COPY --from=0 /go/bin/filemanager /filemanager
15-
16-
VOLUME /srv
17-
EXPOSE 80
18-
19-
COPY Docker.json /config.json
20-
21-
ENTRYPOINT ["/filemanager"]
22-
CMD ["--config", "/config.json"]
1+
FROM golang:alpine
2+
3+
COPY . /go/src/github.com/hacdias/filemanager
4+
5+
WORKDIR /go/src/github.com/hacdias/filemanager
6+
RUN apk add --no-cache git
7+
RUN go get ./...
8+
9+
WORKDIR /go/src/github.com/hacdias/filemanager/cmd/filemanager
10+
RUN CGO_ENABLED=0 go build -a
11+
RUN mv filemanager /go/bin/filemanager
12+
13+
FROM scratch
14+
COPY --from=0 /go/bin/filemanager /filemanager
15+
16+
VOLUME /srv
17+
EXPOSE 80
18+
19+
COPY Docker.json /config.json
20+
21+
ENTRYPOINT ["/filemanager"]
22+
CMD ["--config", "/config.json"]

0 commit comments

Comments
 (0)