Skip to content

Commit

Permalink
chore(nxext): rename core to common
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikPieper committed Oct 23, 2023
1 parent a3e3fdd commit 4ebc04c
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 40 deletions.
11 changes: 11 additions & 0 deletions packages/common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# common

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

## Building

Run `nx build common` to build the library.

## Running unit tests

Run `nx test common` to execute the unit tests via [Jest](https://jestjs.io).
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable */
export default {
displayName: 'core',
displayName: '@nxext/common',
preset: '../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/core',
coverageDirectory: '../../coverage/packages/common',
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nxext/core",
"name": "@nxext/common",
"version": "17.0.0",
"description": "Core utilities for nxext Nx plugins",
"author": {
Expand Down
20 changes: 10 additions & 10 deletions packages/core/project.json → packages/common/project.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"name": "core",
"name": "common",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/core/src",
"sourceRoot": "packages/common/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/core",
"tsConfig": "packages/core/tsconfig.lib.json",
"packageJson": "packages/core/package.json",
"main": "packages/core/src/index.ts",
"assets": ["packages/core/*.md"]
"outputPath": "dist/packages/common",
"tsConfig": "packages/common/tsconfig.lib.json",
"packageJson": "packages/common/package.json",
"main": "packages/common/src/index.ts",
"assets": ["packages/common/*.md"]
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"packages/core/**/*.ts",
"packages/core/package.json"
"packages/common/**/*.ts",
"packages/common/package.json"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/core/jest.config.ts",
"jestConfig": "packages/common/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions packages/core/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@nx/workspace": "17.0.1",
"@nuxt/kit": "3.6.5",
"nuxi": "3.6.5",
"@nxext/core": "^17.0.0"
"@nxext/common": "*"
},
"peerDependencies": {
"@nx/js": "17.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ensurePackage,
NX_VERSION,
} from '@nx/devkit';
import { mapLintPattern } from '@nxext/core';
import { mapLintPattern } from '@nxext/common';

export async function addLinting(host: Tree, options: NormalizedSchema) {
const tasks: GeneratorCallback[] = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from '../utils/versions';
import { InitSchema } from './schema';
import { initGenerator as jsInitGenerator } from '@nx/js';
import { addPluginToNxJson } from '@nxext/core';
import { addPluginToNxJson } from '@nxext/common';

function updateDependencies(host: Tree) {
const dependencies: Record<string, string> = {
Expand Down
2 changes: 1 addition & 1 deletion packages/stencil/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@nx/workspace": "17.0.1",
"@nx/angular": "17.0.1",
"nx": "17.0.1",
"@nxext/core": "^17.0.0"
"@nxext/common": "*"
},
"peerDependencies": {
"@nxext/svelte": "^16.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
addExportToModule,
} from '../../../utils/angular-ast-utils';
import { getProjectTsImportPath } from '../../storybook-configuration/generator';
import { addAfterLastImport, addImport } from '@nxext/core';
import { addAfterLastImport, addImport } from '@nxext/common';
import { addGlobal } from '@nx/js';

async function prepareAngularLibrary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { STENCIL_OUTPUTTARGET_VERSION } from '../../../utils/versions';
import { addToGitignore } from '../../../utils/utillities';
import * as ts from 'typescript';
import { getDistDir, getRelativePath } from '../../../utils/fileutils';
import { addImport } from '@nxext/core';
import { addImport } from '@nxext/common';
import { addOutputTarget } from '../../../stencil-core-utils';
import { calculateStencilSourceOptions } from '../lib/calculate-stencil-source-options';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { addToGitignore } from '../../../utils/utillities';
import * as ts from 'typescript';
import { getDistDir, getRelativePath } from '../../../utils/fileutils';
import { addImport } from '@nxext/core';
import { addImport } from '@nxext/common';
import { addOutputTarget } from '../../../stencil-core-utils';
import { calculateStencilSourceOptions } from '../lib/calculate-stencil-source-options';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readProjectConfiguration, Tree } from '@nx/devkit';
import { getNpmScope } from '@nx/js/src/utils/package-json/get-npm-scope';
import * as ts from 'typescript';
import { readTsSourceFile } from '@nxext/core';
import { readTsSourceFile } from '@nxext/common';

export function calculateStencilSourceOptions(host: Tree, projectName: string) {
const stencilProjectConfig = readProjectConfiguration(host, projectName);
Expand Down
2 changes: 1 addition & 1 deletion packages/stencil/src/stencil-core-utils/lib/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as ts from 'typescript';
import { readTsSourceFile } from '@nxext/core';
import { readTsSourceFile } from '@nxext/common';
import {
applyChangesToString,
ChangeType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as ts from 'typescript';
import { addToPlugins } from './plugins';
import { applyChangesToString, StringChange, Tree } from '@nx/devkit';
import { readTsSourceFile, addImport } from '@nxext/core';
import { readTsSourceFile, addImport } from '@nxext/common';

export enum SupportedStyles {
css = 'css',
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"tslib": "^2.3.0",
"typescript": "5.1.6",
"nx": "17.0.1",
"@nxext/core": "^17.0.0"
"@nxext/common": "*"
},
"peerDependencies": {
"@nx/js": "17.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/generators/application/lib/add-linting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ensurePackage,
NX_VERSION,
} from '@nx/devkit';
import { mapLintPattern } from '@nxext/core';
import { mapLintPattern } from '@nxext/common';

export async function addLinting(host: Tree, options: NormalizedSchema) {
const tasks: GeneratorCallback[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
joinPathFragments,
} from '@nx/devkit';
import { NormalizedSchema } from '../schema';
import { addImport } from '@nxext/core';
import { addImport } from '@nxext/common';
import * as ts from 'typescript';

export function addExportsToBarrel(host: Tree, options: NormalizedSchema) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
vueVersion,
} from '../utils/versions';
import { InitSchema } from './schema';
import { addPluginToNxJson } from '@nxext/core';
import { addPluginToNxJson } from '@nxext/common';

function updateDependencies(host: Tree, schema: InitSchema) {
let dependencies: Record<string, string> = {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@nxext/angular-swc": ["packages/angular/swc/src/index.ts"],
"@nxext/angular-vite": ["packages/angular/vite/src/index.ts"],
"@nxext/capacitor": ["packages/capacitor/src/index.ts"],
"@nxext/core": ["packages/core/src/index.ts"],
"@nxext/e2e-utils": ["e2e/utils/index.ts"],
"@nxext/ionic-angular": ["packages/ionic-angular/src/index.ts"],
"@nxext/ionic-react": ["packages/ionic-react/src/index.ts"],
Expand All @@ -30,7 +29,8 @@
"@nxext/svelte": ["packages/svelte/src/index.ts"],
"@nxext/vite": ["packages/vite/src/index.ts"],
"@nxext/vitest": ["packages/vitest/src/index.ts"],
"@nxext/vue": ["packages/vue/src/index.ts"]
"@nxext/vue": ["packages/vue/src/index.ts"],
"@nxext/common": ["packages/common/src/index.ts"]
}
},
"exclude": ["node_modules", "tmp"]
Expand Down

0 comments on commit 4ebc04c

Please sign in to comment.