diff --git a/decorate-angular-cli.js b/decorate-angular-cli.js deleted file mode 100644 index fb041d72fc..0000000000 --- a/decorate-angular-cli.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file decorates the Angular CLI with the Nx CLI to enable features such as computation caching - * and faster execution of tasks. - * - * It does this by: - * - * - Patching the Angular CLI to warn you in case you accidentally use the undecorated ng command. - * - Symlinking the ng to nx command, so all commands run through the Nx CLI - * - Updating the package.json postinstall script to give you control over this script - * - * The Nx CLI decorates the Angular CLI, so the Nx CLI is fully compatible with it. - * Every command you run should work the same when using the Nx CLI, except faster. - * - * Because of symlinking you can still type `ng build/test/lint` in the terminal. The ng command, in this case, - * will point to nx, which will perform optimizations before invoking ng. So the Angular CLI is always invoked. - * The Nx CLI simply does some optimizations before invoking the Angular CLI. - * - * To opt out of this patch: - * - Replace occurrences of nx with ng in your package.json - * - Remove the script from your postinstall script in your package.json - * - Delete and reinstall your node_modules - */ - -const fs = require("fs"); -const os = require("os"); -const cp = require("child_process"); -const isWindows = os.platform() === "win32"; -const output = require('nx/src/utils/output').output; - -/** - * Paths to files being patched - */ -const angularCLIInitPath = "node_modules/@angular/cli/lib/cli/index.js"; - -/** - * Patch index.js to warn you if you invoke the undecorated Angular CLI. - */ -function patchAngularCLI(initPath) { - const angularCLIInit = fs.readFileSync(initPath, "utf-8").toString(); - - if (!angularCLIInit.includes("NX_CLI_SET")) { - fs.writeFileSync( - initPath, - ` -if (!process.env['NX_CLI_SET']) { - const { output } = require('@nrwl/workspace'); - output.warn({ title: 'The Angular CLI was invoked instead of the Nx CLI. Use "npx ng [command]" or "nx [command]" instead.' }); -} -${angularCLIInit} - ` - ); - } -} - -/** - * Symlink of ng to nx, so you can keep using `ng build/test/lint` and still - * invoke the Nx CLI and get the benefits of computation caching. - */ -function symlinkNgCLItoNxCLI() { - try { - const ngPath = "./node_modules/.bin/ng"; - const nxPath = "./node_modules/.bin/nx"; - if (isWindows) { - /** - * This is the most reliable way to create symlink-like behavior on Windows. - * Such that it works in all shells and works with npx. - */ - ["", ".cmd", ".ps1"].forEach(ext => { - fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext)); - }); - } else { - // If unix-based, symlink - cp.execSync(`ln -sf ./nx ${ngPath}`); - } - } catch (e) { - output.error({ - title: - "Unable to create a symlink from the Angular CLI to the Nx CLI:" + - e.message - }); - throw e; - } -} - -try { - symlinkNgCLItoNxCLI(); - patchAngularCLI(angularCLIInitPath); - output.log({ - title: "Angular CLI has been decorated to enable computation caching." - }); -} catch (e) { - output.error({ - title: "Decoration of the Angular CLI did not complete successfully" - }); -} diff --git a/lib/stories/.storybook/main.js b/lib/stories/.storybook/main.js deleted file mode 100644 index 05f3e0fde4..0000000000 --- a/lib/stories/.storybook/main.js +++ /dev/null @@ -1,20 +0,0 @@ -const rootMain = require('../../../.storybook/main'); - -module.exports = { - ...rootMain, - core: { ...rootMain.core, builder: 'webpack5' }, - stories: [ - ...rootMain.stories, - '../../core/**/*.stories.@(js|jsx|ts|tsx)', - '../../content-services/**/*.stories.@(js|jsx|ts|tsx)', - '../../process-services-cloud/**/*.stories.@(js|jsx|ts|tsx)' - ], - staticDirs: [ - ...rootMain.staticDirs, - { from: '../../core/src/lib/i18n', to: 'assets/adf-core/i18n' }, - { from: '../../core/src/lib/assets/images', to: 'assets/images' }, - { from: '../../content-services/src/lib/i18n', to: 'assets/adf-content-services/i18n' }, - { from: '../../process-services-cloud/src/lib/i18n', to: 'assets/adf-process-services-cloud/i18n' }, - ], - addons: [...rootMain.addons ] -}; diff --git a/lib/stories/.storybook/manager.js b/lib/stories/.storybook/manager.js deleted file mode 100644 index b5a1a8fa6f..0000000000 --- a/lib/stories/.storybook/manager.js +++ /dev/null @@ -1,6 +0,0 @@ -import { addons } from '@storybook/addons'; -import alfrescoTheme from '../../../.storybook/alfrescoTheme'; - -addons.setConfig({ - theme: alfrescoTheme, -}); diff --git a/lib/stories/.storybook/preview.js b/lib/stories/.storybook/preview.js deleted file mode 100644 index 02894f03ad..0000000000 --- a/lib/stories/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -export const parameters = { - docs: { inlineStories: true }, - controls: { expanded: true } -}; diff --git a/lib/stories/.storybook/tsconfig.json b/lib/stories/.storybook/tsconfig.json deleted file mode 100644 index 801c896d1a..0000000000 --- a/lib/stories/.storybook/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "emitDecoratorMetadata": true - - }, - - "exclude": ["../**/*.spec.ts", "../../core/**/*.spec.ts", "../../content-services/**/*.spec.ts", "../../process-services-cloud/**/*.spec.ts" ], - "include": ["../src/**/*", "*.js", "../../core/**/*", "../../content-services/**/*", "../../process-services-cloud/**/*"] -} diff --git a/lib/stories/README.md b/lib/stories/README.md deleted file mode 100644 index 324764aabc..0000000000 --- a/lib/stories/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Alfresco Stories Library - -Contains a Storybook stories from **Core**, **Content Services** and **Process Services cloud** libraries to gather them in one place. - - - - - -- [Storybook](#storybook) -- [License](#license) - - - - - -## Storybook - -In case you would like to aggregate all the stories across libraries use -``` -nx run stories:storybook -``` -And navigate to `http://localhost:4400/`. - -To create a Storybook stories library build use - -``` -nx run stories:build-storybook -``` - -## License - -[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE) diff --git a/lib/stories/src/index.ts b/lib/stories/src/index.ts deleted file mode 100644 index d8fe8dcf99..0000000000 --- a/lib/stories/src/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * @license - * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - diff --git a/lib/stories/tsconfig.json b/lib/stories/tsconfig.json deleted file mode 100644 index f14da61cdf..0000000000 --- a/lib/stories/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - } - ] -} diff --git a/lib/stories/tsconfig.lib.json b/lib/stories/tsconfig.lib.json deleted file mode 100644 index 9effed8cf1..0000000000 --- a/lib/stories/tsconfig.lib.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "target": "es2015", - "declaration": true, - "declarationMap": true, - "inlineSources": true, - "types": [], - "lib": ["dom", "es2018"] - }, - "angularCompilerOptions": { - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "enableResourceInlining": true - }, - "exclude": [], - "include": ["**/*.ts"] -}