npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easygo

v2.5.2

Published

easygo

Downloads

29

Readme

ARA CLI 工具


ara脚手架 (基于vue2的vue组件开发)

  • ara开发的组件是第三方开发的使用的 具备pc和移动端两种数据能力的vue组件
  • 保证ara组件代码的规范性 遵循百度代码开发规范百度前端开发规范

安装

依赖环境: Node.js (>=4.x).

$ [sudo] npm install -g ara-cli

注意: nodejs 5.x, 6.x 安装模块时,可能会报node-gyp相关错误,需要使用如下命令安装

$ [sudo] npm install --unsafe-perm -g ara-cli

nodejs 5.x 安装bufferutil模块时可能会报编译错误,建议使用4.4或者6.x以上版本。

使用

在当前项目根目录中初始化ara配置:

$ ara init

会创建ara.config文件,相关配置如下:

module.exports = {

    /**
     * ara server调试的端口号
     *
     * @type {number}
     */
    port: 8000,

    /**
     * 本地ara网页后缀名,会对ara网页动态添加调试脚本
     *
     * @type {RegExp}
     */
    araPageExt: /\.(?:html|htm|ara)$/i,
    /**
     * 启用调试页面自动刷新
     *
     * @type {boolean}
     */
    livereload: true
};

在当前项目创建一个ara模板网页:

$ ara add index.html [ara-xxx...]

ara-extensions仓库中创建一个ara组件:

$ ara addelement ara-demo

验证ara网页:

$ ara validate index.html [...]

在当前项目或者ara-extensions仓库中启动ara网页调试器:

$ ara server

注意:调试ara-extensions仓库组件时,会读取组件中READEME.md的使用示例,因此组件的README.md中 应至少包含一段使用示例:

配置了araDir之后可以调试ara引擎。

ara server 启动多个实例的话会报端口占用错误,需要关闭其他实例或者kill掉占用端口的进程后再启动。

➜  ~ ara server
INFO livereload server start at: http://172.20.128.110:35730
ERROR PORT 8000 already in use, please retry again!

在当前项目中,校验编写的ara组件,可以校验ara组件目录或者ara组件压缩包:

# directory
$ ara validateelement ./ara-demo
# zip package
$ ara validateelement ./ara-demo.zip

更新ara工具,将ara模板更新到最新版本:

$ ara update

!


直接从官方 npm registry 安装,可能会由于网络原因,导致安装时间较长或安装失败。此时我们可以选择速度更快的 registry。

$ [sudo] npm install -g ara-cli --registry=https://registry.npm.taobao.org

License

MIT