Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packages/react-contextual-pane @microsoft/teams-prg
packages/react-virtualizer @microsoft/xc-uxe @microsoft/cxe-prg
packages/react-cap-theme @microsoft/cap-theme
packages/cap-foundations @microsoft/cap-theme
packages/react-app-launcher @blendsdk
# <%= NX-CODEOWNER-PLACEHOLDER %>

#### Build/Infra
Expand Down
3 changes: 3 additions & 0 deletions packages/react-app-launcher/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../babel.config.json"
}
11 changes: 11 additions & 0 deletions packages/react-app-launcher/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { StorybookConfig } from '@storybook/react-webpack5';

// eslint-disable-next-line @nx/enforce-module-boundaries
import rootConfig from '../../../.storybook/main';

const config: StorybookConfig = {
...rootConfig,
stories: ['../stories/**/index.stories.@(js|jsx|ts|tsx|mdx)'],
};

export default config;
11 changes: 11 additions & 0 deletions packages/react-app-launcher/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Preview } from '@storybook/react';

// eslint-disable-next-line @nx/enforce-module-boundaries
import rootPreview from '../../../.storybook/preview';

const preview: Preview = {
...rootPreview,
tags: ['autodocs'],
};

export default preview;
27 changes: 27 additions & 0 deletions packages/react-app-launcher/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"emitDecoratorMetadata": true,
"outDir": ""
},
"files": [
"../../../node_modules/@nx/react/typings/styled-jsx.d.ts",
"../../../node_modules/@nx/react/typings/cssmodule.d.ts",
"../../../node_modules/@nx/react/typings/image.d.ts"
],
"exclude": [
"../**/*.spec.ts",
"../**/*.spec.js",
"../**/*.spec.tsx",
"../**/*.spec.jsx"
],
"include": [
"../stories/**/*.stories.ts",
"../stories/**/*.stories.js",
"../stories/**/*.stories.jsx",
"../stories/**/*.stories.tsx",
"../stories/**/*.stories.mdx",
"*.ts",
"*.js"
]
}
30 changes: 30 additions & 0 deletions packages/react-app-launcher/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"jsc": {
"target": "es2019",
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"transform": {
"react": {
"runtime": "classic",
"useSpread": true
}
},
"keepClassNames": true,
"externalHelpers": true,
"loose": true
},
"sourceMaps": true,
"exclude": [
"jest.config.ts",
".*\\.spec.tsx?$",
".*\\.test.tsx?$",
"./src/jest-setup.ts$",
"./**/jest-setup.ts$",
".*.js$"
],
"$schema": "https://json.schemastore.org/swcrc"
}
226 changes: 226 additions & 0 deletions packages/react-app-launcher/README.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions packages/react-app-launcher/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
30 changes: 30 additions & 0 deletions packages/react-app-launcher/jest.config.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint-disable */
const { readFileSync } = require('fs');

// Reading the SWC compilation config and remove the "exclude"
// for the test files to be compiled by SWC
const { exclude: _, ...swcJestConfig } = JSON.parse(
readFileSync(`${__dirname}/.swcrc`, 'utf-8')
);

// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves.
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude"
if (swcJestConfig.swcrc === undefined) {
swcJestConfig.swcrc = false;
}

// Uncomment if using global setup/teardown files being transformed via swc
// https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries
// jest needs EsModule Interop to find the default exported setup/teardown functions
// swcJestConfig.module.noInterop = false;

module.exports = {
displayName: 'react-app-launcher',
preset: '../../jest.preset.js',
transform: {
'^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig],
},
moduleFileExtensions: ['js', 'ts', 'tsx', 'html'],
testEnvironment: 'jsdom',
coverageDirectory: '../../coverage/packages/react-app-launcher',
};
17 changes: 17 additions & 0 deletions packages/react-app-launcher/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@fluentui-contrib/react-app-launcher",
"version": "0.0.1",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"dependencies": {
"@fluentui/react-jsx-runtime": "^9.0.29",
"@swc/helpers": "~0.5.11"
},
"peerDependencies": {
"@fluentui/react-components": ">=9.70.0 <10.0.0",
"@fluentui/react-icons": ">=2.0.204 <3.0.0",
"@types/react": ">=16.8.0 <20.0.0",
"react": ">=16.8.0 <20.0.0"
},
"private": true
}
57 changes: 57 additions & 0 deletions packages/react-app-launcher/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "react-app-launcher",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/react-app-launcher/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@fluentui-contrib/nx-plugin:build"
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"packages/react-app-launcher/**/*.ts",
"packages/react-app-launcher/**/*.tsx"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/react-app-launcher/jest.config.cts",
"passWithNoTests": true
}
},
"type-check": {
"executor": "@fluentui-contrib/nx-plugin:type-check"
},
"storybook": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 4400,
"configDir": "packages/react-app-launcher/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"build-storybook": {
"executor": "@nx/storybook:build",
"outputs": ["{options.outputDir}"],
"options": {
"outputDir": "dist/storybook/react-app-launcher",
"configDir": "packages/react-app-launcher/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
}
}
}
Loading