-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from merative/feature/1.1.0_releaseCandidate
Feature/1.1.0 release candidate
- Loading branch information
Showing
79 changed files
with
9,283 additions
and
3,106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Licensed Materials - Property of IBM | ||
* | ||
* PID 5725-H26 | ||
* | ||
* Copyright IBM Corporation 2020. All Rights Reserved. | ||
* | ||
* US Government Users Restricted Rights - Use, duplication or disclosure | ||
* restricted by GSA ADP Schedule Contract with IBM Corp. | ||
*/ | ||
|
||
import Enzyme from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
// Ensure any error output to console is flagged as a failing test | ||
global.console.error = (error) => { | ||
throw new Error(error); | ||
}; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Licensed Materials - Property of IBM | ||
* | ||
* PID 5725-H26 | ||
* | ||
* Copyright IBM Corporation 2020. All Rights Reserved. | ||
* | ||
* US Government Users Restricted Rights - Use, duplication or disclosure | ||
* restricted by GSA ADP Schedule Contract with IBM Corp. | ||
*/ | ||
|
||
module.exports = { | ||
rootDir: '../', | ||
collectCoverageFrom: [ | ||
'<rootDir>/packages/**/src/**/*.js', | ||
'!<rootDir>/packages/**/src/apollo-client-hooks/**/*.js', | ||
'!<rootDir>/packages/**/index.js', | ||
'!<rootDir>/packages/**/*stories.js', | ||
'!<rootDir>/packages/**/*Exports.js' | ||
], | ||
transform: { | ||
'^.+\\.js|jsx$': 'babel-jest', | ||
}, | ||
modulePathIgnorePatterns: [ | ||
'<rootDir>/packages/carbon-addons-devenv/package.json', | ||
], | ||
setupFilesAfterEnv: [ | ||
'<rootDir>/config/jest-setup.js', | ||
], | ||
coverageThreshold: { | ||
packages: { | ||
branches: 80, | ||
functions: 85, | ||
lines: 85, | ||
statements: 85, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"source": { | ||
"include": ["packages/carbon-addons-devenv/src/react", "packages/custom-carbon-addons/src/react"], | ||
"includePattern": ".+\\.js(doc|x)?$", | ||
"excludePattern": "(^|\\/|\\\\)_" | ||
}, | ||
"opts": { | ||
"destination": "docs", | ||
"recurse": true, | ||
"readme": "README.md" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Building during development | ||
description: Building components during development | ||
--- | ||
|
||
Build your components in your development environment during development. For more information about commands and command configuration, see the [Command reference](command-reference). | ||
|
||
|
||
1. Build your component. Ideally, run this command each time you add new files to the repository. | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
2. Run a development build to integrate the component with the web client application. Any updates you make to existing files while the development build is running are reflected in the application. | ||
|
||
If you don't use the GraphQL mock service, use this command to run the development build. The GraphQL data from the REST Service is used. | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
If you use the GraphQL mock service, use this command to run the development build. The command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in Social Program Management. | ||
|
||
``` | ||
export GRAPHQL_SERVER_URL=http://localhost:4000/graphql && npm run dev-with-mockgraphql | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
title: Command reference | ||
description: Command reference | ||
--- | ||
|
||
After the code is installed and configured, the following commands are available: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
This command builds the deliverable artefacts from the installed codebase. For more information, see [Building during development](build). | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
This command tests the integration with Social Program Management. It requires the `CLIENT_DIR` environment variable to be set. | ||
It copies the generated artefects from `npm run build` to the location where they can be picked up by Social Program Management. | ||
After you run the command, any JavaScript or SCSS files that are updated are automatically generated. For more information, see [Building during development](build). | ||
|
||
``` | ||
export GRAPHQL_SERVER_URL=http://localhost:4000/graphql && npm run dev-with-mockgraphql | ||
``` | ||
|
||
This command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in SPM. It requires the `CLIENT_DIR` environment variable to be set. | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
This command runs the JavaScript unit tests for React components that you have created. Some sample tests are provided in the code base for guidance. | ||
|
||
``` | ||
npm run coverage | ||
``` | ||
|
||
This command generates a report on JavaScript code coverage. If coverage falls below a certain threshold that is specified for code coverage the report fails to be generated. | ||
|
||
``` | ||
npm run gen-doc | ||
``` | ||
|
||
This command generates the documentation for React components that are being developed. It is based on JSDoc, see [https://jsdoc.app/](https://jsdoc.app/). | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
This command enforces coding best practices for React components in JavaScript and SCSS. | ||
|
||
``` | ||
npm run analyze-bundle | ||
``` | ||
|
||
This command generates a HTML report (reports/bundle-size.html) that shows a breakdown of each generated JavaScript file in terms | ||
of how much footprint (size in KB) each third-party library contributes to their overall size. | ||
|
||
``` | ||
npm run storybook | ||
``` | ||
|
||
This command starts Storybook, which shows how to use the components with examples. | ||
|
||
``` | ||
npm run deploy | ||
``` | ||
|
||
This command copies the compiled JavaScript to the specified web client custom component for deployment. For more information, see [Deploying components](deployment). |
Oops, something went wrong.