Skip to content

Instantly share code, notes, and snippets.

View xudaolong's full-sized avatar
🎯
Focusing

Dillon Xu xudaolong

🎯
Focusing
View GitHub Profile
#!/bin/sh
echo $ONCEWORK_CLIPBOARD
@xudaolong
xudaolong / React-CoreRouter.js
Last active January 3, 2019 14:15
React-Webpack 按需加载|-|&tag=react
// FIXME:因为在ComponentsLet中引入了所需的组件,所以不会再单独打包出独立的组件.若工程进一步增加,有必要整理代码
const root_Welcome = {
path: '/Welcome',
getComponent(nextState, cb) {
require.ensure([], (require) => {
cb(null, require('App/Components/Core/Welcome/WelcomeCpt').default)
}, 'Welcome')
}
};
const express = require('express')
const path = require('path')
const port = process.env.PORT || 8080
const app = express()
// serve static assets normally
app.use(express.static(__dirname + '/public'))
// handle every other route with index.html, which will contain
// a script tag to your application's JavaScript file(s).
git remote add origin https://github.com/once-work/oncework.git
(
(name,msg) => console.log(name,msg)
)("dragon","hello,bird");
(
name => console.log(name)
)("dragon");
let cat = {
name:"tom",