initial commit
This commit is contained in:
commit
f8a89feedf
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
wrangler.*
|
2400
package-lock.json
generated
Normal file
2400
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
23
package.json
Normal file
23
package.json
Normal 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
2
src/index.coffee
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
addEventListener 'fetch', (event) =>
|
||||||
|
event.respondWith new Response "Hello World"
|
26
webpack.config.js
Normal file
26
webpack.config.js
Normal 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' ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue