mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fixed build for all the packages
This commit is contained in:
@@ -10,3 +10,4 @@ scripts
|
||||
docs/**/*.md
|
||||
lib/js-api/docs/**/*.md
|
||||
.storybook
|
||||
webpack.config.js
|
||||
|
@@ -50,7 +50,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/cli/**/*.ts", "lib/cli/**/*.html"]
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/content-services/**/*.ts", "lib/content-services/**/*.html"]
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"build-schematics": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/core/schematics/migrations",
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"lib/core/**/*.ts",
|
||||
|
@@ -11,8 +11,8 @@
|
||||
"projectRoot": "lib/eslint-angular",
|
||||
"outputPath": "dist/libs/eslint-plugin-eslint-angular",
|
||||
"main": "lib/eslint-angular/index.ts",
|
||||
"generatePackageJson": true,
|
||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json",
|
||||
"webpackConfig": "lib/eslint-angular/webpack.config.js",
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": ["lib", "lib/core/src/lib"]
|
||||
},
|
||||
@@ -24,14 +24,13 @@
|
||||
"projectRoot": "lib/eslint-angular",
|
||||
"outputPath": "dist/libs/eslint-plugin-eslint-angular",
|
||||
"main": "lib/eslint-angular/index.ts",
|
||||
"generatePackageJson": true,
|
||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint:eslint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/eslint-angular/**/*.ts"]
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ const messages = {
|
||||
|
||||
type MessageIds = keyof typeof messages;
|
||||
|
||||
const filetypeErrors: {regexp: RegExp; messageId: MessageIds}[] = [
|
||||
const filetypeErrors: { regexp: RegExp; messageId: MessageIds }[] = [
|
||||
{
|
||||
regexp: /.*\.spec\.ts/,
|
||||
messageId: 'useAngularMaterialTestingHarness'
|
||||
@@ -52,8 +52,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
meta: {
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
description: 'Disallows using Angular Material internal selectors',
|
||||
recommended: 'error'
|
||||
description: 'Disallows using Angular Material internal selectors'
|
||||
},
|
||||
hasSuggestions: true,
|
||||
schema: [],
|
||||
@@ -63,9 +62,9 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
create(context) {
|
||||
return {
|
||||
[ASTSelectors.join(',')](node: TSESTree.Literal | TSESTree.TemplateLiteral) {
|
||||
const message = filetypeErrors.find((fileTypeError) =>
|
||||
context.getFilename().match(fileTypeError.regexp)
|
||||
) || { messageId: 'noAngularMaterialSelectors' };
|
||||
const message = filetypeErrors.find((fileTypeError) => context.getFilename().match(fileTypeError.regexp)) || {
|
||||
messageId: 'noAngularMaterialSelectors'
|
||||
};
|
||||
|
||||
context.report({
|
||||
node,
|
||||
|
@@ -21,7 +21,7 @@ import { createESLintRule } from '../../utils/create-eslint-rule/create-eslint-r
|
||||
|
||||
export const RULE_NAME = 'use-none-component-view-encapsulation';
|
||||
|
||||
type MessageIds = 'useNoneComponentViewEncapsulation'| 'suggestAddViewEncapsulationNone';
|
||||
type MessageIds = 'useNoneComponentViewEncapsulation' | 'suggestAddViewEncapsulationNone';
|
||||
type DecoratorForClass = TSESTree.Decorator & {
|
||||
parent: TSESTree.ClassDeclaration;
|
||||
};
|
||||
@@ -53,8 +53,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
meta: {
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
description: `Disallows using other encapsulation than \`${viewEncapsulationNone}\``,
|
||||
recommended: false
|
||||
description: `Disallows using other encapsulation than \`${viewEncapsulationNone}\``
|
||||
},
|
||||
hasSuggestions: true,
|
||||
schema: [],
|
||||
@@ -65,18 +64,13 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
},
|
||||
defaultOptions: [],
|
||||
create(context) {
|
||||
const encapsulationProperty = Selectors.metadataProperty(
|
||||
metadataPropertyName
|
||||
);
|
||||
const encapsulationProperty = Selectors.metadataProperty(metadataPropertyName);
|
||||
const withoutEncapsulationProperty =
|
||||
`${Selectors.COMPONENT_CLASS_DECORATOR}:matches([expression.arguments.length=0], [expression.arguments.0.type='ObjectExpression']:not(:has(${encapsulationProperty})))` as const;
|
||||
const nonNoneViewEncapsulationNoneProperty =
|
||||
`${Selectors.COMPONENT_CLASS_DECORATOR} > CallExpression > ObjectExpression > ` +
|
||||
`${encapsulationProperty}:matches([value.type='Identifier'][value.name='undefined'], [value.object.name='ViewEncapsulation'][value.property.name!='None'])`;
|
||||
const selectors = [
|
||||
withoutEncapsulationProperty,
|
||||
nonNoneViewEncapsulationNoneProperty
|
||||
].join(',');
|
||||
const selectors = [withoutEncapsulationProperty, nonNoneViewEncapsulationNoneProperty].join(',');
|
||||
return {
|
||||
[selectors](node: DecoratorForClass | PropertyInClassDecorator) {
|
||||
context.report({
|
||||
@@ -92,7 +86,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
fixer,
|
||||
importName: 'ViewEncapsulation',
|
||||
moduleName: '@angular/core',
|
||||
node: node.parent.parent.parent.parent
|
||||
node: node.parent
|
||||
}),
|
||||
ASTUtils.isMemberExpression(node.value)
|
||||
? fixer.replaceText(node.value.property, 'None')
|
||||
@@ -107,11 +101,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
||||
moduleName: '@angular/core',
|
||||
node: node.parent
|
||||
}),
|
||||
RuleFixes.getDecoratorPropertyAddFix(
|
||||
node,
|
||||
fixer,
|
||||
`${metadataPropertyName}: ${viewEncapsulationNone}`
|
||||
)
|
||||
RuleFixes.getDecoratorPropertyAddFix(node, fixer, `${metadataPropertyName}: ${viewEncapsulationNone}`)
|
||||
].filter(isNotNullOrUndefined);
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": "src",
|
||||
"types": [
|
||||
"node"
|
||||
"node", "@typescript-eslint/utils"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
|
20
lib/eslint-angular/webpack.config.js
Normal file
20
lib/eslint-angular/webpack.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||
const { join } = require('path');
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: join(__dirname, '../../dist/libs/eslint-angular')
|
||||
},
|
||||
devServer: {
|
||||
port: 4200
|
||||
},
|
||||
plugins: [
|
||||
new NxAppWebpackPlugin({
|
||||
main: './index.ts',
|
||||
tsConfig: './tsconfig.lib.json',
|
||||
index: './index.ts',
|
||||
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
||||
optimization: process.env['NODE_ENV'] === 'production'
|
||||
})
|
||||
]
|
||||
};
|
@@ -32,7 +32,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/extensions/**/*.ts", "lib/extensions/**/*.html"]
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/insights/**/*.ts", "lib/insights/**/*.html"]
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
"prefix": "adf",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"dependsOn": ["build-esm5"],
|
||||
"options": {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
},
|
||||
"build-esm5": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"dependsOn": ["build-esm2015"],
|
||||
"options": {
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
},
|
||||
"build-esm2015": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"dependsOn": ["build-cjs"],
|
||||
"options": {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
},
|
||||
"build-cjs": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/js-api",
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
},
|
||||
"build-types": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/js-api/typings",
|
||||
@@ -76,7 +76,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/js-api/**/*.ts"]
|
||||
|
@@ -33,7 +33,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/process-services-cloud/**/*.ts", "lib/process-services-cloud/**/*.html"]
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/process-services/**/*.ts", "lib/process-services/**/*.html"]
|
||||
}
|
||||
|
@@ -6,12 +6,11 @@
|
||||
"prefix": "adf",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/webpack:webpack",
|
||||
"executor": "@nx/webpack:webpack",
|
||||
"options": {
|
||||
"projectRoot": "lib/testing",
|
||||
"outputPath": "dist/libs/testing",
|
||||
"main": "lib/testing/index.ts",
|
||||
"generatePackageJson": true,
|
||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
||||
"webpackConfig": "lib/testing/webpack.config.js",
|
||||
"stylePreprocessorOptions": {
|
||||
@@ -25,14 +24,13 @@
|
||||
"projectRoot": "lib/testing",
|
||||
"outputPath": "dist/libs/testing",
|
||||
"main": "lib/testing/index.ts",
|
||||
"generatePackageJson": true,
|
||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"executor": "@nx/eslint:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["lib/testing/**/*.ts", "lib/testing/**/*.html"]
|
||||
}
|
||||
|
29
nx.json
29
nx.json
@@ -6,22 +6,12 @@
|
||||
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
||||
"targetDefaults": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"inputs": [
|
||||
"production",
|
||||
"^production"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["production", "^production"],
|
||||
"cache": true
|
||||
},
|
||||
"build-storybook": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{projectRoot}/.storybook/**/*",
|
||||
"{projectRoot}/tsconfig.storybook.json"
|
||||
]
|
||||
"inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"]
|
||||
},
|
||||
"lint": {
|
||||
"cache": true
|
||||
@@ -36,18 +26,12 @@
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheDirectory": "nxcache",
|
||||
"runtimeCacheInputs": [
|
||||
"node -v"
|
||||
]
|
||||
"runtimeCacheInputs": ["node -v"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals"
|
||||
],
|
||||
"default": ["{projectRoot}/**/*", "sharedGlobals"],
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/angular.json",
|
||||
"{workspaceRoot}/demo-shell/src/index.html",
|
||||
@@ -63,5 +47,6 @@
|
||||
"!{projectRoot}/karma.conf.js",
|
||||
"!{projectRoot}/tsconfig.storybook.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"cacheDirectory": "nxcache"
|
||||
}
|
||||
|
6366
package-lock.json
generated
6366
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -117,6 +117,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "6.21.0",
|
||||
"@typescript-eslint/typescript-estree": "7.1.1",
|
||||
"@typescript-eslint/utils": "^8.8.1",
|
||||
"ajv": "^8.12.0",
|
||||
"commander": "12.0.0",
|
||||
"css-loader": "^7.1.2",
|
||||
@@ -130,7 +131,7 @@
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-ban": "^1.6.0",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-jsdoc": "50.6.1",
|
||||
"eslint-plugin-jsdoc": "50.3.1",
|
||||
"eslint-plugin-license-header": "0.6.0",
|
||||
"eslint-plugin-prefer-arrow": "1.2.3",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
@@ -161,7 +162,7 @@
|
||||
"ng-packagr": "17.1.2",
|
||||
"nock": "13.5.5",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"nx": "17.3.1",
|
||||
"nx": "^20.0.0",
|
||||
"postcss": "8.4.41",
|
||||
"postcss-sass": "^0.5.0",
|
||||
"prettier": "2.8.8",
|
||||
|
Reference in New Issue
Block a user