lastboy / package-script Goto Github PK
View Code? Open in Web Editor NEWpackage.json script extension for getting smooth installation process
Home Page: http://nodejscorner.blogspot.co.il/
License: MIT License
package.json script extension for getting smooth installation process
Home Page: http://nodejscorner.blogspot.co.il/
License: MIT License
Is there any options available to switch off the logging?
This is exactly what I need, however is there a way to check if packages already exist and if they do exist, don't install them?
Hi there!
do you plan to add nvm support?
2016-02-01 14:17:22.417
************ Package Script ************************************* process id: 31956
2016-02-01 14:17:22.444 Package Script : #node-sudo-passwd#
2016-02-01 14:22:43.345
************ Package Script ************************************* process id: 32665
2016-02-01 14:22:43.366 Package Script : #node-sudo-passwd#
2016-02-01 14:23:39.499 Package Script : Sorry, try again.
2016-02-01 14:23:39.501 Package Script : #node-sudo-passwd#
2016-02-01 14:27:14.790 Package Script : sudo: npm: command not found
2016-02-01 14:27:14.792 Package Script Complete 1
2016-02-01 14:27:14.804 Package Script : sudo: npm: command not found
2016-02-01 14:27:14.805 Package Script Complete 1
2016-02-01 14:27:14.815 Package Script : sudo: npm: command not found
2016-02-01 14:27:14.816 Package Script Complete 1
2016-02-01 14:27:14.828 Package Script : sudo: npm: command not found
2016-02-01 14:27:14.829 Package Script Complete 1
2016-02-01 14:27:14.842 Package Script : sudo: npm: command not found
2016-02-01 14:27:14.845 Package Script Complete 1
2016-02-01 14:27:14.846 [package-script] process completed, see pkgscript.log for more information
Hi,
how is it possible to switch off the log file?
Please do not suggest that people install packages globally at install time. This is never necessary, and is horribly brittle and just generally bad behavior.
Consider the following:
node_modules/.bin
, ../node_modules/.bin
, ../../node_modules/.bin
, etc are already in the PATH
when package scripts run. So, a package doesn't have to be global to be used in a script. So, globally installing deps is never required, and is unnecessary if the package (or one of its parents) has it installed locally./usr/local
is root-owned. Globally run package scripts are executed as the nobody
user, so you are virtually guaranteed to get a EACCES
or EPERM
if you install something globally in a package script. This is typically not allowed, and usually won't work, unless you chown your /usr/local or do some other non-default stuff.prepublish
time instead of at install
time. Make grunt a devDependency
, and run the script on prepublish
instead of install
.install
time (and quite frankly, I've never seen a case other than binary builds with node-gyp where this is the case), then you won't be guaranteed to have your deps installed before install
scripts run. In that case, list grunt (or whatever) as a bundledDependency
so that you'll be guaranteed to have it from the start. You still don't need it installed globally, because the PATH
is already set up to include it.Is there a use case I'm missing that you believe requires installing things globally at your local package's install time? If so, let's address them in a different way, that doesn't rely on surprises and insecurity.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.