Skip to content

Commit

Permalink
Remove insights- repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
karelhala committed Jan 19, 2021
1 parent 17ca360 commit 40a0e0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
script: npm run deploy && curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/bootstrap.sh | bash -s
env:
global:
- REPO="git@github.com:RedHatInsights/insights-frontend-starter-app-build"
- REPO_DIR="insights-frontend-starter-app-build"
- REPO="git@github.com:RedHatInsights/frontend-starter-app-build"
- REPO_DIR="frontend-starter-app-build"
- BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
- NODE_OPTIONS="--max-old-space-size=4096 --max_old_space_size=4096"
68 changes: 11 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/RedHatInsights/insights-frontend-starter-app.svg?branch=master)](https://travis-ci.org/RedHatInsights/insights-frontend-starter-app)
[![Build Status](https://travis-ci.org/RedHatInsights/frontend-starter-app.svg?branch=master)](https://travis-ci.org/RedHatInsights/frontend-starter-app)

# insights-frontend-starter-app
# frontend-starter-app

React.js starter app for Red Hat Insights products that includes Patternfly 4 and shared cloud.redhat.com utilities.

Expand Down Expand Up @@ -60,68 +60,16 @@ Note: You will need to set up the Insights environment if you want to develop wi

## Insights Components

Insights Platform will deliver components and static assets through [npm](https://www.npmjs.com/package/@red-hat-insights/insights-frontend-components). ESI tags are used to import the [chroming](https://github.com/RedHatInsights/insights-chrome) which takes care of the header, sidebar, and footer.
Insights Platform will deliver components and static assets through [npm](https://www.npmjs.com/package/@redhat-cloud-services/frontend-components). ESI tags are used to import the [chroming](https://github.com/RedHatInsights/insights-chrome) which takes care of the header, sidebar, and footer.

## Technologies

### Webpack

#### Webpack.config.js
There is [shared common config](https://www.npmjs.com/package/@redhat-cloud-services/frontend-components-config) with predefined values and lifecycles to build and run your application.

This file exports an object with the configuration for webpack and webpack dev server.
We are used [federated modules](https://webpack.js.org/concepts/module-federation/) to seamlessly load multiple application.

```Javascript
{
mode: https://webpack.js.org/concepts/mode/,
devtool: https://webpack.js.org/configuration/devtool/,

// different bundle options.
// allows you to completely separate vendor code from app code and much more.
// https://webpack.js.org/plugins/split-chunks-plugin/
optimization: {
chunks: https://webpack.js.org/plugins/split-chunks-plugin/#optimization-splitchunks-chunks-all,
runtimeChunk: https://webpack.js.org/plugins/split-chunks-plugin/#optimization-runtimechunk,

// https://webpack.js.org/plugins/split-chunks-plugin/#configuring-cache-groups
cacheGroups: {

// bundles all vendor code needed to run the entry file
common_initial: {
test: // file regex: /[\\/]node_modules[\\/]/,
name: // filename: 'common.initial',
chunks: // chunk type initial, async, all
}
}
},

// each property of entry maps to the name of an entry file
// https://webpack.js.org/concepts/entry-points/
entry: {

// example bunde names
bundle1: 'src/entry1.js',
bundle2: 'src/entry2.js'
},

// bundle output options.
output: {
filename: https://webpack.js.org/configuration/output/#output-filename,
path: https://webpack.js.org/configuration/output/#output-path,
publicPath: https://webpack.js.org/configuration/output/#output-publicpath,
chunkFilename: https://webpack.js.org/configuration/output/#output-chunkfilename
},
module: {
rules: https://webpack.js.org/configuration/module/#module-rules
},

// An array of webpack plugins look at webpack.plugins.js
// https://webpack.js.org/plugins/
plugins: [],

// webpack dev serve options
// https://github.com/webpack/webpack-dev-server
devServer: {}
}
```
### React
Expand Down Expand Up @@ -153,6 +101,8 @@ Redux doesn't have a Dispatcher or support many stores. Instead, there is just a
[Create Store](https://redux.js.org/api-reference/createstore): ```createStore(reducer, preloadedState, enhancer)```
There is helper function used to create store with option to plug reducers on the fly called [getRegistry](https://github.com/RedHatInsights/frontend-components/blob/master/packages/utils/doc/redux.md#reducer-registry) you can see the usage of it throughout this repository.
- methods
- [getState()](https://redux.js.org/api-reference/store#dispatch)
- [dispatch(action)](https://redux.js.org/api-reference/store#dispatch)
Expand Down Expand Up @@ -199,6 +149,10 @@ Ex) [/src/api/System/getSystems.js](https://github.com/RedHatInsights/turbo-octo
- Makes the Redux store available to the connect()
- [connect([mapStateToProps], [mapDispatchToProps], [mergeProps], [options])](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options)
- Connects a React component to a Redux store
- [useSelector](https://react-redux.js.org/api/hooks#useselector)
- Instead of connect's mapStateToProps you can use this hook in function components
- [useDispatch](https://react-redux.js.org/api/hooks#usedispatch)
- Instead of connect's mapDispatchToProps you can use this hook in function components
### React-router-dom
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "insights-frontend-starter-app",
"name": "frontend-starter-app",
"version": "1.1.0",
"private": false,
"scripts": {
Expand Down

0 comments on commit 40a0e0a

Please sign in to comment.