Skip to content
Permalink
Browse files

upgrade project structure. should import style file by youself.

  • Loading branch information
lidianhao123 committed Nov 14, 2017
1 parent b865d12 commit e631e7fdd1ab658bbf05911c21361eb4d00f7d8b
@@ -1 +1,64 @@
node_modules
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

demo

deploy.config.json

dist
Submodule .publish added at caebcb
@@ -6,12 +6,14 @@
[pullLoad](https://github.com/lidianhao123/pullLoad) 非 react 版本,支持 require.js 模块化调用

#### 示例
[demo1](https://react-ld.github.io/react-pullLoad/index.html) document.body 作为容器
[demo1](https://react-ld.github.io/react-pullLoad/index1.html) ReactPullLoad 根节点 DOM 作为容器

[demo2](https://react-ld.github.io/react-pullLoad/index2.html) ReactPullLoad 根节点 DOM 作为容器

[demo3](https://react-ld.github.io/react-pullLoad/index3.html) document.body 作为容器 且自定义刷新和加载更多 UI 组件

[demo3](https://react-ld.github.io/react-pullLoad/index4.html) 禁用下拉刷新功能

# 当前版本 1.0.4

# 简介
@@ -37,6 +39,7 @@ npm install --save react-pullload

```js
import ReactPullLoad,{ STATS } from 'react-pullload'
import 'node_modules/react-pullload/dist/ReactPullLoad.css'
export class App extends Component{
constructor(){
@@ -6,11 +6,12 @@
[pullLoad](https://github.com/lidianhao123/pullLoad) is another refreshing and loading more lib without react, support require.js to load lib.

#### examples
[demo1](https://react-ld.github.io/react-pullLoad/index.html) use document.body as container
[demo1](https://react-ld.github.io/react-pullLoad/index1.html) use ReactPullLoad root DOM as container

[demo2](https://react-ld.github.io/react-pullLoad/index2.html) use ReactPullLoad root DOM as container

[demo3](https://react-ld.github.io/react-pullLoad/index3.html) use document.body as container, and config UI component (HeadNode and FooterNode).
[demo4](https://react-ld.github.io/react-pullLoad/index4.html) forbidden pull refresh

# version 1.0.4

@@ -32,6 +33,7 @@ npm install --save react-pullload

```js
import ReactPullLoad,{ STATS } from 'react-pullload'
import 'node_modules/react-pullload/dist/ReactPullLoad.css'
export class App extends Component{
constructor(){

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
@@ -3,6 +3,7 @@ import React, { Component, PureComponent, PropTypes } from 'react'
import { render } from 'react-dom'
import ReactPullLoad,{STATS} from 'index.js'
import './App.css'
import '../src/ReactPullLoad.less'


const defaultStyle ={
@@ -3,6 +3,7 @@ import React, { Component, PureComponent, PropTypes } from 'react'
import { render } from 'react-dom'
import ReactPullLoad,{STATS} from 'index.js'
import './App.css'
import '../src/ReactPullLoad.less'

const defaultStyle ={
width: "100%",
@@ -3,7 +3,7 @@ import React, { Component, PureComponent, PropTypes } from 'react'
import { render } from 'react-dom'
import ReactPullLoad,{STATS} from 'index.js'
import './App.css'

import '../src/ReactPullLoad.less'

const defaultStyle ={
width: "100%",
@@ -3,7 +3,7 @@ import React, { Component, PureComponent, PropTypes } from 'react'
import { render } from 'react-dom'
import ReactPullLoad,{STATS} from 'index.js'
import './App.css'

import '../src/ReactPullLoad.less'

const defaultStyle ={
width: "100%",
@@ -0,0 +1,11 @@
# 示例
[demo1](https://react-ld.github.io/react-pullLoad/index1.html) ReactPullLoad 根节点 DOM 作为容器

[demo2](https://react-ld.github.io/react-pullLoad/index2.html) ReactPullLoad 根节点 DOM 作为容器

[demo3](https://react-ld.github.io/react-pullLoad/index3.html) document.body 作为容器 且自定义刷新和加载更多 UI 组件
[demo4](https://react-ld.github.io/react-pullLoad/index4.html) 禁用下拉刷新功能

# 文档

[react-pullLoad](https://github.com/react-ld/react-pullLoad)
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ReactPullLoad demo</title>
<title>ReactPullLoad demo1</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
@@ -11,5 +11,6 @@
bundle1.js is demo use document as contianer
bundle2.js is demo use ReactPullLoad root DOM as contianer
-->
<script src="./bundle1.js"></script>
</body>
</html>
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ReactPullLoad demo</title>
<title>ReactPullLoad demo2</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
@@ -11,5 +11,6 @@
bundle1.js is demo use document as contianer
bundle2.js is demo use ReactPullLoad root DOM as contianer
-->
<script type="text/javascript" src="bundle1.js?753d6a186dc589442558"></script><script type="text/javascript" src="bundle2.js?69bfcaddd8006d7d4155"></script><script type="text/javascript" src="bundle3.js?de6349f014f232f06867"></script></body>
<script src="./bundle2.js"></script>
</body>
</html>
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ReactPullLoad demo3</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
<div id="root"></div>
<!--
bundle1.js is demo use document as contianer
bundle2.js is demo use ReactPullLoad root DOM as contianer
-->
<script src="./bundle3.js"></script>
</body>
</html>
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ReactPullLoad demo4</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
<div id="root"></div>
<!--
bundle1.js is demo use document as contianer
bundle2.js is demo use ReactPullLoad root DOM as contianer
-->
<script src="./bundle4.js"></script>
</body>
</html>
@@ -0,0 +1,84 @@
var gulp = require('gulp');
var webpack = require('webpack');
var clean = require('gulp-clean');
var gutil = require('gulp-util');
// var ftp = require( 'vinyl-ftp' );
var ghPages = require('gulp-gh-pages');
// var deploy = require('./deploy.config.json');
var deploy_remote_path = "/public/17zt/viewer"
var webpack_config_demo = require('./webpack.config.example.js');
var babel = require('gulp-babel');
var less = require('gulp-less');
var path = require('path');

gulp.task('demo:clean', function(){
return gulp.src('./demo', {read: false})
.pipe(clean());
})

gulp.task('demo:file', ['demo:clean'], function(){
return gulp.src(['example/**/*.html','example/README.md'])
.pipe(gulp.dest('demo/'))
})

//编译示例
gulp.task('demo:webpack', ['demo:clean'], function(callback) {
webpack(webpack_config_demo, function (error,status) {
//gulp 异步任务必须明确执行 callback() 否则 gulp 将一直卡住
callback()
});
});

gulp.task('demo:build', ['demo:file', 'demo:webpack']);

//部署示例到自己的测试服务器
// gulp.task('deploy:demo', ['build:demo'], function () {
// deploy.log = gutil.log;

// var conn = ftp.create(deploy);

// return gulp.src('demo/**')
// .pipe(conn.dest(deploy_remote_path))
// })

//部署示例到 gh-pages
gulp.task('deploy:gh-pages', function() {
return gulp.src('./demo/**')
.pipe(ghPages());
});

gulp.task("publish:clean", function(){
return gulp.src('./dist', {read: false})
.pipe(clean());
})

//编译 js 文件
gulp.task('publish:js', ["publish:clean"], function(){
return gulp.src('src/**/*.{js,jsx}')
.pipe(babel({
presets: ["es2015", "stage-1", "react"]
}))
.pipe(gulp.dest('dist'));
})

//编译 less 文件
gulp.task('publish:less', ["publish:clean"], function () {
return gulp.src('src/**/*.less')
.pipe(less({
paths: [ path.join(__dirname, 'less', 'includes') ]
}))
.pipe(gulp.dest('dist'));
});

//发布 css 文件
gulp.task('publish:css', ["publish:clean"], function(){
return gulp.src('src/**/*.css')
.pipe(gulp.dest('dist'))
})

//打包发布 npm
gulp.task('publish', ["publish:clean", 'publish:js', 'publish:less']);

gulp.task('demo', ['deploy:demo']);

gulp.task('gh-pages', ['deploy:gh-pages']);
@@ -1,14 +1,11 @@
{
"name": "react-pullload",
"version": "1.0.7",
"version": "1.0.8",
"description": "React compopnent pull down refresh and pull up load more",
"main": "./lib/index.js",
"main": "./dist/index.js",
"scripts": {
"start": "webpack-dev-server --hot --config webpack.demo.dev.config.js",
"build": "node_modules/babel-cli/bin/babel.js src --out-dir lib && cp src/*.less lib/",
"demo": "webpack -p --optimize-dedupe --progress --config webpack.demo.config.js",
"clean:demos": "rm -rf ../github.io/tloader",
"clean:lib": "rm -rf lib/",
"start": "webpack-dev-server --config webpack.config.js",
"example": "rm -rf ./demo/* & NODE_ENV=development webpack --config webpack.config.example.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@@ -26,6 +23,11 @@
"bugs": {
"url": "https://github.com/react-ld/react-pullLoad/issues"
},
"files": [
"dist",
"example",
"src"
],
"homepage": "https://github.com/react-ld/react-pullLoad#readme",
"devDependencies": {
"autoprefixer": "^6.5.1",
@@ -37,6 +39,12 @@
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"css-loader": "^0.25.0",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-clean": "^0.3.2",
"gulp-gh-pages": "^0.5.4",
"gulp-less": "^3.3.2",
"gulp-util": "^3.0.8",
"html-webpack-plugin": "^2.22.0",
"less": "^2.7.1",
"less-loader": "^2.2.3",
@@ -46,7 +54,7 @@
"react-dom": "^15.3.2",
"react-hot-loader": "^3.0.0-beta.6",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.2"
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"
}
}
@@ -0,0 +1,10 @@
module.exports = ({ file, options, env }) => ({
// parser: file.extname === '.sss' ? 'sugarss' : false,
// plugins: {
// 'postcss-import': { root: file.dirname },
// 'postcss-cssnext': options.cssnext ? options.cssnext : false,
// 'autoprefixer': env == 'production' ? options.autoprefixer : false,
// 'cssnano': env === 'production' ? options.cssnano : false
// }
plugins: [ require('autoprefixer')({ browsers: ["Android >= 4", "iOS >= 7"]}) ]
})
@@ -4,7 +4,6 @@ import { findDOMNode } from 'react-dom'
import { STATS } from './constants'
import HeadNode from './HeadNode'
import FooterNode from './FooterNode'
import './ReactPullLoad.less'

function addEvent(obj, type, fn) {
if (obj.attachEvent) {

0 comments on commit e631e7f

Please sign in to comment.
You can’t perform that action at this time.