commonjstrans-cli
transform haitao-web haitaowap page to new project
Last updated 2 years ago by sunqiyangg .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install commonjstrans-cli 
SYNC missed versions from official npm registry.

commonjstrans-cli

Installation

$ npm install -g commonjstrans-cli

创建配置文件

$ trans init
const path = require('path');

const projectRoot = '/Users/administrator/工作/netease/haitao-web';
const wabappPath = path.join(projectRoot, 'src', 'main', 'webapp');
const ftlPath = path.join(wabappPath, 'WEB-INF', 'ftl', 'new_templates', 'pages');

const config = {
    target: 'web',
    webappPath: wabappPath, // webapp目录路径
    entry: [
        path.join(ftlPath, 'order', 'pay_success.ftl'), // 需要转换的页面
    ],
    TEMP_PATH: path.join(path.resolve('.', 'target')), // 转换后代码存放目录
};
global.trans_config = config;
module.exports = config;

开始转换代码

$ trans init

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (13)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |