Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ module.exports = {
'@babel/preset-typescript'
],
plugins: [
[
"module-resolver",
{
"alias": {
"@momentum-ui/react-collaboration": "./src/legacy"
}
}
],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
Expand Down
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ applyTo: '**/*'
- `momentum-react-v2` is a React component library using TypeScript
- `momentum-react-v2` is a Shim Layer for React components from NPM package `@momentum-design/components/dist/react`
- Components in the folder `src/components/` are the new components that are supposed to be maintained and used.
- Components in the folder `src/legacy/` are the old components that are deprecated and should not be used in new code.

# Project coding standards

Expand Down
33 changes: 0 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ project, please fork this project.**
- [Project Structure](#project-structure)
- [Code Style](#code-style)
- [New Components](#new-components)
- [Legacy Components](#legacy-components)
- [Scripts](#scripts)
- [CD](#cd)
- [CI](#ci)
Expand All @@ -20,7 +19,6 @@ project, please fork this project.**
- [storybook](#storybook)
- [source](#source)
- [styles](#styles)
- [legacy](#legacy)
- [Submitting Changes](#submitting-changes)
- [License](#license)

Expand Down Expand Up @@ -113,12 +111,9 @@ file structure of this project:
+-+ config/ # configuration files for this project
+-+ dist/ # built distributables
+-+ docs/ # build documentation
+-+ scss/ # legacy component styles ported from @momentum-ui/core
+-+ src/ # source code for this project
+-- components/ # typescript react components
+-- examples/ # legacy examples
+-- helpers/ # enzyme test helpers
+-- legacy/ # legacy react components cloned from the original @momentum-ui/react project
+-- storybook/ # storybook utilities
+-- index.js # entry file for all module exports
```
Expand Down Expand Up @@ -196,34 +191,6 @@ When a changes occur against the new React components in this project, a few sta
- Most components should have a `{component}.documentation.mdx` file that includes a description of
the component.

### Legacy Components

Legacy components should not contain any larger feature work, and are currently in the
**maintenance** SDLC state. Below is their directory model:

```bash
./ # project root directory
+-+ scss/ # styling sub-module
+-+ components/ # scoped styling entry directory
+-+ {component}/ # scoped component styling
+-- {styles}.scss # various scoped styling definitions
+-+ src/ # source code directory
+-- index.js # global react component module entry point
+-+ legacy/ # legacy react components directory
+-- index.js # legacy react component module entry point
+-+ {component}/ # legacy react component directory
+-- index.js # entry point for component, contains the component renderer
+-+ examples/ # examples documentation fo visual testing and docs
+-- index.js # examples module file, imports all files from directory needed
+-- KitchenSink.js # renderer for component states, includes all component states
+-- {state}.js # scoped state for this component
+-+ tests/ # scoped unit test directory
+-- index.spec.js # jest unit test file
+-- index.spec.js.snap # automatically-generated snapshot file
```

While most changes to these components wont require any changes to the module entry files, be aware
that changes in those files may be needed in broad-scoped implementaitons.

## Scripts

Expand Down
2 changes: 0 additions & 2 deletions config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ exports.srcRoot = path.join(exports.repoRoot, 'src/');
exports.distRoot = path.join(exports.repoRoot, 'dist/');
exports.libRoot = path.join(exports.repoRoot, 'lib/');
exports.esRoot = path.join(exports.repoRoot, 'es/');

exports.componentRoot = path.join(exports.srcRoot, 'legacy/');

This file was deleted.

26 changes: 0 additions & 26 deletions config/plop/plopfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,4 @@ module.exports = function (plop) {
return actions;
},
});

plop.setGenerator('legacyStory', {
description: 'Add a story for a legacy component',
prompts: [
{
type: 'input',
name: 'componentName',
message: 'component name, please use appropriate uppercase (e.g. TextField)',
validate: (answer) => answer.length > 0,
},
],
actions: function (data) {
let { componentName } = data;
let actions = [];

actions.push({
type: 'addMany',
templateFiles: 'plop-templates/legacy-component/**',
base: 'plop-templates/legacy-component',
destination: `src/legacy/${componentName}/examples`,
data: { componentName },
});

return actions;
},
});
};
1 change: 0 additions & 1 deletion config/storybook/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ module.exports = {
ESM_DIR: './dist/esm/',
CJS_DIR: './dist/cjs/',
COMPONENTS_DIR: './components/',
LEGACY_COMPONENTS_DIR: './legacy/',
};
7 changes: 2 additions & 5 deletions config/storybook/generateMain.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
const path = require('path');
const { COMPONENTS_DIR, LEGACY_COMPONENTS_DIR } = require('./constants');
const { COMPONENTS_DIR } = require('./constants');

const REPO_ROOT = path.resolve(__dirname, '../../');

const generateMain = (dir) => {
return {
stories: [
path.join(REPO_ROOT, dir, COMPONENTS_DIR, '**/*.stories.@(js|jsx|ts|tsx)'),
path.join(REPO_ROOT, dir, LEGACY_COMPONENTS_DIR, '**/*.stories.@(js|jsx|ts|tsx)'),
],
stories: [path.join(REPO_ROOT, dir, COMPONENTS_DIR, '**/*.stories.@(js|jsx|ts|tsx)')],
addons: [
'@storybook/addon-docs',
'@storybook/addon-links',
Expand Down
1 change: 0 additions & 1 deletion config/typescript/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"extends": "./tsconfig.base.json",
"include": [
"../../src/index.ts",
"../../src/legacy/**/*.*",
"../../src/components/**/*.*",
"../../src/utils/**/*.*"
]
Expand Down
2 changes: 0 additions & 2 deletions config/webpack/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ exports.srcRoot = path.join(exports.repoRoot, 'src/');
exports.distRoot = path.join(exports.repoRoot, 'dist/');
exports.libRoot = path.join(exports.repoRoot, 'lib/');
exports.esRoot = path.join(exports.repoRoot, 'es/');

exports.componentRoot = path.join(exports.srcRoot, 'legacy/');
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"scripts": {
"build": "yarn source:build",
"ci:build": "yarn source:build && yarn source:build:stories && yarn source:copy:images && yarn source:build:documentation && yarn docs:build",
"ci:build": "yarn source:build && yarn source:build:stories && yarn source:build:documentation && yarn docs:build",
"ci:publish": "semantic-release --branches master",
"ci:test:examples": "run-p --race examples:start:esm examples:test",
"ci:test:lint": "yarn lint:src",
Expand All @@ -47,7 +47,6 @@
"examples:start:esm": "node ./config/webpack/server.docs.js",
"examples:start:src": "node ./config/webpack/server.src.js",
"generate:component": "plop component --cwd ./config/plop --dest .",
"generate:legacyStory": "plop legacyStory --cwd ./config/plop --dest .",
"lint": "yarn lint:src && yarn lint:css && yarn lint:config",
"lint:config": "esw \"./config/**/*.{js,jsx,ts,tsx}\"",
"lint:src": "tsc --noEmit --skipLibCheck && esw \"./src/**/*.{js,jsx,ts,tsx}\"",
Expand All @@ -67,7 +66,6 @@
"source:build:stories": "copyfiles -u 1 \"./src/**/*.stories.*\" ./dist/esm && copyfiles -u 1 \"./src/**/*.stories.*\" ./dist/cjs",
"source:build:documentation": "copyfiles -u 1 \"./src/**/*.documentation.*\" ./dist/esm && copyfiles -u 1 \"./src/**/*.documentation.*\" ./dist/cjs",
"source:build:watch": "./node_modules/.bin/nodemon --watch src -e ts,tsx,js,scss --exec yarn source:build",
"source:copy:images": "copyfiles -u 1 \"./src/legacy/**/examples/*.{jpg,png,svg}\" ./dist/esm && copyfiles -u 1 \"./src/legacy/**/examples/*.{jpg,png,svg}\" ./dist/cjs",
"source:test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
"storybook:build": "yarn storybook:clean && yarn storybook:build:esm",
"storybook:build:cjs": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook -c ./config/storybook/cjs -o ./docs",
Expand Down
81 changes: 0 additions & 81 deletions scss/components/accordion/accordion.scss

This file was deleted.

32 changes: 0 additions & 32 deletions scss/components/accordion/examples/default.html

This file was deleted.

34 changes: 0 additions & 34 deletions scss/components/accordion/examples/multi-open.html

This file was deleted.

Empty file.
Loading
Loading