Giter Club home page Giter Club logo

node-git-require's Introduction

Commitizen friendly

git-loader

This module provide the ability to require a commonjs module at a given version in the repository history.

This may be usefull to monitor performance enhancement during a refactor or avoiding the use of submodule pointing at other branch of the same repository.

git bisect command can provide the same kind of feature, but I wanted to play with git and module override.

Usage

This module must be installed as a devDependencies since it won't and should'nt be of any use on production servers. Which means you should install it using npm install --save-dev git-loader and use it in ci or local environment like this

require('git-loader')
const previousVersionOfModuleA = './A#previous-tag.git'
const currentVersionOfModuleA = './A'

// ... do your stuff

You can also run the same using node -r git-loader perf.js where perf.js looks like

const previousVersionOfModuleA = './A#previous-tag.git'
const currentVersionOfModuleA = './A'

// ... do your stuff

Moreover this module needs git to be installed in the environment you will on which you will use it, but there's a a lot of chance this may be the case, since it seems to be one of the npm requirement to enable some of its feature like git dependencies. (note for myself, I may have use the npm's internal git lib instead of writing my own ...)

Tooling and commit on this project

This package makes use of the commitizen and husky packages, see how to install it on you project and how to use it.

Roadmap

All the roadmap for this project is handled using github features like the github's projects page, milestone, issues ... to be honest I'm still wondering what will be the most efficient way of handling it.

Warnings

One of the strongest limitation of this module is that when a scripts is loaded at a given version, it could require other modules which exists in your project at this specific revision.

Those modules may not exist at the current point of history of the working folder and even if they still exists they may exports a different signature.

Same is true for the dependencies defined in your package files.

All those limitation has been clearly identified and may be addressed or not in future versions.

node-git-require's People

Contributors

tetedacier avatar

Watchers

James Cloos avatar  avatar

node-git-require's Issues

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.