docs(nxdev): remove unused versions & flavors feature (#9462)
This commit is contained in:
parent
933cd5957f
commit
1723e8e6b3
@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
displayName: 'nx-dev-feature-versions-and-flavors',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/next/babel'] }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
||||
coverageDirectory: '../../coverage//nx-dev/feature-versions-and-flavors',
|
||||
};
|
||||
@ -1,25 +0,0 @@
|
||||
{
|
||||
"root": "nx-dev/feature-versions-and-flavors",
|
||||
"sourceRoot": "nx-dev/feature-versions-and-flavors/src",
|
||||
"projectType": "library",
|
||||
"tags": ["scope:nx-dev", "type:feature"],
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"nx-dev/feature-versions-and-flavors/**/*.{ts,tsx,js,jsx}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nrwl/jest:jest",
|
||||
"outputs": ["coverage/nx-dev/feature-versions-and-flavors"],
|
||||
"options": {
|
||||
"jestConfig": "nx-dev/feature-versions-and-flavors/jest.config.js",
|
||||
"passWithNoTests": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
export * from './lib/flavor-context';
|
||||
@ -1,38 +0,0 @@
|
||||
import { VersionMetadata } from '@nrwl/nx-dev/data-access-documents';
|
||||
import { createContext, ReactNode, useContext } from 'react';
|
||||
|
||||
interface VersionsAndFlavorsContextValue {
|
||||
versions: VersionMetadata[];
|
||||
activeVersion: VersionMetadata;
|
||||
isFallbackActiveFlavor?: boolean;
|
||||
}
|
||||
|
||||
const VersionsContext = createContext<null | VersionsAndFlavorsContextValue>(
|
||||
null
|
||||
);
|
||||
|
||||
const missingErrorMessage =
|
||||
'Context not found. Did you include <VersionsProvider> in your app?';
|
||||
|
||||
export function useVersions(): VersionMetadata[] {
|
||||
const ctx = useContext(VersionsContext);
|
||||
if (!ctx) throw new Error(missingErrorMessage);
|
||||
return ctx.versions;
|
||||
}
|
||||
|
||||
export function useActiveVersion(): VersionMetadata {
|
||||
const ctx = useContext(VersionsContext);
|
||||
if (!ctx) throw new Error(missingErrorMessage);
|
||||
return ctx.activeVersion;
|
||||
}
|
||||
|
||||
export function VersionsAndFlavorsProvider(props: {
|
||||
value: VersionsAndFlavorsContextValue;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<VersionsContext.Provider value={props.value}>
|
||||
{props.children}
|
||||
</VersionsContext.Provider>
|
||||
);
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": ["node"]
|
||||
},
|
||||
"files": [
|
||||
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
|
||||
"../../node_modules/@nrwl/next/typings/image.d.ts"
|
||||
],
|
||||
"exclude": ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.tsx", "**/*.test.tsx"],
|
||||
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.tsx",
|
||||
"**/*.test.tsx",
|
||||
"**/*.spec.js",
|
||||
"**/*.test.js",
|
||||
"**/*.spec.jsx",
|
||||
"**/*.test.jsx",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -59,7 +59,11 @@
|
||||
"ignore": ["**/tsconfig*.json"],
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -53,7 +53,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -51,7 +51,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -38,7 +38,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -56,7 +56,11 @@
|
||||
"ignore": ["**/jest.config.js"],
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -56,7 +56,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -46,7 +46,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -51,7 +51,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -53,7 +53,11 @@
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{ "input": "", "glob": "LICENSE", "output": "/" }
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
"nx-dev-feature-doc-viewer": "nx-dev/feature-doc-viewer",
|
||||
"nx-dev-feature-search": "nx-dev/feature-search",
|
||||
"nx-dev-feature-storage": "nx-dev/feature-storage",
|
||||
"nx-dev-feature-versions-and-flavors": "nx-dev/feature-versions-and-flavors",
|
||||
"nx-dev-ui-commands": "nx-dev/ui-commands",
|
||||
"nx-dev-ui-common": "nx-dev/ui-common",
|
||||
"nx-dev-ui-community": "nx-dev/ui-community",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user