Skip to content

Instantly share code, notes, and snippets.

View huang-xiao-jian's full-sized avatar
🤓
On coding

黄小健 huang-xiao-jian

🤓
On coding
  • China
View GitHub Profile
@huang-xiao-jian
huang-xiao-jian / karma.bundle.js
Created November 24, 2017 08:32
karma webpack configuration
/**
* @description - karma test entry
* @author - bornkiller <[email protected]>
*/
/* eslint-disable */
'use strict';
// resolve test spec files
@huang-xiao-jian
huang-xiao-jian / gzip.conf
Created December 14, 2017 03:24
nginx gzip configuration
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 5;
gzip_proxied any;
gzip_types text/plain text/css application/javascript application/x-javascript application/xml;
gzip_vary on;
@huang-xiao-jian
huang-xiao-jian / proxy.sh
Created May 7, 2018 02:19
OSX socks 系统级代理
# 获取所有网络
# 替换下列 Ethernet
networksetup -listnetworkserviceorder;
# Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" 127.0.0.1 1086
#To clear the domain and port
networksetup -setsocksfirewallproxy "Ethernet" 127.0.0.1 1086
# use bootcdn.cn as external resources host
library:
- name: 'web-animations-js'
linkage: 'https://unpkg.com/[email protected]/web-animations.min.js'
environment:
development:
- name: 'babel-polyfill'
linkage: 'https://cdn.bootcss.com/babel-polyfill/6.26.0/polyfill.js'
- name: 'react'
linkage: 'https://cdn.bootcss.com/react/16.3.2/umd/react.development.js'
@huang-xiao-jian
huang-xiao-jian / require.context.js
Created June 1, 2018 07:00
webpack 多模块加载
const req = require.context('../src/stories', true, /\.story\.jsx?$/);
req.keys().forEach((filename) => req(filename));
@huang-xiao-jian
huang-xiao-jian / serve.config.js
Created June 1, 2018 07:01
webpack 开发服务器配置
/**
* @description - development configuration
* @author - yang.yuncai <[email protected]>
*/
// dependency
const presets = require('@coco-platform/webpack-preset');
const convert = require('koa-connect');
const history = require('connect-history-api-fallback');
const proxy = require('http-proxy-middleware');
@huang-xiao-jian
huang-xiao-jian / .babelrc
Last active August 18, 2019 08:25
babel shared configuration.
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"loose": true
}
],
"@babel/preset-react"