Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matejsvajger/npm-package-foundation

Skeleton for a simple NPM Package with ES2015 support and CI already configured.
https://github.com/matejsvajger/npm-package-foundation

Last synced: 19 days ago
JSON representation

Skeleton for a simple NPM Package with ES2015 support and CI already configured.

Awesome Lists containing this project

README

        

# npm-package-foundation

Skeleton for a simple NPM Package with ES2015 support and CI already configured.

#### Pre-configured development tools

- [Bublé Bublé](https://buble.surge.sh/guide/)
- [ESLint ESLint](https://eslint.org/) with [`standard-js` config](https://www.npmjs.com/package/eslint-standard-config)
- [Prettier Prettier](https://prettier.io/)
- [Jest Jest](https://jestjs.io/)
- [EditorConfig EditorConfig](https://editorconfig.org/)

#### Pre-configured CI tools

- [Travis CI Travis CI](https://travis-ci.org/) continuous integration platform
- [NPM NPM automatic releasing](https://docs.travis-ci.com/user/deployment/npm)
- [Codecov Codecov](https://codecov.io/) code coverage reporting
- [ESDoc ESDoc](https://esdoc.org/)

## Getting started

1. Add this project as `skeleton` remote:

```sh
mkdir my-project && cd my-project
git init
git remote add skeleton https://github.com/matejsvajger/npm-package-foundation.git
git remote set-url skeleton --push "Error: skeleton remote is read-only" # Disable pushing on skeleton
git config remote.skeleton.tagOpt --no-tags # Disable fetching tags on skeleton
git remote add origin
git pull skeleton master --no-tags
git push -u origin master
```

2.

- Set initial version (ex: `0.1.0`) in `package.json`
- Set `scriptName` in config of `package.json` for umd builds.

3. Replace the following occurrences

- [ ] `matejsvajger/npm-package-foundation` → _your repo slug_
- [ ] `npm-package-foundation` → _your project name_
- [ ] `package-foundation` → _your NPM package name_
- [ ] `Matej Svajger` → _your name_
- [ ] `[email protected]` → _your public email address_
- [ ] `https://matejsvajger.com` → _your website_

4. Import project in CI tools:

- [ ] [Travis CI](https://travis-ci.org/)
- [ ] [Codecov](https://codecov.io/)
- [ ] [ESDoc](https://doc.esdoc.org/-/generate.html)

5. Add the following environment variables in your new Travis CI project's settings:

- [ ] `NPM_AUTH_TOKEN`: NPM authentication token, used for automatic NPM releasing. See [documentation](https://docs.travis-ci.com/user/deployment/npm).

6. Cleanup `README.md` by removing all documentation related to the skeleton.

## Usage

### Automatic releasing process

> _Note:_ you can try this process safely by releasing an "alpha" version. Ex: 0.1.0-alpha.2

- [ ] Update the package version in `package.json` (ex: `1.2.1`), commit it, and push it.
- [ ] Tag the previously created commit (ex: `v1.2.1`), and push it (`git push --tags`).
- Travis build runs on tagged commit
- New package version is automatically released after tests have passed

## License

This project is released under [MIT License](LICENSE.md).

---

## **Note:** the content after this is the actual package documentation (to be edited after cloning).

# npm-package-foundation

[![Latest Stable Version](https://img.shields.io/npm/v/package-foundation.svg)](https://www.npmjs.com/package/package-foundation)
[![Build Status](https://img.shields.io/travis/matejsvajger/npm-package-foundation/master.svg)](https://travis-ci.org/matejsvajger/npm-package-foundation)
[![NPM Downloads](https://img.shields.io/npm/dm/package-foundation.svg)](https://www.npmjs.com/package/package-foundation)

[![dependencies Status](https://david-dm.org/matejsvajger/npm-package-foundation/status.svg)](https://david-dm.org/matejsvajger/npm-package-foundation)
[![Test Coverage](https://img.shields.io/codecov/c/github/matejsvajger/npm-package-foundation/master.svg)](https://codecov.io/github/matejsvajger/npm-package-foundation?branch=master)
[![API Documentation](https://doc.esdoc.org/github.com/matejsvajger/npm-package-foundation/badge.svg)](https://doc.esdoc.org/github.com/matejsvajger/npm-package-foundation/)

## Installation

Prerequisites: [Node.js](https://nodejs.org/) 8+, **npm** 3+.

npm install --save package-foundation

## Usage

### ES5

var xxx = require('package-foundation').default;

### ES2015+

import xxx from 'package-foundation';

## Contributing

Please refer to the [guidelines for contributing](./CONTRIBUTING.md).

[![devDependencies Status](https://david-dm.org/matejsvajger/npm-package-foundation/dev-status.svg)](https://david-dm.org/matejsvajger/npm-package-foundation?type=dev)

## License

[![License](https://img.shields.io/npm/l/package-foundation.svg)](LICENSE.md)

---