Coder Social home page Coder Social logo

zerotohero-dev / octomate Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 54 KB

Octomate: Automation made easy.

Home Page: https://bytesized.tv/

License: Other

JavaScript 100.00%
javascript automation vidcast screencast buddy-works ci-cd pipeline byte-sized bytesized-tv bytesized-javascript

octomate's Introduction

tests deps npm license

        __,-“”-.__
   |\  / ,-.  ,-. \  /|
   )o)( ( o )( o ) )(o(
  /o/ |  `-'  `-'  | \o\
  \ \/   OctOmate   \/ /
~ ~~~~~~~~~~~~~~~~~~~~~~ ~

octomate: Automation made easy.

octomate compares the npm version of a given library to its git version. If there is a mismatch, it runs tests against the current git version and publishes the library to npm after the tests pass. — It is kind of like poor man’s CI.

About octomate

octomate is created as an automation-helper:

It checks your libary’s NPM version and if your git version is ahead of the NPM version, then it runs a series of actions on your libary and if all those actions complete successfully, it publishes your library to NPM, synchronizing your NPM and git versions.

Note that there are other tools (like git commit hooks, CI/CD environments, task runners) that can give more flexibility than octomate. — At its current state, octomate is just a thought experiment.

Installation

Install octomate via NPM:

npm install octomate -g

Note that you might need a recent version of Node.JS (v.7.0.0. and above is preferred).

Usage Examples

I’ve covered a particular usage examples in the “automate all the thingz” videocast here.

octomate is a command line application, it accepts a single argument which is a a git repository URL.

octomate "[email protected]:jsbites/badem.git"

Replace "[email protected]:jsbites/badem.git" with your repository’s SSH url. Given that you have configured your local npm, the above code will…

  • Create a sandbox folder.
  • Clone the repository into that sandbox folder.
  • Compare the repository’s NPM version to the version in its package.json
  • If versions match it will do nothing and exit; otherwise it’ll proceed with the next steps:
  • Run npm install.
  • If npm install succeeds, run npm test.
  • If npm test succeeds, run npm publish.

respectively.

Note that you repository should have predefined install, test, and publish tasks registered in the scripts section of your package.json.

Dependencies

You will need the current version of Node.JS with all the bells and whistles — You can install it from nodejs.org.

How to Develop

For development, you’ll need to first clone or for this repository, and then install the dependencies and transpile the code as follows:

cd octomate
npm install
./bin/transpile.sh

Note that there is no watcher task, you you’ll have to run .bin/transpile.sh whenever you change the source code.

Important Files and Folders

  • ./lib: The source files live here. lib/octomate.js is where the majority of the action takes place.
  • ./release: Once you run ./bin/.transpile.sh, the transpiled files will be copied here..
  • ./bin: Shell scripts. — ./bin/octomate.js is the pakcage main script; ./bin/transiple.sh transpiles files.
  • ./CHANGELOG.md: A log of what has been done since the last version.
  • ./CODE_OF_CONDUCT.md: Tells the collaborators to be nice to each other.
  • ./README.md: This very file.
  • ./.babelrc: Used for development; configures babel.
  • ./.eslintrc: Used for development; configures eslint.

Wanna Help?

Any help is more than appreciated.

If you want to contribute to the source code, fork this repository and create a pull request.

In lieu of a formal style guide, take care to maintain the existing coding style.

Also, don’t forget to add unit tests for any new or changed functionality.

If you want to report a bug; or share a comment or suggestion, either email me, or file an issue.

I’ve Found a Bug; I Have an Idea

For bug reports and suggestions, please file an issue.

Contact Information

License

MIT-licensed. — See the license file for details.

Code of Conduct

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

See the code of conduct for details.

A [ByteSized.TV][vidcast] Project

This repository is a part of the [Byte-Sized JavaScript VideoCasts][vidcast].

It is a compilation of short (around ten minutes) screencasts about JavaScript and related technologies.

[Learn, explore, and have fun][vidcast]!

octomate's People

Contributors

v0lkan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

octomate's Issues

Make octomate executable

AC:

  • Update package.json;
  • make sure that the module can be installed with a -g flag;
  • check that the command runs successfully.

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.