Skip to content

Commit 8bbc2cc

Browse files
author
Rares Mardare
committed
tsc-alias ftw!
1 parent 0b2b50e commit 8bbc2cc

File tree

14 files changed

+95
-19
lines changed

14 files changed

+95
-19
lines changed

package-lock.json

Lines changed: 70 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "react-notifications-component",
3-
"version": "3.2.4",
3+
"version": "3.2.5",
44
"homepage": "http://teodosii.github.io/react-notifications-component",
55
"description": "React component for creating notifications on the fly",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"scripts": {
99
"build": "npm run build:library:dev && npm run build:library:prod",
1010
"build:library:dev": "webpack --config webpack.dev.js",
11-
"build:library:prod": "webpack --config webpack.prod.js",
11+
"build:library:prod": "webpack --config webpack.prod.js && tsc-alias",
1212
"build:samples:dev": "webpack --config webpack.samples.dev.js",
1313
"build:samples:prod": "webpack --config webpack.samples.prod.js",
1414
"watch:library": "webpack -w --config webpack.dev.js",
@@ -89,6 +89,7 @@
8989
"sass-loader": "^12.4.0",
9090
"style-loader": "^3.3.1",
9191
"terser-webpack-plugin": "^5.3.0",
92+
"tsc-alias": "^1.5.0",
9293
"tsconfig-paths": "^3.12.0",
9394
"tsconfig-paths-webpack-plugin": "^3.5.2",
9495
"typescript": "^4.5.5",

samples/js/components/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react'
2-
import ReactNotification from 'src'
2+
import { Container } from 'src/components/Container'
33
import Header from './Header'
44
import Content from './Content'
55
import GithubCorner from 'react-github-corner'
66

77
export default function App() {
88
return (
99
<React.Fragment>
10-
<ReactNotification
10+
<Container
1111
types={[
1212
{
1313
htmlClasses: ['rnc__notification-item--awesome'],

samples/js/components/Content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Store } from 'src'
2+
import Store from 'src/store'
33
import ContainerExample from 'components/examples/ContainerExample'
44
import TypeExample from 'components/examples/TypeExample'
55
import InsertExample from 'components/examples/InsertExample'

samples/js/components/examples/AnimationExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import notification from 'samples/js/helpers/notification'
33
import { getContainer, getMessage, getType } from 'samples/js/helpers/randomize'
4-
import { Store } from 'src'
4+
import Store from 'src/store'
55
import { iNotification } from 'src/types'
66

77
function AnimationInExample() {

samples/js/components/examples/ContainerExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import notification from 'samples/js/helpers/notification'
33
import { getMessage, getTitle, getType } from 'samples/js/helpers/randomize'
4-
import { Store } from 'src'
4+
import Store from 'src/store'
55
import { iNotification } from 'src/types'
66

77
export default function ContainerExample() {

samples/js/components/examples/CustomContentExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
22
import notification from 'samples/js/helpers/notification'
33
import reactImage from 'samples/images/react.png'
44
import { getContainer } from 'samples/js/helpers/randomize'
5-
import { Store } from 'src'
5+
import Store from 'src/store'
66
import { iNotification } from 'src/types'
77

88
export default function CustomContentExample() {

samples/js/components/examples/InsertExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Store } from 'src'
2+
import Store from 'src/store'
33
import notification from 'samples/js/helpers/notification'
44
import { getType, getMessage, getTitle } from 'samples/js/helpers/randomize'
55
import { iNotification } from 'src/types'

samples/js/components/examples/TypeExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Store } from 'src'
2+
import Store from 'src/store'
33
import notification from 'samples/js/helpers/notification'
44
import { getContainer, getMessage, getTitle } from 'samples/js/helpers/randomize'
55
import { iNotification } from 'src/types'

src/components/Container.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { iContainerProps, iContainerState, iNotification } from 'src'
2+
import { iContainerProps, iContainerState, iNotification } from 'src/types'
33
import ReactNotification from 'src/components/Notification'
44
import 'src/scss/notification.scss'
55
import store from 'src/store'
@@ -10,6 +10,8 @@ import {
1010
isNullOrUndefined
1111
} from 'src/utils/helpers'
1212

13+
export { Container }
14+
1315
class Container extends React.Component<iContainerProps, iContainerState> {
1416
constructor(props: iContainerProps) {
1517
super(props)
@@ -170,6 +172,4 @@ class Container extends React.Component<iContainerProps, iContainerState> {
170172

171173
return this.renderScreenNotifications(this.props)
172174
}
173-
}
174-
175-
export default Container
175+
}

0 commit comments

Comments
 (0)