Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

archive-tool

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archive-tool - npm Package Compare versions

Comparing version 1.0.0-rc.1 to 1.0.0

23

lib/index.js

@@ -23,6 +23,3 @@ 'use strict';

installNode: false,
installDeps: {
mode: 'npm',
registry: 'https://registry.npm.taobao.org'
},
installDeps: false,
archive: {},

@@ -71,9 +68,15 @@ ...config

installDeps(target, options) {
const { cwd, installDeps } = {
const { cwd, mode, registry } = {
cwd: target || this.config.target,
installDeps: this.config.installDeps,
mode: 'npm',
registry: 'https://registry.npm.taobao.org',
...this.config.installDeps,
...options
};
console.log(chalk.green(`------ start ${installDeps.mode} install --production dependencies ------ `));
const result = shell.exec(`${installDeps.mode} install --production --registry ${installDeps.registry || ''}`, {
console.log(chalk.green(`------ start ${mode} install --production dependencies ------ `));
const cmdArgs = [`${mode} install --production`];
if (registry && (mode === 'npm' || mode === 'cnpm')) {
cmdArgs.push(`--registry ${registry}`);
}
const result = shell.exec(cmdArgs.join(' '), {
cwd,

@@ -85,3 +88,3 @@ shell: '/bin/bash'

}
console.log(chalk.green(`------ ${installDeps.mode} install --production dependencies successfully ------ `));
console.log(chalk.green(`------ ${mode} install --production dependencies successfully ------ `));
}

@@ -107,3 +110,3 @@

console.log(chalk.green(`------ create archive ${archiveFormat} file successfully ------`));
console.log(chalk.green(`------ archive ${archiveFormat} file: ${target} `));
console.log(chalk.green(`------ archive ${archiveFormat} file path: ${target} `));
return target;

@@ -110,0 +113,0 @@ }

{
"name": "archive-tool",
"version": "1.0.0-rc.1",
"version": "1.0.0",
"description": "archive files to zip/tar",

@@ -37,3 +37,3 @@ "keywords": [

"test": "nyc --reporter=html --reporter=text mocha --timeout=1000000",
"cov": "nyc report --reporter=lcov && codecov --token=e971d1e7-39e2-44b1-b1ee-f4345b0adbee",
"cov": "nyc report --reporter=lcov && codecov --token=a16dbaf4-fd0e-4c30-8337-555619d75f0b",
"ci": "npm run lint && npm run cov",

@@ -40,0 +40,0 @@ "ii": "npm install --registry https://registry.npm.taobao.org"

@@ -32,4 +32,23 @@ # archive-tool

**Node>8.6.0**
## Install
```bash
npm install archive-tool
```
## Usage
```js
const Archive = require('archive-tool');
const archive = new Archive({
source: ['src', 'lib', 'package.json'],
target: 'dist'
});
archive.zip();
```
## License
[MIT](LICENSE)

@@ -31,3 +31,2 @@ 'use strict';

expect(archive.config.installNode).to.be.false;
expect(archive.config.installDeps.mode).to.equal('npm');
});

@@ -34,0 +33,0 @@ it('should set options test', () => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc