Code Monkey home page Code Monkey logo

sphere-deleter's Introduction

commercetools Deleter

Build Status

With this component you can easily delete a bulk of resources on the commercetools 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 protected]: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 (Behavior-Driven Development framework for testing javascript code). Thanks to jasmine-node, this test framework is also available for Node.js.

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

$ 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. More info here

Releasing

Releasing a new version is completely automated using the Grunt task grunt release.

grunt release // patch release
grunt release:minor // minor release
grunt release:major // major release

Styleguide

We <3 CoffeeScript here at commercetools! So please have a look at this referenced coffeescript styleguide when doing changes to the code.

License

Copyright (c) 2015 Martin Möllmann Licensed under the MIT License

sphere-deleter's People

Contributors

mmoelli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.