Skip to content

Updated refs to loaders in webpack config & component for webpack 2.0 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/actions/growler.action.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {GROWLER__HIDE, GROWLER__HIDED, GROWLER__SHOW} from './types/growler.types';
import {GROWLER__HIDE, GROWLER__HIDDEN, GROWLER__SHOW} from './types/growler.types';
let hideTimeOut;
let hiddenTimeOut;
/*
Expand All @@ -11,7 +11,7 @@ export function hideGrowler() {
clearTimeout(hideTimeOut);
hiddenTimeOut = window.setTimeout(() =>{
dispatch({
type: GROWLER__HIDED,
type: GROWLER__HIDDEN,
});
}, 500);
};
Expand All @@ -32,7 +32,7 @@ export function hideTimeOutGrowler(growler, time) {
}

export function showGrowler(text, type) {
return {
return {
type: GROWLER__SHOW,
growler:{
text,
Expand All @@ -43,7 +43,7 @@ export function showGrowler(text, type) {


export function showGrowlerSuccess(text) {
return {
return {
type: GROWLER__SHOW,
growler:{
text,
Expand All @@ -53,7 +53,7 @@ export function showGrowlerSuccess(text) {
}

export function showGrowlerError(text) {
return {
return {
type: GROWLER__SHOW,
growler:{
text,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/types/growler.types.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

export const GROWLER__SHOW = 'GROWLER__SHOW';
export const GROWLER__HIDE = 'GROWLER__HIDE';
export const GROWLER__HIDED = 'GROWLER__HIDED';
export const GROWLER__HIDDEN = 'GROWLER__HIDDEN';
2 changes: 1 addition & 1 deletion src/component/growler.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import 'style!./growler.scss';
import 'style-loader!./growler.scss';
import classNames from 'classnames/bind';
import errors from 'classnames/bind';

Expand Down
4 changes: 2 additions & 2 deletions src/reducer/growler.reducer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {GROWLER__HIDE, GROWLER__HIDED, GROWLER__SHOW} from '../actions/types/growler.types';
import {GROWLER__HIDE, GROWLER__HIDDEN, GROWLER__SHOW} from '../actions/types/growler.types';

const initialState = {
text: '',
Expand All @@ -23,7 +23,7 @@ export default function growlerReducer(state = initialState, action) {
status: 'hide',
};

case GROWLER__HIDED:
case GROWLER__HIDDEN:
return {
...state,
...action.growler,
Expand Down
13 changes: 9 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ module.exports = {
filename: "es5/index.js"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.js$/, loaders: ['react-hot', 'babel?stage=0&loose[]=es6.modules'] },
{ test: /\.jsx$/, loaders:['react-hot', 'babel?stage=0&loose[]=es6.modules'] }
rules: [{
test: /\.css$/,
use: [{
'loader': 'style-loader'
}, {
'loader': 'css'
}] },
{ test: /\.js$/, use: ['react-hot-loader', 'babel-loader?stage=0&loose[]=es6.modules'] },
{ test: /\.jsx$/, use:['react-hot-loader', 'babel-loader?stage=0&loose[]=es6.modules'] }
]
}
};