jtdev

0.1.3 • Public • Published

compile styls, lesss, jsx, es and so on for dev.

Installation

$ npm install jtdev

API

parse static file for dev

const serve = require('koa-static');
const koa = require('koa');
const app = koa();
const jtDev = require('jtdev');
const path = require('path');
app.use(jtDev.parser(staticFilePath))
 
app.use(serve(staticFilePath));
 
app.listen(3000);
 
console.log('listening on port 3000');
 

add define function for requirejs

const serve = require('koa-static');
const koa = require('koa');
const app = koa();
const jtDev = require('jtdev');
const path = require('path');
 
app.use(jtDev.defineWrapper(staticFilePath, {
    basePath: path.join(staticFilePath, 'components'),
    except: ['components/widget.js']
}));
 
app.use(serve(staticFilePath));
 
app.listen(3000);
 
console.log('listening on port 3000');
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • 0.0.1
  • 0.1.3
    1
    • latest

Version History

Package Sidebar

Install

npm i jtdev

Weekly Downloads

1

Version

0.1.3

License

MIT

Last publish

Collaborators

  • tree.xie