-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(workers-shared): Project configuration and beta prereleases (#6437
) * chore(workers-shared): Put proper project configuration in place This commit properly sets up the `workers-shared` project, by putting the necessary linting, TS compilation, and `package.json` configuration in place. It also enables `@beta` prereleases for `workers-shared`. * chore(gh-actions): Enable `@beta` prereleases for `workers-shared` * PR feedback
- Loading branch information
1 parent
d55eeca
commit 5d149b9
Showing
6 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,5 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["@cloudflare/eslint-config-worker"], | ||
ignorePatterns: ["dist"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 1,5 @@ | ||
export default { | ||
async fetch(request, env) { | ||
async fetch() { | ||
return new Response("Hello from Asset Server Worker 🚀"); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 2,50 @@ | |
"name": "@cloudflare/workers-shared", | ||
"version": "0.1.0", | ||
"description": "Package that is used at Cloudflare to power some internal features of Cloudflare Workers.", | ||
"keywords": [ | ||
"cloudflare", | ||
"workers", | ||
"cloudflare workers" | ||
], | ||
"homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/workers-shared#readme", | ||
"bugs": { | ||
"url": "https://github.com/cloudflare/workers-sdk/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/cloudflare/workers-sdk.git", | ||
"directory": "packages/workers-shared" | ||
}, | ||
"license": "MIT OR Apache-2.0", | ||
"author": "[email protected]", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "pnpm run clean && pnpm run bundle:asset-server", | ||
"build": "pnpm run clean && pnpm run bundle:asset-server:prod", | ||
"bundle:asset-server": "esbuild asset-server-worker/src/index.ts --format=esm --bundle --outfile=dist/asset-server-worker.mjs --sourcemap=external", | ||
"bundle:asset-server:prod": "pnpm run bundle:asset-server --minify", | ||
"check:lint": "eslint . --max-warnings=0", | ||
"check:type": "tsc", | ||
"clean": "rimraf dist", | ||
"dev": "pnpm run clean && concurrently -n bundle:asset-server -c blue \"pnpm run bundle:asset-server --watch\"" | ||
}, | ||
"devDependencies": { | ||
"@cloudflare/eslint-config-worker": "workspace:*", | ||
"@cloudflare/workers-tsconfig": "workspace:*", | ||
"@cloudflare/workers-types": "^4.20240806.0", | ||
"concurrently": "^8.2.2", | ||
"esbuild": "0.17.19", | ||
"rimraf": "^6.0.1", | ||
"typescript": "^5.5.4" | ||
}, | ||
"engines": { | ||
"node": ">=16.7.0" | ||
}, | ||
"volta": { | ||
"extends": "../../package.json" | ||
}, | ||
"workers-sdk": { | ||
"prerelease": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,12 @@ | ||
{ | ||
"extends": "@cloudflare/workers-tsconfig/tsconfig.json", | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"sourceMap": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"useUnknownInCatchVariables": false, | ||
"types": ["@cloudflare/workers-types"] | ||
}, | ||
"include": ["**/*.ts"], | ||
"exclude": ["node_modules", "dist"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.