-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial implementation (#1)
- Loading branch information
1 parent
5c210b8
commit d6ab36e
Showing
84 changed files
with
4,146 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
.github/workflows/nx-cloud-agents.yml | ||
.github/workflows/nx-cloud-main.yml | ||
.angular | ||
pnpm-lock.yaml |
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 |
---|---|---|
|
@@ -10,6 +10,10 @@ TODO | |
|
||
TODO | ||
|
||
## Supported options from the Angular CLI | ||
|
||
TODO | ||
|
||
## Local development | ||
|
||
TODO |
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
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
57 changes: 57 additions & 0 deletions
57
packages/ngx-esbuild/src/executors/build/esbuild/get-esbuild-options.spec.ts
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,57 @@ | ||
import { getEsbuildOptions } from './get-esbuild-options'; | ||
|
||
jest.mock('node:fs', () => { | ||
return { | ||
promises: { | ||
readFile: jest.fn().mockReturnValue('<html></html>'), | ||
}, | ||
}; | ||
}); | ||
|
||
describe('getEsbuildOptions', () => { | ||
it('should get all options', async () => { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { plugins, ...options } = await getEsbuildOptions( | ||
{ | ||
main: 'main.ts', | ||
polyfills: ['polyfills.ts'], | ||
tsConfig: 'tsconfig.json', | ||
index: 'index.html', | ||
outputPath: 'dist', | ||
}, | ||
{ | ||
browserTarget: 'build:browser', | ||
}, | ||
{ | ||
serve: false, | ||
esbuildTarget: 'es2022', | ||
}, | ||
'client', | ||
process.cwd() | ||
); | ||
|
||
expect(options).toMatchInlineSnapshot(` | ||
{ | ||
"bundle": true, | ||
"entryNames": "[name].[hash]", | ||
"entryPoints": [ | ||
"main.ts", | ||
], | ||
"format": "esm", | ||
"metafile": true, | ||
"outdir": "dist", | ||
"sourcemap": true, | ||
"splitting": true, | ||
"supported": { | ||
"async-await": false, | ||
"async-generator": false, | ||
"class-field": false, | ||
"class-static-field": false, | ||
"for-await": false, | ||
}, | ||
"target": "es2022", | ||
"tsconfig": "tsconfig.json", | ||
} | ||
`); | ||
}); | ||
}); |
Oops, something went wrong.