NetBeans 7.4 Javascript CDNJS

时间:2013-11-13 20:22:28

标签: javascript netbeans

我是NetBeans 7.4版的新手,我一直在搜索如何将CDNJS库添加到NetBeans。当我打开项目属性时,在JavaScript文件下没有可用的库。任何方向都会受到赞赏。

谢谢

1 个答案:

答案 0 :(得分:1)

在/nbproject/build.xml中添加了以下内容并且它可以正常工作

<target name="get-cdnjs-jar">
    <mkdir dir="build/extsrc"/>
    <get src="https://github.com/cdnjs/cdnjs/archive/master.zip" dest="build/cdnjs-temp.zip"/>
    <javac srcdir="extsrc" destdir="build/extsrc"/>
    <java classname="RemoveContent" fork="yes">
        <arg file="build/cdnjs-temp.zip"/>
        <classpath>
            <pathelement location="build/extsrc"/>
        </classpath>
    </java>
    <echo message="File build/cdnjs-temp.zip.empty was generated."/>
    <echo message="Rename it and upload it as external/cdnjs.zip"/>
</target>