chore: remove unused code

This commit is contained in:
Juan Picado @jotadeveloper
2019-04-06 17:42:52 +02:00
parent dc5b14821b
commit 6fcb415091
10 changed files with 470 additions and 301 deletions

56
tools/_config.yaml Normal file
View File

@@ -0,0 +1,56 @@
web:
title: Verdaccio
# gravatar: false
# sort_packages: asc
plugins: ../
auth:
auth-memory:
users:
foo:
name: test
password: test
bar:
name: bar
password: test
store:
memory:
limit: 1000
# theme:
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
notBefore: 1
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $all
publish: $authenticated
unpublish: $authenticated
'**':
access: $all
publish: $authenticated
unpublish: $authenticated
middlewares:
audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: trace }

View File

@@ -32,7 +32,7 @@ new WebpackDevServer(compiler, {
},
proxy: [{
context: ['/-/verdaccio/logo', '/-/verdaccio/packages', '/-/static/logo.png'],
target: 'http://localhost:4873',
target: 'http://localhost:8080',
}],
}).listen(4872, 'localhost', function(err) {
if (err) {

13
tools/verdaccio.js Normal file
View File

@@ -0,0 +1,13 @@
const fs = require('fs');
const startServer = require('verdaccio').default;
const yalm = require('js-yaml');
const configJsonFormat = yalm.safeLoad(fs.readFileSync('./_config.yaml', 'utf8'));
const handler = function(webServer, addr, pkgName, pkgVersion) {
webServer.listen(addr.port || addr.path, addr.host, () => {
console.log(`${pkgName}:${pkgVersion} running ${addr.proto}://${addr.host}:${addr.port}`);
});
};
startServer(configJsonFormat, 8080, '', '1.0.0', 'verdaccio', handler);

View File

@@ -38,7 +38,7 @@ export default {
scope: '',
logo: 'https://verdaccio.org/img/logo/symbol/svg/verdaccio-tiny.svg',
filename: 'index.html',
verdaccioURL: '//localhost:4873',
verdaccioURL: '//localhost:8080',
template: `${env.SRC_ROOT}/webui/template/index.html`,
debug: true,
inject: true,