Skip to content

Commit

Permalink
feat(keyboard-keys): Init new package (not published)
Browse files Browse the repository at this point in the history
Initializes the auto-generated artifacts for the new
`@fluentui/keyboard-keys` package as proposed in #18587

**Does not publish the package immediately**
  • Loading branch information
ling1726 committed Jul 2, 2021
1 parent 6c37a1c commit e251133
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 2 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ module.exports = {
'<rootDir>/packages/react-utilities',
'<rootDir>/packages/react-theme',
'<rootDir>/packages/react-badge',
'<rootDir>/packages/keyboard-keys',
],
};
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"@fluentui/react-label": { "tags": ["vNext", "platform:web"], "implicitDependencies": [] },
"@fluentui/react-popover": { "tags": ["vNext", "platform:web"], "implicitDependencies": [] },
"nx-workspace-tools": { "tags": [] },
"@fluentui/react-aria": { "tags": ["vNext"], "implicitDependencies": [] }
"@fluentui/react-aria": { "tags": ["vNext"], "implicitDependencies": [] },
"@fluentui/keyboard-keys": { "tags": ["vNext", "platform:web"], "implicitDependencies": [] }
}
}
4 changes: 4 additions & 0 deletions packages/keyboard-keys/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["plugin:@fluentui/eslint-plugin/react"],
"root": true
}
34 changes: 34 additions & 0 deletions packages/keyboard-keys/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
*.api.json
*.config.js
*.log
*.nuspec
*.test.*
*.yml
.editorconfig
.eslintrc*
.eslintcache
.gitattributes
.gitignore
.vscode
coverage
dist/storybook
dist/*.stats.html
dist/*.stats.json
dist/demo
fabric-test*
gulpfile.js
images
index.html
jsconfig.json
node_modules
results
src/**/*
!src/**/examples/*.tsx
!src/**/docs/**/*.md
!src/**/*.types.ts
temp
tsconfig.json
tsd.json
tslint.json
typings
visualtests
15 changes: 15 additions & 0 deletions packages/keyboard-keys/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@fluentui/keyboard-keys

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
3 changes: 3 additions & 0 deletions packages/keyboard-keys/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @fluentui/keyboard-keys

Contains a set of keyboard constants for key and keyCode comparison in components
4 changes: 4 additions & 0 deletions packages/keyboard-keys/config/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@fluentui/scripts/api-extractor/api-extractor.common.json"
}
5 changes: 5 additions & 0 deletions packages/keyboard-keys/config/api-extractor.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "./api-extractor.json",
"mainEntryPointFilePath": "<projectFolder>/dist/<unscopedPackageName>/src/index.d.ts"
}
10 changes: 10 additions & 0 deletions packages/keyboard-keys/etc/keyboard-keys.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## API Report File for "@fluentui/keyboard-keys"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts


// (No @packageDocumentation comment for this package)

```
3 changes: 3 additions & 0 deletions packages/keyboard-keys/just.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { preset } from '@fluentui/scripts';

preset();
37 changes: 37 additions & 0 deletions packages/keyboard-keys/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@fluentui/keyboard-keys",
"version": "9.0.0-alpha.0",
"private": true,
"description": "Contains a set of keyboard constants for key and keyCode",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"typings": "lib/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/microsoft/fluentui"
},
"license": "MIT",
"scripts": {
"build": "just-scripts build",
"clean": "just-scripts clean",
"code-style": "just-scripts code-style",
"just": "just-scripts",
"lint": "just-scripts lint",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/keyboard-keys/src && yarn docs"
},
"devDependencies": {
"@fluentui/eslint-plugin": "^1.3.1",
"@fluentui/scripts": "^1.0.0"
},
"dependencies": {},
"beachball": {
"tag": "alpha",
"disallowedChangeTypes": [
"major",
"minor",
"patch"
]
}
}
2 changes: 2 additions & 0 deletions packages/keyboard-keys/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// TODO: replace with real exports
export {};
17 changes: 17 additions & 0 deletions packages/keyboard-keys/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES5",
"module": "CommonJS",
"lib": ["es5", "dom"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["custom-global"]
}
}
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"@fluentui/react-label": ["packages/react-label/src/index.ts"],
"@fluentui/jest-serializer-make-styles": ["packages/jest-serializer-make-styles/src/index.ts"],
"@fluentui/babel-make-styles": ["packages/babel-make-styles/src/index.ts"],
"@fluentui/react-badge": ["packages/react-badge/src/index.ts"]
"@fluentui/react-badge": ["packages/react-badge/src/index.ts"],
"@fluentui/keyboard-keys": ["packages/keyboard-keys/src/index.ts"]
}
},
"exclude": ["node_modules"]
Expand Down
5 changes: 5 additions & 0 deletions workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
"root": "packages/react-aria",
"projectType": "library",
"sourceRoot": "packages/react-aria/src"
},
"@fluentui/keyboard-keys": {
"root": "packages/keyboard-keys",
"projectType": "library",
"sourceRoot": "packages/keyboard-keys/src"
}
}
}

0 comments on commit e251133

Please sign in to comment.