使用npm在本地安装nodejs包的构建方法

rodacom.buildout.npm的Python项目详细描述


使用npm在本地安装nodejs包的zc.buildout方法。

此配方将在本地节点模块目录中安装所需的软件包,并创建指向二进制文件的链接 在buildoutbin目录中。

选项

packages:required, a list of package names to install (can specify a version with the syntax name@version).
node_path:absolute path to the node executable, by default the bin/node in buildout directory.
npm_path:absolute path to the npm executable, by default the bin/npm in buildout directory.
strip_extension:
set to ‘true’ to strip the .js extension sometimes present on binaries (default is ‘false’).

示例

使用本地编译的nodejs:

[nodejs]
recipe = zc.recipe.cmmi
url = http://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz
bin_node = ${buildout:parts-directory}/nodejs/bin/node
bin_npm = ${buildout:parts-directory}/nodejs/bin/npm

[coffee]
recipe = rodacom.buildout.npm
node_path = ${nodejs:bin_node}
npm_path = ${nodejs:bin_npm}
packages = coffee-script@1.6.3

已知错误

  • 卸载时不会删除在“bin”目录中生成的链接。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用Eclipse Helios for Web项目   java指定行。作为编译器设置的分隔符?   osm映射中带有osmdroid的java标记   java Android ClassNotFoundException在路径:DexPathList上未找到类   java从j2me调用GWT方法   更新到java 8后的aspectj问题   如何仅从根元素java,com提取文本内容。滴虫软件。是的。html   安卓公司。谷歌。火基。数据库DatabaseException:未能转换java类型的值。将字符串改为长字符串   从java中的方法返回arraylist变量   java如果将引用重新分配给同步块内的锁对象,会是什么?   java下载。使用spring mvc的资源文件中的xlsx文件   java Eclipse提供了什么工具来运行Eclipse中未包含的程序?   spring boot Java泛型如何读取传递给泛型方法的类型上的字段或调用方法   Javacard中的javaecdsa签名