@ssv/tools
tools and utilities used for builds and develop sketch7 (ssv) libraries.
Last updated a year ago by ssv .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ssv/tools 
SYNC missed versions from official npm registry.

@ssv/tools

CircleCI npm version

tools and utilities used for builds and develop sketch7 (ssv) libraries. includes sharing of the following configs:

  • .eslintrc
  • .stylelintrc
  • tslint.json
  • tsconfig.json

In order to contribute please read the Contribution guidelines.

Quick links

Change logs | Project Repository | Contribution guidelines

Installation

Get library via npm

npm install @ssv/tools --save

Usage

API

import { compileTsc, rollup } from "@ssv/tools";

// compile typescript - execute typescript with cli
compileTsc({
  module: "es2015",
  configPath: "./tsconfig.build.json",
  continueOnError: args.continueOnError
});

// rollup - execute rollup with cli
rollup({ continueOnError: args.continueOnError });

// microbundle - execute microbundle with cli
microbundle({ continueOnError: args.continueOnError });

// prepare for prepublish, as copy files such as `README.md`, `CHANGELOG.md`, copy and transform `package.json`
buildResources();

// prepare release build such as update version placeholder
prepareReleaseBuild();

gulp utils

import { setGulpContext, registerGulpMultiTargetBuilds } from "@ssv/tools";
import gulp from "gulp";

// before geting started with gulp utils, you need to invoke this once in order to share same instance of gulp.
setGulpContext(gulp)

// generates and register task for gulp by convention for multi-targetting build e.g. amd, umd, es2015 etc...
// e.g. compile:styles (all) | compile:styles:dev (dev target) | compile:styles:TARGET etc... (compile:styles:es2015).
registerGulpMultiTargetBuilds({
    taskName: "html",
    action: compileHtml,
    config: { 
        buildTargets: [
            "es2015",
            "amd",
            "umd"
        ],
	    devTarget: "amd",
    }
});

ES5

for usage with es5, use as following:

const ssvTools = require("@ssv/tools");
ssvTools.compileTsc(...);

Base configs

eslint

{
    "extends": "./node_modules/@ssv/tools/config/.eslintrc"
}

tslint

{
    "extends": [
        "./node_modules/@ssv/tools/config/tslint.json"
    ]
}

tsconfig

{
    "extends": "./node_modules/@ssv/tools/config/tsconfig.json"
}

stylelint

{
    "extends": "./node_modules/@ssv/tools/config/.stylelintrc"
}

Getting Started

Setup Machine for Development

Install/setup the following:

  • NodeJS v10+
  • Visual Studio Code or similar code editor
  • TypeScript 3.1+
  • Git + SourceTree, SmartGit or similar (optional)
  • Ensure to install global NPM modules using the following:
npm install -g git gulp

Cloning Repo

  • Run git clone https://github.com/sketch7/ssv-tools.git

Project Setup

The following process need to be executed in order to get started.

npm install

Building the code

npm run build

Current Tags

  • 0.8.1                                ...           latest (a year ago)

30 Versions

  • 0.8.1                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.5                                ...           a year ago
  • 0.7.4                                ...           a year ago
  • 0.7.3                                ...           a year ago
  • 0.7.2                                ...           a year ago
  • 0.7.1                                ...           a year ago
  • 0.7.0                                ...           a year ago
  • 0.6.12                                ...           2 years ago
  • 0.6.11                                ...           2 years ago
  • 0.6.10                                ...           2 years ago
  • 0.6.9                                ...           2 years ago
  • 0.6.6-rc.2                                ...           2 years ago
  • 0.6.6-rc.1                                ...           2 years ago
  • 0.6.6-rc.0                                ...           2 years ago
  • 0.6.6                                ...           2 years ago
  • 0.6.5                                ...           2 years ago
  • 0.6.4                                ...           2 years ago
  • 0.6.3                                ...           2 years ago
  • 0.6.2                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (7)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |