initial commit

This commit is contained in:
Peter Cai 2021-11-24 15:19:03 -05:00
commit f8a89feedf
5 changed files with 2454 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules
dist
wrangler.*

2400
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "xmpp-s3-external",
"version": "1.0.0",
"description": "",
"main": "dist/worker.js",
"scripts": {
"build": "webpack",
"dev": "wrangler -c wrangler.dev.toml dev",
"publish-dev": "wrangler -c wrangler.dev.toml publish",
"publish-prod": "wrangler -c wrangler.prod.toml publish",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "PeterCxy",
"license": "GPL3",
"devDependencies": {
"coffee-loader": "^3.0.0",
"coffeescript": "^2.6.1",
"fast-xml-parser": "^4.0.0-beta.2",
"json-loader": "^0.5.7",
"webpack": "^5.64.3",
"webpack-cli": "^4.9.1"
}
}

2
src/index.coffee Normal file
View File

@ -0,0 +1,2 @@
addEventListener 'fetch', (event) =>
event.respondWith new Response "Hello World"

26
webpack.config.js Normal file
View File

@ -0,0 +1,26 @@
const path = require('path')
module.exports = {
entry: './src/index.coffee',
output: {
filename: 'worker.js',
path: path.join(__dirname, 'dist'),
},
mode: 'production',
resolve: {
extensions: ['.coffee', '.js'],
},
module: {
rules: [
{
test: /\.coffee$/,
use: [ 'coffee-loader' ]
},
{
type: 'javascript/auto',
test: /\.json$/,
use: [ 'json-loader' ]
}
]
}
}