Skip to content

Commit

Permalink
clean up jest plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryB432 committed Feb 15, 2024
1 parent 3235654 commit f72062b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
18 changes: 4 additions & 14 deletions packages/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,12 @@ yarn create nx-workspace@latest

## Getting Started

Then you need to install the plugin in order to generate extension applications later on.
Then you need to install the plugin in order to generate browser applications later on.

### Installing Plugin

```
# npm
npm install @gb-nx/browser --save-dev
# yarn
yarn add @gb-nx/browser --dev
```

```
npx nx build extension -c=production
npx nx build-scripts extension
npx nx add @gb-nx/browser
```

### Generating Project
Expand All @@ -58,8 +49,6 @@ nx generate @gb-nx/browser:extension --name=my-extension --directory=apps/my-ext

> nx run my-extension:build
> nx run my-extension:build-scripts
Load (or reload) the unpacked extension from `dist/apps/my-extension` with `Manage Extensions` in your browser.

Refresh a browser page
Expand All @@ -74,7 +63,8 @@ Repeat

Run the `zip` target to create a versioned archive of your extension.

> npx nx zip extension --tagGit false
> nx run my-extension:build:production
> nx zip my-extension --tagGit false
## Migrations

Expand Down
2 changes: 2 additions & 0 deletions packages/browser/src/generators/extension/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ describe('extension', () => {
skipSerializers: true,
supportTsx: false,
testEnvironment: 'jsdom',
skipPackageJson: false,
addPlugin: true,
}
);

Expand Down
6 changes: 3 additions & 3 deletions packages/browser/src/generators/extension/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
formatFiles,
generateFiles,
installPackagesTask,
joinPathFragments,
names,
offsetFromRoot,
readProjectConfiguration,
Expand All @@ -13,7 +12,6 @@ import {
import { Linter, lintProjectGenerator } from '@nx/eslint';
import { configurationGenerator as jestConfigGenerator } from '@nx/jest';
import { join } from 'path';
import initGenerator from '../init/generator';
import { normalizeOptions } from './lib/normalize-options';
import type { ExtensionGeneratorOptions, NormalizedOptions } from './schema';

Expand All @@ -28,6 +26,8 @@ async function addJest(
skipSerializers: true,
testEnvironment: 'jsdom',
skipFormat: true,
skipPackageJson: false,
addPlugin: true,
// compiler: options.compiler,
});
}
Expand Down Expand Up @@ -84,7 +84,7 @@ export default async function (
addProjectConfiguration(tree, normalizedOptions.appProjectName, {
root: normalizedOptions.appProjectRoot,
});
await initGenerator(tree, { ...normalizedOptions, skipFormat: true });
// await initGenerator(tree, { ...normalizedOptions, skipFormat: true });
addFiles(tree, normalizedOptions);

const proj = readProjectConfiguration(tree, normalizedOptions.appProjectName);
Expand Down

0 comments on commit f72062b

Please sign in to comment.