Skip to content

Instantly share code, notes, and snippets.

View lazyTai's full-sized avatar

刘明泰 lazyTai

View GitHub Profile
@lazyTai
lazyTai / drawLeft.js
Created September 21, 2017 11:17
initial react state in easy way no construct
/*
*
刘明泰
mail:1352983234@qq.com
github:lazyTai
*/
import React, {Component} from 'react';
class BooksList extends Component {
state = {
@lazyTai
lazyTai / .gitignore
Created September 21, 2017 11:35
react .gitignore
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
node_modules
.idea/
# testing
/coverage
@lazyTai
lazyTai / webpack.config.dev.js
Last active September 21, 2017 12:00
the initial version create react app
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
@lazyTai
lazyTai / webpack.config.dev.js
Created September 21, 2017 12:18
create-react-app less 支持
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
@lazyTai
lazyTai / drawLeft.js
Created September 21, 2017 14:18
drawer to right cancel drawer
/*
*
刘明泰
mail:1352983234@qq.com
github:lazyTai
*/
import React, {Component} from 'react';
class BooksList extends Component {
@lazyTai
lazyTai / package.json
Created September 21, 2017 19:29
default package.json
{
"name": "jianshu",
"version": "0.1.0",
"private": true,
"dependencies": {
"autoprefixer": "7.1.2",
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.1",
@lazyTai
lazyTai / index.css
Last active September 21, 2017 20:19
手机pc 居中
* {
box-sizing: border-box;
}
html {
padding: 0;
}
body {
max-width: 700px;
@lazyTai
lazyTai / index.css
Last active September 21, 2017 22:27
to center bodymargin auto 0
html {
width: 100%;
margin: 0;
padding: 0;
}
body {
max-width: 700px;
margin: 0 auto;
padding: 0;
@lazyTai
lazyTai / cssString+template==>with
Created September 21, 2017 23:01
cssString+template==>with todo cssString use in react
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdn.bootcss.com/underscore.js/1.8.3/underscore-min.js"></script>
<script src="bundle.js"></script>
</head>
<body>
<script>
@lazyTai
lazyTai / css -loader
Last active September 21, 2017 23:58
cssString=>computer==>width
rules: [
{test: /\.css$/, use: ['to-string-loader','css-loader']},
]