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

请教如何判断处于debug模式 #12

Open
stonelee opened this issue May 22, 2013 · 6 comments
Open

请教如何判断处于debug模式 #12

stonelee opened this issue May 22, 2013 · 6 comments

Comments

@stonelee
Copy link

之前的版本可以判断是否是debug模式

{%- if config.args|debug %}
    <script src="../sea-modules/seajs/1.3.0/sea.js"></script>
{%- else %}
    <script src="http://static.alipayobjects.com/seajs/1.3.1/sea.js"></script>
{%- endif %}

现在好像不能使用了?请指教。
版本为:nico 0.3.1

@lepture
Copy link
Contributor

lepture commented May 22, 2013

@stonelee no debug anymore now.

Add an engine in package.json instead.

@stonelee
Copy link
Author

我希望能够在模板中区分

nico server debug

nico server

两种命令。

这样在debug时调用本机文件,加载快,调试修改方便
部署时更改为调用远程文件

希望能够早日支持。
谢谢

@stonelee
Copy link
Author

engine方式貌似只能将配置写死在package.json文件中,无法在nico执行时对两种命令进行区分,求详解~

@popomore
Copy link
Member

我觉得也可以分开

@lepture
Copy link
Contributor

lepture commented May 24, 2013

@stonelee 打算先设计为:

判断 sea-modules 下有没有 seajs,有的话就是本地。

@stonelee
Copy link
Author

@lepture 我的场景不是仅仅加载seajs,还有其他一些文件,如果能够在模板中提供一个参数能够判断就好了

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

3 participants