Browse Source

chore: 修改脚本

master
iapyang 5 years ago
parent
commit
b8d00adabc
  1. 8
      lib/prepublish/prepublish.js

8
lib/prepublish/prepublish.js

@ -1,9 +1,9 @@
const { resolve } = require("path"); const { resolve } = require("path");
const { writeFileSync } = require("fs"); const { writeFileSync } = require("fs");
if (!process.env.VERDACCIO_AUTH) { // if (!process.env.VERDACCIO_AUTH) {
return; // return;
} // }
function pad2(n) {// always returns a string function pad2(n) {// always returns a string
return (n < 10 ? "0" : "") + n; return (n < 10 ? "0" : "") + n;
@ -24,4 +24,4 @@ packageJSON.version = `2.0.${version}`;
writeFileSync(resolve(__dirname, "../../package.json"), JSON.stringify(packageJSON, null, 2)); writeFileSync(resolve(__dirname, "../../package.json"), JSON.stringify(packageJSON, null, 2));
writeFileSync(resolve(__dirname, "../../.npmrc"), `//192.168.5.154:4873/:_authToken="${process.env.VERDACCIO_AUTH}"`); // writeFileSync(resolve(__dirname, "../../.npmrc"), `//192.168.5.154:4873/:_authToken="${process.env.VERDACCIO_AUTH}"`);

Loading…
Cancel
Save