Commit 66d2ccd1 by baiguangyao

修改项目结构以及.gitignore

parent b17b34e2
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
# production # production
/build /build
/.history
.idea/ .idea/
# misc # misc
.DS_Store .DS_Store
......
...@@ -423,7 +423,7 @@ module.exports = function(webpackEnv) { ...@@ -423,7 +423,7 @@ module.exports = function(webpackEnv) {
{ {
importLoaders: 2, importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap, sourceMap: isEnvProduction && shouldUseSourceMap,
resources: '../src/styles/variable.scss', resources: '../src/assets/css/variable.scss',
modules: false modules: false
}, },
'sass-loader' 'sass-loader'
......
...@@ -114,7 +114,7 @@ module.exports = function(webpackEnv) { ...@@ -114,7 +114,7 @@ module.exports = function(webpackEnv) {
loaders.push({ loaders.push({
loader: require.resolve('sass-resources-loader'), loader: require.resolve('sass-resources-loader'),
options: { options: {
resources: [require.resolve('../src/styles/variable.scss')] resources: [require.resolve('../src/assets/css/variable.scss')]
} }
}) })
} }
......
...@@ -3,7 +3,6 @@ import { connect } from 'react-redux' ...@@ -3,7 +3,6 @@ import { connect } from 'react-redux'
import { LocaleProvider } from 'antd-mobile' import { LocaleProvider } from 'antd-mobile'
import { HashRouter } from 'react-router-dom' import { HashRouter } from 'react-router-dom'
import Routes from './router' import Routes from './router'
// import '@/common/styles/common.scss'
class App extends Component { class App extends Component {
render() { render() {
......
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
ReactDOM.unmountComponentAtNode(div);
});
import React, { Component } from 'react'; import React, { Component } from 'react';
import SearchHead from './searchHead' import SearchHead from './searchHead'
import Tag from '@base/Tag/index.js' import Tag from '@common/Tag/index.js'
import './index.scss'; import './index.scss';
......
...@@ -3,7 +3,7 @@ import { connect } from 'react-redux' ...@@ -3,7 +3,7 @@ import { connect } from 'react-redux'
import { Checkbox, NavBar } from 'antd-mobile' import { Checkbox, NavBar } from 'antd-mobile'
//组件 //组件
import ShopCard from './cardList.js' import ShopCard from './cardList.js'
import Loading from '@base/Loading' import Loading from '@common/Loading'
//css //css
import './card.scss' import './card.scss'
......
html,
body {
height: 100%;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#root{
height: 100%;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
\ No newline at end of file
...@@ -8,22 +8,17 @@ import { logger } from 'redux-logger' ...@@ -8,22 +8,17 @@ import { logger } from 'redux-logger'
import store from './store' import store from './store'
import App from './App'; import App from './App';
import './index.css'
// 默认样式 // 默认样式
import './styles/index.scss'; import './assets/css/index.scss';
// iconfont // iconfont
import './font/iconfont.css'; import './assets/font/iconfont.css';
var tooltore = createStore(store, compose( var tooltore = createStore(store, compose(
applyMiddleware(thunk,logger) applyMiddleware(thunk,logger)
)) ))
// ReactDOM.render(
// <Router />,
// document.getElementById('root'));
ReactDOM.render( ReactDOM.render(
<Provider store={tooltore}> <Provider store={tooltore}>
<App /> <App />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment