Code Monkey home page Code Monkey logo

node-flatten-deps's Introduction

Flatten Dependencies

Moves node dependencies up the tree to prevent long paths.
On Windows the path limit is 260 chars, which can be a big problem for larger projects.

Installation

npm install -g flatten-deps

Disclaimer

Be certain that none of your installed dependencies rely directly on the file system structure. This script can break these. Often that means checking bin commands.

Usage

cd PROJECT_ROOT
flatten-deps

TODO

  • Tests

node-flatten-deps's People

Stargazers

 avatar Denis Leonov avatar Stefan Scherer avatar Andrew Stoker avatar Dmitriy Tsvettsikh avatar  avatar  avatar

Watchers

Tomas Ruzicka avatar James Cloos avatar

node-flatten-deps's Issues

Questions about compability

Well, I found this problem under windows when I was trying to check my project to TFS.

I was bumping my head to find a solution. I tried this and it just works!!
Thank you so much.

Some questions:
If I install another module after I run flatten-deps, can I run it again to flatten the new module?
Does this work with in all situations, or could it break my project?

Error:EPERm, operation not permitted

When trying to flatten a project:

fs.js:554
return binding.rename(pathModule._makeLong(oldPath),
^
Error: EPERM, operation not permitted 'D:\TFS\AppRoot\App\node_modules\adm-zip'
at Object.fs.renameSync (fs.js:554:18)
at moveIfPossible (C:\Users\myuser\AppData\Roaming\npm\node_modules\flatten-deps\lib\flatten.coffee:54:10)
at run (C:\Users\hats\AppData\Roaming\npm\node_modules\flatten-deps\lib\flatten.coffee:69:9)
at Object. (C:\Users\hats\AppData\Roaming\npm\node_modules\flatten-deps\bin\flatten-deps:3:25)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

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.