Skip to content

Commit

Permalink
Replace webpack with esbuild.
Browse files Browse the repository at this point in the history
Replace Babel with TypeScript.
Replace Karma with Jest.
Replace ESLint and Stylelint with Prettier.
  • Loading branch information
dom111 committed Apr 28, 2022
1 parent 21f9291 commit 30cb29f
Show file tree
Hide file tree
Showing 59 changed files with 13,774 additions and 9,598 deletions.
24 changes: 0 additions & 24 deletions .babelrc

This file was deleted.

2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

81 changes: 0 additions & 81 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
*.log
~*
tmp
dist
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
assets/css/style-min.css
coverage
dist
examples/*
src/webdav-min.js
tmp
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
12 changes: 0 additions & 12 deletions .stylelintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SHELL = /bin/bash

.PHONY: build
build: docker-compose.override.yml
docker-compose run --rm web npm run build

.PHONY: test
test: docker-compose.override.yml
docker-compose run --rm test npm run test

docker-compose.override.yml:
@echo "version: '3'" > docker-compose.override.yml
@echo >> docker-compose.override.yml
@echo "services:" >> docker-compose.override.yml
@echo " web:" >> docker-compose.override.yml
@echo " user: `id -u`:`id -g`" >> docker-compose.override.yml

dist/js/app.js:
dist/js/app.js: build
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ other frontend approaches to see which I prefer (and also to weigh up the differ
frameworks). There's still work to do around code separation andhopefully this will be something I can continue to work
on (as time allows) I feel it's at least as stable as the previous version.


## Tested in:

- Chrome
- Firefox
- Edge
- IE11 (I may drop support for this to reduce the package size in the future - unless anyone REALY needs it?)


## Implementations

### Bookmarklet:

```javascript:["https://cdn.jsdelivr.net/gh/dom111/webdav-js/assets/css/style-min.css","https://cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js"].forEach((function(e,s){/css$/.test(e)?((s=document.createElement("link")).href=e,s.rel="stylesheet"):(s=document.createElement("script")).src=e,document.head.appendChild(s)}));```
`javascript:["https://cdn.jsdelivr.net/gh/dom111/webdav-js/assets/css/style-min.css","https://cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js"].forEach((function(e,s){/css$/.test(e)?((s=document.createElement("link")).href=e,s.rel="stylesheet"):(s=document.createElement("script")).src=e,document.head.appendChild(s)}));`

[or drag this link directly](javascript:%5B%22https%3A//cdn.jsdelivr.net/gh/dom111/webdav-js/assets/css/style-min.css%22%2C%22https%3A//cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js%22%5D.forEach%28%28function%28e%2Cs%29%7B/css%24/.test%28e%29%3F%28%28s%3Ddocument.createElement%28%22link%22%29%29.href%3De%2Cs.rel%3D%22stylesheet%22%29%3A%28s%3Ddocument.createElement%28%22script%22%29%29.src%3De%2Cdocument.head.appendChild%28s%29%7D%29%29%3B)

Expand All @@ -36,7 +34,6 @@ version of the library, and one using a CDN).
Think you have another example implementation that would be good to showcase?
[Fork this repository](https://github.com/dom111/webdav-js/fork) and make a PR!


## Test the library

Included in the package is a `docker-compose.yml` file that can spawn an Alpine Linux Apache WebDAV server that uses the
Expand All @@ -48,7 +45,6 @@ To start it, run:

and navigate to `http://localhost:8080/`.


## Contributing

If you feel this can be improved (I'm certain it can!), please feel free to fork it and submit a PR.
Expand All @@ -63,7 +59,6 @@ After making changes, ensure you rebuild the application:

Once your changes have compiled you can test using the Docker container.


### Unit Tests

To run the unit tests:
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
- [ ] ReactJS implementation
- [ ] VueJS implementation
- [ ] Native Web Components implementation
- [ ] Angular implementation
- [ ] Angular implementation
3 changes: 2 additions & 1 deletion assets/css/style-min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 30cb29f

Please sign in to comment.