Skip to content

Commit

Permalink
feat: 🎸 create nx-cloudflare-wrangler project
Browse files Browse the repository at this point in the history
  • Loading branch information
klaascuvelier committed Jun 3, 2022
1 parent 60b3c18 commit 7a5c392
Show file tree
Hide file tree
Showing 14 changed files with 348 additions and 230 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ A set of very poorly documented and maintained plugins for NX workspaces.

## Available packages

| Package | Description |
|-------------------------------------------------------------|-------------------------------------------------------|
| [nx-deno-deploy](./packages/nx-deno-deploy/README.md) | Deploy projects to Deno deploy |
| [nx-netlify-deploy](./packages/nx-netlify-deploy/README.md) | Deployer and generator for Netlify pages |
| [nx-rsync-deployer](./packages/nx-rsync-deployer/README.md) | Deployer to upload app artifacts using _rsync_ |
| [nx-sst](./packages/nx-sst/README.md) | Generator and executors for Serverless Stack projects |
| Package | Description |
|--------------------------------------------------------------|---------------------------------------------------------------------|
| [nx-cloudflare-wrangler](./packages/nx-cloudflare-wrangler/) | Generator and executors for Cloudflare wrangler (workers and pages) |
| [nx-deno-deploy](./packages/nx-deno-deploy/) | Deploy projects to Deno deploy |
| [nx-netlify-deploy](./packages/nx-netlify-deploy/) | Deployer and generator for Netlify pages |
| [nx-rsync-deployer](./packages/nx-rsync-deployer/) | Deployer to upload app artifacts using _rsync_ |
| [nx-sst](./packages/nx-sst/) | Generator and executors for Serverless Stack projects |

## Contribution

Expand Down
3 changes: 3 additions & 0 deletions packages/nx-cloudflare-wrangler/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
}
18 changes: 18 additions & 0 deletions packages/nx-cloudflare-wrangler/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions packages/nx-cloudflare-wrangler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# nx-cloudflare-wrangler

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test nx-cloudflare-wrangler` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint nx-cloudflare-wrangler` to execute the lint via [ESLint](https://eslint.org/).
15 changes: 15 additions & 0 deletions packages/nx-cloudflare-wrangler/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
displayName: 'nx-cloudflare-wrangler',
preset: '../../jest.preset.ts',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/packages/nx-cloudflare-wrangler',
};
4 changes: 4 additions & 0 deletions packages/nx-cloudflare-wrangler/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@k11r/nx-cloudflare-wrangler",
"version": "0.0.1"
}
1 change: 1 addition & 0 deletions packages/nx-cloudflare-wrangler/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/nx-cloudflare-wrangler';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { nxCloudflareWrangler } from './nx-cloudflare-wrangler';

describe('nxCloudflareWrangler', () => {
it('should work', () => {
expect(nxCloudflareWrangler()).toEqual('nx-cloudflare-wrangler');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function nxCloudflareWrangler(): string {
return 'nx-cloudflare-wrangler';
}
13 changes: 13 additions & 0 deletions packages/nx-cloudflare-wrangler/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
11 changes: 11 additions & 0 deletions packages/nx-cloudflare-wrangler/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
}
20 changes: 20 additions & 0 deletions packages/nx-cloudflare-wrangler/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.test.tsx",
"**/*.spec.tsx",
"**/*.test.js",
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
]
}
3 changes: 3 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
"@k11r/nx-cloudflare-wrangler": [
"packages/nx-cloudflare-wrangler/src/index.ts"
],
"@k11r/nx-deno-deploy": ["packages/nx-deno-deploy/src/index.ts"],
"@k11r/nx-netlify-deploy": [
"packages/nx-netlify-deploy/src/index.ts"
Expand Down
Loading

0 comments on commit 7a5c392

Please sign in to comment.