Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行tmod命令后,package.json会变化,combo:true设置被清除 #71

Open
beiduo opened this issue Dec 30, 2014 · 2 comments
Open

Comments

@beiduo
Copy link

beiduo commented Dec 30, 2014

我使用的是windows 7系统的git shell。

一开始,package.json文件原本是(直接拷贝的test目录的)

{
    "name": "template",
    "version": "1.0.1",
    "dependencies": {
        "tmodjs": "1.0.1-rc9"
    },
    "tmodjs-config": {
        "output": "./build",
        "charset": "utf-8",
        "syntax": "simple",
        "helpers": null,
        "escape": true,
        "compress": true,
        "type": "default",
        "runtime": "template.js",
        "combo": true,
        "minify": true,
        "cache": false
    }
}

然后我运行

tmod ./tpl --output ./build --type amd

之后,package.json就自动变成了

{
    "name": "template",
    "version": "1.0.1",
    "dependencies": {
        "tmodjs": "1.0.1"
    },
    "tmodjs-config": {
        "output": "../build",
        "charset": "utf-8",
        "syntax": "simple",
        "helpers": null,
        "escape": true,
        "compress": true,
        "type": "amd",
        "runtime": "template.js",
        "alias": null,
        "minify": true,
        "cache": false
    }
}

combo: true 被去掉了,其他设置也有所修改。

于是也未能得到合并过的文件。

不知道是哪个步骤出错了……~

@aui
Copy link
Owner

aui commented Dec 30, 2014

  1. 命令行输入的路径是相对于工作目录,而 package.json 的路径是相对于自身,从命令行输入的路径会进行转换后写入到 package.json
  2. tmodjs 输出的 amd 模块不支持 combo 配置,故会修正

@beiduo
Copy link
Author

beiduo commented Dec 30, 2014

啊,我试了下使用default这个type后可以合并,应该是这样。thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants