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

@norejs/cli

v0.0.5

Published

nore rollup cli

Downloads

8

Readme

@nore-js/cli

@norejs/cli - A Minimalist JS Package Building Tool

If you want to develop a JS package, @nore/js can save you from the hassle of configuring rollup, babel, eslint, and more.

Main Features:

  • TypeScript Support
  • JSX and TSX Support
  • React Component Development Support
  • Sass Support
  • Export as ES Modules (ESM) and CommonJS (CJS)
  • Support for Configuring Extension Features
  • Support for Local Debugging with yalc

Usage

Installation

npm i @norejs/cli

Project Directory

You need to manually create the following directory structure:

├── src
│   ├── index.ts # Entry file
├── package.json

Modify package.json

{
  // ...
  "main": "dist/index.js",
  "module": "dist/index.esm.js",
  "scripts": {
    "start": "nore start",
    "build": "nore build"
  }
  // ...
}

Development

npm start

After running, it will automatically monitor the changes of files in the src directory. When the files change, it will automatically rebuild and publish to the local repository of yalc. You can use the yalc link command to link the local repository package to your project for debugging.

Build

npm run build

Configuration

If you want to customize the configuration, you can create a nore.config.js file in the root directory of the project. The configuration items are as follows:

// nore.config.js
module.exports = function rollupConfig(config, options) {
    // config is the current rollup configuration, modify it here and return a new config
    return config;
};

@norejs/cli 极简的 JS package 构建工具

如果你想开发一个 JS package, @nore/js 可以帮你省去 rollupbabeleslint 等配置的烦恼

主要包含以下功能:

  • 支持 typescript
  • 支持 jsx、tsx
  • 支持 react 组件开发
  • 支持 sass
  • 支持导出 ESM、CJS
  • 支持配置扩展功能
  • 支持 yalc 本地调试

使用

安装

npm i @norejs/cli

项目目录

需要手动创建目录结构,目录结构如下:

├── src
│   ├── index.ts # 入口文件
├── package.json

修改 package.json

{
  // ...
  "main": "dist/index.js",
  "module": "dist/index.esm.js",
  "scripts": {
    "start": "nore start",
    "build": "nore build"
  }
  // ...
}

开发

npm start

运行后,会自动监听 src 目录下的文件变化,当文件变化时,会自动重新构建,同时会自动发布至 yalc 本地仓库, 你可以使用 yalc link 命令将本地仓库的包链接到你的项目中进行调试

构建

npm run build

配置

如果你想自定义配置,可以在项目根目录下创建 nore.config.js 文件,配置项如下:

// nore.config.js
module.exports = function rollupConfig(config, options) {
    // config 是当前正在使用的rollup配置,在这里修改后返回一个新的config
    return config;
};