Skip to content

Commit

Permalink
0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
方永乐 committed Dec 12, 2017
1 parent b1e3118 commit f0ea9f7
Show file tree
Hide file tree
Showing 63 changed files with 73 additions and 46 deletions.
24 changes: 0 additions & 24 deletions core/common/config.js

This file was deleted.

26 changes: 13 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
/* eslint no-console: 0, radix: 0, guard-for-in: 0, import/no-mutable-exports: 0 */

const gulp = require('gulp');
const fs = require('fs');
Expand All @@ -16,7 +16,7 @@ const uglify = require('gulp-uglify');
const babel = require('gulp-babel');
const file = require('gulp-file');
const rename = require('gulp-rename');
const config = require('./core/common/config');
const config = require('./src/core/common/config');
const iconPlugin = require('./icon-plugin');

// 开发
Expand All @@ -35,39 +35,39 @@ gulp.task('clean', () => {
gulp.task('copy', () => {
return merge(
// 复制图片
gulp.src('core/asset/img/**/*')
gulp.src('src/core/asset/img/**/*')
.pipe(changed('public/images'))
.pipe(gulp.dest('public/images')),

// 复制图标
gulp.src('core/asset/img/favicon.ico')
gulp.src('src/core/asset/img/favicon.ico')
.pipe(changed('public'))
.pipe(gulp.dest('public')),

// 复制第三方包
gulp.src('core/vendor/**/*')
gulp.src('src/core/vendor/**/*')
.pipe(changed('public'))
.pipe(gulp.dest('public')),

// 压缩单个JS文件
gulp.src('core/vendor/**/*.js')
gulp.src('src/core/vendor/**/*.js')
.pipe(babel())
.pipe(uglify())
.pipe(changed('public'))
.pipe(gulp.dest('public')),

// 写入less配置
gulp.src('core/page/style/common/config.less')
gulp.src('src/core/page/style/common/config.less')
.pipe(file('config.less', `@cdn: '${config.cdn}';`))
.pipe(gulp.dest('core/page/style/common')),
.pipe(gulp.dest('src/core/page/style/common')),

// 生成SVG
gulp.src('core/asset/svg/**/*.svg')
gulp.src('src/core/asset/svg/**/*.svg')
.pipe(iconPlugin())
.pipe(rename((path) => {
path.extname = '.js';
}))
.pipe(gulp.dest('page/icon'))
.pipe(gulp.dest('src/core/page/icon'))
);
});

Expand All @@ -89,7 +89,7 @@ gulp.task('webpack-config', (callback) => {
watch: isDev,
entry: {
vendors: [
'./core/common/config.js',
'./src/core/common/config.js',
],
},
output: {
Expand Down Expand Up @@ -204,12 +204,12 @@ gulp.task('webpack-dll', (callback) => {

// 打包移动端文件
gulp.task('webpack-page', (callback) => {
console.log({isDev})
console.log({isDev});
webpack({
watch: isDev,
devtool: isDev ? 'source-map' : '',
entry: [
'./page/index.js',
'./src/page/index.js',
],
output: {
path: path.join(__dirname, 'public'),
Expand Down
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
'use strict';

require('babel-register');
process.on('unhandledRejection', (reason, p) => {
log.error(reason.stack);
});

require('./server');
require('./src/server');
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-web",
"version": "0.0.3",
"version": "0.0.4",
"description": "easy to create react web project.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = (markdown, metaData) => {
// Use the available data to create a custom release
return markdown;
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions src/page/icon/female.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

class Female extends React.Component {
render() {
const { className, ...restProps } = this.props;
return (
<svg className={className} {...restProps} width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" > <g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd"><g id="iPhone-8" transform="translate(-111.000000, -147.000000)" stroke="#FFA8B2" strokeWidth="1.2"><g id="cells/表---个人信息-copy-6" transform="translate(0.000000, 128.000000)"><g id="Group" transform="translate(110.000000, 18.000000)"><circle id="Oval" cx="8.5" cy="5.5" r="3.5"></circle><path d="M6.03553391,7.96446609 L2,12" id="Line" strokeLinecap="round"></path><path d="M2.5,8.5 L5.5,11.5" id="Line-2" strokeLinecap="round"></path></g></g></g></g></svg>
);
}
}

export default Female;

13 changes: 13 additions & 0 deletions src/page/icon/logo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

class Logo extends React.Component {
render() {
const { className, ...restProps } = this.props;
return (
<svg className={className} {...restProps} width="102px" height="102px" viewBox="0 0 102 102" version="1.1" xmlns="http://www.w3.org/2000/svg" > <g id="1.2.0" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd"><g id="iPhone-8" transform="translate(-63.000000, -72.000000)"><g id="Group" transform="translate(64.000000, 73.000000)"><circle id="Oval-2" stroke="#0080DC" cx="50" cy="50" r="50"></circle><polygon id="Triangle-2" stroke="#0080DC" points="50.5 1 90 80 11 80"></polygon><polygon id="Triangle-2" stroke="#0080DC" transform="translate(50.500000, 59.500000) scale(1, -1) translate(-50.500000, -59.500000) " points="50.5 20 90 99 11 99"></polygon><text id="F" fontFamily="AmericanTypewriterSemibold, American Typewriter" fontSize="36" fontWeight="500" fill="#0080DC"><tspan x="39" y="62">F</tspan></text></g></g></g></svg>
);
}
}

export default Logo;

13 changes: 13 additions & 0 deletions src/page/icon/male.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

class Male extends React.Component {
render() {
const { className, ...restProps } = this.props;
return (
<svg className={className} {...restProps} width="11px" height="11px" viewBox="0 0 11 11" version="1.1" xmlns="http://www.w3.org/2000/svg" > <g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd"><g id="iPhone-8" transform="translate(-167.000000, -84.000000)" stroke="#64C3FF" strokeWidth="1.2"><g id="cells/表---个人信息" transform="translate(0.000000, 64.000000)"><g id="Group" transform="translate(166.000000, 18.000000)"><circle id="Oval" cx="5" cy="9" r="3"></circle><path d="M7.5,6.5 L10.5,3.5" id="Line" strokeLinecap="square"></path><polyline id="Path-2" strokeLinecap="round" points="7 3 11 3 11 7"></polyline></g></g></g></g></svg>
);
}
}

export default Male;

13 changes: 13 additions & 0 deletions src/page/icon/tip-bulb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/ssr/index.js → src/server/ssr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import routes from '../../core/router';
import reducers from '../../core/reducer';
import states from '../../core/state';
import { reload } from '../../core/lib/funcs';
const version = global['config_version'] = require('../../version.json').version;
const version = global['config_version'] = require('../../../version.json').version;

// 监听文件变换
let _routes = routes;
Expand Down

0 comments on commit f0ea9f7

Please sign in to comment.