@youspace/common
common scripts for the @youspace packages
Last updated 6 months ago by henryque .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @youspace/common 
SYNC missed versions from official npm registry.

@youspace/common

A Packeage with common funcitons and helpers to use with @youspace packages

ys-service command line

Command-line helpers, used to run mocha and eslint more easy without need to intall directly the packages, all options mocha and lint works with the packages.

    ys-service test [mochaOptions] [file(s) path]
    ys-service lint [eslintOptions] [file(s) path]

Tsconfig

Use the tsconfig.common of the package with the default options

{
    "extends": "@youspace/common/tsconfig.common.json",
    "compilerOptions": {
        "moduleResolution": "node"
    }
}

ysLogger

This Class is used to handle all logs of @youspace packages, this will make more easy to add new features like logs in .txt or change the format of the logs in the future.

import { ysLogger } from "@youspace/common";

// normal info log
ysLogger.info("Log something");

// logs in debug level
ysLogger.debug("Log just in debug", "youspace:common");

ysError

This class is for the handle the errors of @youspace packages, like the ysLogger is made to to make easy to add new features in the future or change the format of messages.

import { ysError } from "@youspace/common";

const error = new ysError("Some Error message");

throw error;

About eslint.common.js

For now i will use this method insted of create a @youspace/eslint-config, because if I do that eslint eslint will require the instalations of plugins of @typescpt-eslint, this is something i wanna avoid in main project to be more clean.

But i see some issues in eslint rfs repository and they have some good ideas to resolve this problem if they are accepted, so for now I will wait for this features.

Current Tags

  • 0.0.94                                ...           latest (6 months ago)

13 Versions

  • 0.0.94                                ...           6 months ago
  • 0.0.93                                ...           6 months ago
  • 0.0.92                                ...           6 months ago
  • 0.0.91                                ...           6 months ago
  • 0.0.9                                ...           6 months ago
  • 0.0.8                                ...           6 months ago
  • 0.0.7                                ...           6 months ago
  • 0.0.6                                ...           6 months ago
  • 0.0.5                                ...           6 months ago
  • 0.0.4                                ...           6 months ago
  • 0.0.3                                ...           6 months ago
  • 0.0.2                                ...           6 months ago
  • 0.0.1                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (13)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |