@anireact/zc
Zero-config monorepo toolchain.
Last updated 4 months ago by miyaokamarina .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @anireact/zc 
SYNC missed versions from official npm registry.

@anireact/zc

Zero-config monorepo toolchain.

yarn global add @anireact/zc

Usage

Create new project:

cd ~/Projects
zc init 'Project name' 'Project description.'

Create new package:

cd ~/Projects/project-name
yarn zc init 'package-a' 'Package description.'

Add local dependency to project root:

cd ~/Projects/project-name
yarn zc add package-a

Add local dependency to specific package:

cd ~/Projects/project-name/@example-scope/package-b
yarn zc add @example-scope/package-a

You can remove local dependencies as usual, but if required/requiring package uses TypeScript, it is recommended to use yarn zc remove.

Build everything:

cd ~/Projects/project-name
yarn zc build

You can lint/fix/clean everything using lint/lint --fix/clean commands.

Also, you can use build --watch command to start incremental build; for packages built with webpack it will start WDS.

Build specific package:

cd ~/Projects/project-name/@example-scope/package-a
yarn zc build

Configuration

Global config:

// `~/.config/zc/index.js` on Linux.
//
// See https://github.com/kingjan1999/platform-folders `userData`
// for other operating systems.

module.exports = {
    /**
     * Projects location.
     */
    root: '/home/john/Projects',

    /**
     * Available licenses.
     */
    licenses: ['MIT'],

    /**
     * Default author info.
     */
    author: 'John Doe <john@example.com> (https://example.com/john)',

    /**
     * Default scopes for new projects.
     */
    scopes: ['example-scope'],

    /**
     * List of GitHub users/organizations.
     */
    users: ['example-user', 'example-org'],
};

Project config:

// Root `package.json`.
{
    // ...other fields
    "zc": {
        /**
         * Available scopes.
         */
        "scopes": ["example-scope"],

        /**
         * Prefer private packages in this project.
         */
        "private": false
    }
}

Package config:

// Package’s `package.json`.
{
    "zc": {
        /**
         * Build system:
         *
         * -   `rollup` — for libraries; doesn’t bundle any dependencies.
         * -   `webpack` — for applications; bundles all dependencies.
         * -   `babel` — for CLI tools; just transpiles sources with Babel.
         */
        "build": "rollup",

        /**
         * Allows to customize `publicPath` in webpack builds.
         */
        "publicPath": "/",

        /**
         * Allows to customize WDS port in webpack builds.
         */
        "port": 1488
    }
}

Configs

Dotfiles

  • .gitattributes.
  • .gitignore.
  • .npmignore.
  • .eslintignore.
  • .prettierignore

Build scripts

Roadmap

  • [ ] Investigate prose linting for English, Russian, Japanese:
    • LanguageTool (English, Russian, Japanese).
    • Hunspell (English, Russian).
    • Grammarly (English).
    • Rousseau (English).
    • Glvrd (Russian).
    • A3RT (Japanese).
  • [ ] ESLint spellchecker.
    • Probably with prose linting for non-code comments.
  • [ ] commitlint prose linter.
  • [ ] IDE settings:
    • Code.
    • IntelliJ IDEA.
  • [ ] GitHub settings.
  • [ ] Investigate OS-specific trash to ignore.
  • [ ] Keywords.
  • [ ] Shields.
  • [ ] Test on Windows.
  • [ ] TypeDoc.
  • [ ] Analyzer plugins for rollup and webpack.
  • [ ] webpack compression with Brotli/Zopfli.

License

MIT

Current Tags

  • 1.3.1                                ...           latest (4 months ago)

10 Versions

  • 1.3.1                                ...           4 months ago
  • 1.3.0                                ...           4 months ago
  • 1.2.6                                ...           4 months ago
  • 1.2.5                                ...           5 months ago
  • 1.2.4                                ...           5 months ago
  • 1.2.3                                ...           5 months ago
  • 1.2.2                                ...           5 months ago
  • 1.2.1                                ...           5 months ago
  • 1.2.0                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 31
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |