1.8.12 • Published 7 years ago

ts-sm v1.8.12

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

TS-SM

A tool for managing npm modules written in typescript.

Release Information

Release : 1.4.0

Documentation Status : First Draft (Subject To Change)

Build Status : Stable

Insert Badges Here

Contents

Installation

// Either install globally (Prefered)
npm install -g ts-sm

// or install locally
npm install --save-dev ts-sm

Basic Usage

1. Create project

Your project should be structured like the following

ROOT/
    |--/ dist // output folder
    |--/ src // target module
       |-- package.json // module package.json
    |-- package.json // root package.json
2. Add some dependencies to our module

a) For Safety: add "private":true to your root package.json b) In our module package.json we should have the dependencies and peer dependencies of our module. Example module package.json

{
  "name": "my-typscript-module",
  "dependencies": {},
  "peerDependencies": {}
}
3. Adding advanced configuration options

(Coming Soon) Since every project is different there is a need for an option configuration to override some defaults or add addition configuration to webpack module builder, for these reasons there will be an addition configuration kept in either one of three locations.

Current options include:

  • package.json | Already within scope and easily implemented
  • addition json | An addition configuration file just for ts-sm
4. Running TS-SM

If you have TS-SM globally installed then you can simply move to the root of your project(s) and run ts-sm as follows

ts-sm build -p src

alternatively use an npm script to use a local or global version on TS-SM

{
  "scripts": {
    "build": "ts-sm build -p src"
  }
}
  1. Now you can go to dist folder and do npm publish (will be added as a command later)

Commands & Flags

By default all task need the project root to be specified

--project -p | (Required) | Project to target (Dir)
build - Will Build Our Node Submodule From Src -> Dist
--watch   -w       | Watch our src folders
--clean   -c       | Clean our target before new build
--local   -l       | Use local dependency number (Mainly for publishing)
link - Will run npm link in each sub module dist folder
--watch   -w       | Watch our src folders
--deep    -c       | By default local sub modules will be linked to each other
--here    -h       | Link all sub modules to root package or here
publish - Will run npm publish in each sub module dist dir
--clean   -c       | Clean our target before new build
--local   -l       | Use local dependency number (Mainly for publishing)
--any-branch       | Disables on 'master' check
--skip-git-check   | To skip all git checks
--yarn             | To install dependencies with 'yarn'
--skip-cleanup     | To not delete 'node_modules' before installing
--skip-publish     | Skip publishing and clean build, in case you want to double check something
--tag              | Same as 'npm publish --tag next', use in case you want new release without changing 'latest' npm tag
--access           | Same as 'npm publish --access p*'

(1.Run Git PreChecks)->(2.Clean Install Deps)->(3.Run Tests)->(4.Run e2e Tests)->(5.Publish Clean Build)

Steps 1-4 can be skipped with --yolo flag

version - Will run npm version in each sub module and then the root folder
--message -m         | Message to add to the version release
--no-git-tag-version | Do not create a version commit and tag(Applied only to the root folder)
--skip-push          | Skip pushing of the version commit and tags

Contributing

Will Update Later

Contributors

Jay Demitri

Bugs and Feature Requests

Will Update later

Copyright and license

Code and documentation (c) Copyright 2016 Jay Demitri and London Development Studio.

Code released under the MIT License.

Docs released under Creative Commons.

1.8.12

7 years ago

1.8.7

7 years ago

1.8.6

7 years ago

1.8.1

7 years ago

1.4.2

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago