Giter Club home page Giter Club logo

node-koa's Introduction

node-koa

es代码转换模块

#####"babel-core": "6.13.2" #####"babel-polyfill": "6.13.0" #####"babel-preset-es2015-node6": "0.3.0" #####"babel-preset-stage-3": "6.5.0"

##koa2 #####"koa": "2.0.0"

##koa2路由 #####"koa-router": "7.0.0"

##koa2解析原始request请求,把解析后的参数,绑定到ctx.request.body中 #####"koa-bodyparser": "3.2.0"

##模板引擎 #####"nunjucks": "2.4.2"

##模块写法

Common.js (sever) (webpack)
module.exports = 'abc' //content.js
var str = require('./content.js') //index.js

require.js (browser)(AMD)
define('content.js', function(){ //content.js
return 'abc';
})
require(['./content.js'], function(str){ //index.js
console.log(str);
})

sea.js (CMD)
html:
sea.config({
base: "../sea-modules/",
alias: {
"jquery": "1.10.1/jquery.js"
}
});
seajs.use("examples/hello/1.0.0/main");
js:
define(function(require, exports, module) {
var $ = require('jQuery')
module.exports = fuc
})

es6
export default 'abc' //content.js
import str from './content.js' //index.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.