Browse Source

Merge pull request #15699 from nxhack/reduce_npm_size

node: Reduce node-npm package size
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
fcd9962411
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      lang/node/Makefile

+ 8
- 3
lang/node/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=node
PKG_VERSION:=v14.17.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
@ -141,8 +141,13 @@ define Package/node/install
endef
define Package/node-npm/install
$(INSTALL_DIR) $(1)/usr/lib/node_modules
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node_modules/
$(INSTALL_DIR) $(1)/usr/lib/node_modules/npm
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE} \
$(1)/usr/lib/node_modules/npm/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{AUTHORS,*.md} \
$(1)/usr/lib/node_modules/npm/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{node_modules,bin,lib} \
$(1)/usr/lib/node_modules/npm/
$(INSTALL_DIR) $(1)/usr/bin
$(LN) ../lib/node_modules/npm/bin/npm-cli.js $(1)/usr/bin/npm
$(LN) ../lib/node_modules/npm/bin/npx-cli.js $(1)/usr/bin/npx


Loading…
Cancel
Save