Skip to content

Commit

Permalink
chore(ffe-system-message-react): Import component
Browse files Browse the repository at this point in the history
BREAKING CHANGE: the `files` property has been changed to only include
the `lib/` folder. If you imported anything from anywhere else you need
to update your imports to go through the official channels.

With this ffe-system-message-react lives in the monorepo. All new
changes must be done there.
  • Loading branch information
wkillerud committed Jan 26, 2018
1 parent 877c543 commit 6a3152c
Show file tree
Hide file tree
Showing 28 changed files with 189 additions and 469 deletions.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = {
'ffe-spinner',
'ffe-spinner-react',
'ffe-system-message',
'ffe-system-message-react',
'ffe-tables',
'ffe-tables-react',
],
Expand Down
6 changes: 0 additions & 6 deletions packages/ffe-system-message-react/.babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions packages/ffe-system-message-react/.eslintrc.json

This file was deleted.

18 changes: 0 additions & 18 deletions packages/ffe-system-message-react/.gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
#Editors
*~
*.iml

#FFE fonts
dev/ffe/*

#Node
node_modules
npm-debug.log*

#We're not using this but the precommit-hook keeps adding them
.jshintrc
.jshintignore

#Build
lib/
example.html
.idea/
1 change: 0 additions & 1 deletion packages/ffe-system-message-react/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
registry=***REMOVED***
package-lock=false
1 change: 0 additions & 1 deletion packages/ffe-system-message-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# CHANGELOG

## Version 2.0.0
* Upgraded to work with ffe-icons-react 4.x.
Expand Down
14 changes: 0 additions & 14 deletions packages/ffe-system-message-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,3 @@ $ npm install --save ffe-system-message-react
Like all React packages in FFE, this package expects the package `ffe-system-message` to be imported in your project's main css- or less-file.

Please see the [docs for usage and API information](src/SystemMessage.md).

## Examples

The current version of the package can be seen in the SB1 Design Manual at [***REMOVED***](***REMOVED***).

## Development

To run a standalone (and extremely simple) application for testing changes to either this component or its sibling CSS package. Clone this repo and run
```
$ npm install && npm run dev
```
This should spin up a server on [localhost:3000](http://localhost:3000).

For testing changes to the CSS package, first run `npm link` in the root of the cloned [ffe-system-message](***REMOVED***) pacakge and then run `npm link ffe-system-message` in the root of this package. Changes in the CSS file(s) should reflect immediately in the app running on port 3000.
3 changes: 3 additions & 0 deletions packages/ffe-system-message-react/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Denne typen meldinger skal kun benyttes til kritiske systemmeldinger som skal eksponeres til brukeren. Kan lukkes.

Det finnes fire typer systemmeldinger:
7 changes: 0 additions & 7 deletions packages/ffe-system-message-react/build.sh

This file was deleted.

38 changes: 0 additions & 38 deletions packages/ffe-system-message-react/dev/dev-app.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/ffe-system-message-react/dev/styles.less

This file was deleted.

3 changes: 0 additions & 3 deletions packages/ffe-system-message-react/example/create-example.js

This file was deleted.

74 changes: 0 additions & 74 deletions packages/ffe-system-message-react/example/example.js

This file was deleted.

42 changes: 0 additions & 42 deletions packages/ffe-system-message-react/flow.sh

This file was deleted.

114 changes: 38 additions & 76 deletions packages/ffe-system-message-react/package.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,40 @@
{
"name": "ffe-system-message-react",
"version": "2.0.0",
"description": "SpareBank 1 System Message komponent",
"main": "lib/index.js",
"scripts": {
"build": "babel -d lib/. --ignore=src/test/ src/. && npm run example",
"dev": "npm run ffe:fonts && hjs-dev-server",
"example": "babel-node example/create-example.js > example.html",
"ffe:fonts": "mkdirp dev/ffe/fonts && cp node_modules/ffe-core/fonts/* dev/ffe/fonts",
"lint": "eslint src/",
"lint:fix": "eslint --fix src/",
"start": "npm run dev",
"test": "cross-env NODE_ENV=test mocha -G --compilers js:babel-core/register --require src/test/setup.js --recursive src/test",
"tdd": "npm test -- --watch",
"validate": "npm ls",
"postpublish": "git tag ${npm_package_version} && git push --tags",
"has-published": "npm show . versions -s | grep -q ${npm_package_version}"
},
"repository": {
"type": "git",
"url": "***REMOVED***"
},
"author": "SpareBank 1",
"pre-commit": [
"lint",
"test"
],
"dependencies": {
"prop-types": "*"
},
"peerDependencies": {
"ffe-icons-react": "4.x",
"ffe-system-message": "1.x || 2.x"
},
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-core": "^6.10.4",
"babel-loader": "^6.4.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.9.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.11.1",
"cross-env": "^1.0.8",
"css-loader": "^0.28.9",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^4.16.0",
"eslint-config-ffe": "^7.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.5.1",
"expect.js": "^0.3.1",
"ffe-core": "^10.3.0",
"ffe-icons-react": "^4.0.5",
"ffe-system-message": "^2.0.0",
"hjs-webpack": "^9.2.0",
"jsdom": "^11.6.0",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"mkdirp": "^0.5.1",
"mocha": "^5.0.0",
"postcss-loader": "^0.9.1",
"precommit-hook": "^3.0.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"sinon": "^4.0.1",
"style-loader": "^0.19.1"
},
"publishConfig": {
"registry": "***REMOVED***"
},
"files": [
"lib",
"example.html",
"*.js"
]
"name": "ffe-system-message-react",
"version": "2.0.0",
"description": "SpareBank 1 System Message komponent",
"main": "lib/index.js",
"files": ["lib"],
"repository": {
"type": "git",
"url":
"***REMOVED***"
},
"author": "SpareBank 1",
"license": "UNLICENSED",
"scripts": {
"build": "babel -d lib/. --ignore=*.spec.js src/.",
"lint": "eslint src/.",
"test:nsp": "nsp check",
"test:spec": "jest",
"test": "npm run test:spec && npm run test:nsp"
},
"dependencies": {
"prop-types": "*"
},
"peerDependencies": {
"ffe-icons-react": "4.x",
"ffe-system-message": "1.x || 2.x"
},
"devDependencies": {
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"ffe-icons-react": "^4.0.5",
"jest": "^22.1.4",
"nsp": "^2.2.0",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"jest": {
"setupTestFrameworkScriptFile": "./test-setup.js"
}
}
5 changes: 5 additions & 0 deletions packages/ffe-system-message-react/src/SystemErrorMessage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```js
<SystemErrorMessage>
Noen av systemene våre er dessverre utilgjengelige akkurat nå.
</SystemErrorMessage>
```
5 changes: 5 additions & 0 deletions packages/ffe-system-message-react/src/SystemInfoMessage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```js
<SystemInfoMessage>
Mobilbanken vil være utilgjengelig førstkommende fredag kl 19-20.
</SystemInfoMessage>
```
Loading

0 comments on commit 6a3152c

Please sign in to comment.