<commit_before># commercetools Deleter

[![Build Status](https://secure.travis-ci.org/mmoelli/sphere-deleter.png?branch=master)](http://travis-ci.org/mmoelli/sphere-deleter)

With this component you can easily delete a bulk of resources on the [commercetools](http://dev.commercetools.com) platform.

## Getting Started

### Via `npm`
* Install the module with: `$ npm install sphere-deleter`
* Build local libraries from coffeescript: `$ grunt build`

### Via GitHub
* Clone repository: `$ git clone <EMAIL>:mmoelli/sphere-deleter.git`
* Install dependencies from `npm`: `$ npm i`
* Build local libraries from coffeescript: `$ grunt build`

## Documentation
General command line options can be seen by simply executing the command `node lib/run`.
```
$ node lib/run

  Usage:     --projectKey <project-key> --clientId <client-id> --clientSecret <client-secret>

  Options:

    --projectKey <key>              your commercetools project-key
    --clientId <id>                 your OAuth client id for the commercetools API
    --clientSecret <secret>         your OAuth client secret for the commercetools API
    --resource <resource>           the type of resource you want delete
    --resourceId <id>               specific id of a resource you want to delete
    --deleteHours <hours>           number of hours to go back for deletion (lastModifiedAt)    [default: 1]
    --allTime
    --logLevel <level>              specifies log level (error|warn|info|debug|trace)           [default: info]
    --logDir <directory>            specifies log file directory [.]
    --logSilent <boolean>           use console to print messages                               [default: false]
```

### Supported Resources
The following resources can be selected for deletions
```
cartDiscounts
carts
categories
channels
customObjects
customers
customerGroups
discountCodes
inventoryEntries
messages
orders
payments
products
productDiscounts
productProjections
productTypes
reviews
shippingMethods
states
taxCategories
types
zones
```

## Tests
Tests are written using [jasmine](http://pivotal.github.io/jasmine/) (Behavior-Driven Development framework for testing javascript code). Thanks to [jasmine-node](https://github.com/mhevery/jasmine-node), this test framework is also available for Node.js.

To run tests, simple execute the *test* task using `grunt`.

```bash
$ grunt test
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). More info [here](CONTRIBUTING.md)<commit_msg>Final touches to the README.<commit_after># commercetools Deleter

[![Build Status](https://secure.travis-ci.org/mmoelli/sphere-deleter.png?branch=master)](http://travis-ci.org/mmoelli/sphere-deleter)

With this component you can easily delete a bulk of resources on the [commercetools](http://dev.commercetools.com) platform.

## Getting Started

### Via `npm`
* Install the module with: `$ npm install sphere-deleter`
* Build local libraries from coffeescript: `$ grunt build`

### Via GitHub
* Clone repository: `$ git clone git@github.com:mmoelli/sphere-deleter.git`
* Install dependencies from `npm`: `$ npm i`
* Build local libraries from coffeescript: `$ grunt build`

## Documentation
General command line options can be seen by simply executing the command `node lib/run`.
```
$ node lib/run

  Usage:     --projectKey <project-key> --clientId <client-id> --clientSecret <client-secret>

  Options:

    --projectKey <key>              your commercetools project-key
    --clientId <id>                 your OAuth client id for the commercetools API
    --clientSecret <secret>         your OAuth client secret for the commercetools API
    --resource <resource>           the type of resource you want delete
    --resourceId <id>               specific id of a resource you want to delete
    --deleteHours <hours>           number of hours to go back for deletion (lastModifiedAt)    [default: 1]
    --allTime
    --logLevel <level>              specifies log level (error|warn|info|debug|trace)           [default: info]
    --logDir <directory>            specifies log file directory [.]
    --logSilent <boolean>           use console to print messages                               [default: false]
```

### Supported Resources
The following resources can be selected for deletions
```
cartDiscounts
carts
categories
channels
customObjects
customers
customerGroups
discountCodes
inventoryEntries
orders
payments
products
productDiscounts
productProjections
productTypes
reviews
shippingMethods
states
taxCategories
types
zones
```

## Tests
Tests are written using [jasmine](http://pivotal.github.io/jasmine/) (Behavior-Driven Development framework for testing javascript code). Thanks to [jasmine-node](https://github.com/mhevery/jasmine-node), this test framework is also available for Node.js.

To run tests, simple execute the *test* task using `grunt`.

```bash
$ grunt test
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). More info [here](CONTRIBUTING.md)
{'fraction_non_alphanumeric': 0.09528319757529835, 'fraction_numerical': 0.00037885963250615644, 'mean_word_length': 3.4745762711864407, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1580024', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1460, 'n_words': 538}