Not bundler
- 📁 source/
- main source code
- 📁 source-bin/
- bin source code
- 📁 example/
- example file for test
- 📄 SPEC.md
- list of all directly accessible codes, sort of API lockfile
build dev with watch:
npm run script-pack
npm run build-library-dev
npm run build-bin-devstart example server:
npm run example-start-serverclear up example file: (optional)
npm run example-resetrun each example:
npm run example-file-list
npm run example-file-upload
npm run example-file-download
npm run example-package-list
npm run example-package-upload
npm run example-package-download
npm run example-directory-list
npm run example-directory-upload
npm run example-directory-downloador run npm test for full build & test
This package should provide a somewhat usable private package setup
This package can list/upload/download other npm package
from self-hosted server with home-made auth check
This package do not help pack package .tgz,
or run the actual package install
For this private package setup to work with npm install,
some change & config is required.
First edit package.json:
{
"devDependencies": {
// New private package, with a local path
"@nundler/local-aaa": "./.nundler-gitignore/nundler-local-aaa-0.0.0.tgz",
"@nundler/local-bbb": "./.nundler-gitignore/nundler-local-bbb-1.1.1.tgz",
"@nundler/local-ccc": "./.nundler-gitignore/nundler-local-ccc-2.2.2.tgz",
// Other normal npm public package
"other-aaa": "^0.0.0",
"other-bbb": "^1.1.1",
"other-ccc": "^2.2.2",
}
}Then, for this to correctly install,
those private package should exist under local path: ./.nundler-gitignore/
To pull those packages before the install start,
add nundler to preinstall:
npx nundler\
--download\
--package-json ./package.json\
--package-name-filter "@nundler/local-"\
--package-path-prefix "some/server/path/prefix"\
--url-file-download "https://url/file/download"\
--auth-file "./path/to/auth/file"
# or put all to `--config ./nundler.config.json` for a cleaner scriptNow upload the required package to server, if it's not done already
(assume download from https://url/file/download)
With the specified prefix some/server/path/prefix,
the file should be accessible from the server with options like:
https://url/file/download?file=some/server/path/prefix/.nundler-gitignore/nundler-local-aaa-0.0.0.tgz
https://url/file/download?file=some/server/path/prefix/.nundler-gitignore/nundler-local-bbb-1.1.1.tgz
https://url/file/download?file=some/server/path/prefix/.nundler-gitignore/nundler-local-ccc-2.2.2.tgz
Similar example setup can be found in example/sample-package/
Test with:
npm run example-reset # reset example file
npm run example-start-server # start file server
# check under `example/sample-package-gitignore/` first,
# should only have single file: `package.json`
npm run example-package-download # pull private packages from server
# now should have `.tgz` file for private packages,
# in `example/sample-package-gitignore/.nundler-gitignore/`- require edit
preinstallscript - require use
pathinstead ofversionto specify package inpackage.json
should be able to run 7z@>=16.00
- Windows: download, install & add to PATH
- Ubuntu/Debian:
sudo apt install p7zip-fullor dpkg + deb: p7zip-full p7zip - Fedora:
sudo yum install p7zip p7zip-plugins - OSX:
HOMEBREW_NO_AUTO_UPDATE=1 brew install p7zip