Skip to content

Commit a4bc2fd

Browse files
committed
chore: move certs to top-level
1 parent 4e4d01e commit a4bc2fd

13 files changed

Lines changed: 48 additions & 259 deletions

File tree

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
lib/public/socket.io.js
22
lib/public/socket.io.min.1.6.0.js
33
lib/templates/**/*
4-
lib/server/certs/**
4+
certs/**
55
lib/cli/cli-template.js
66
test/specs/resp-mod/rewrite-links.js
File renamed without changes.

examples/server.secure.pfx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ browserSync.init({
2020
baseDir: "app"
2121
},
2222
https: {
23-
pfx: "lib/server/certs/browsersync.pfx"
23+
pfx: "certs/browsersync.pfx"
2424
}
2525
});
2626

lib/cli/help.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/server/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ var serveStatic = require("serve-static");
1616
var logger = require("../logger");
1717
var snippetUtils = require("../snippet").utils;
1818
var lrSnippet = require("resp-modifier");
19-
var utils = require("../utils");
19+
var certPath = join(__dirname, "..", "..", "certs");
2020

2121
function getCa (options) {
2222
var caOption = options.getIn(["https", "ca"]);
2323
// if not provided, use Browsersync self-signed
2424
if (typeof caOption === "undefined") {
25-
return fs.readFileSync(join(__dirname, "certs", "server.csr"));
25+
return fs.readFileSync(join(certPath, "server.csr"));
2626
}
2727
// if a string was given, read that file from disk
2828
if (typeof caOption === "string") {
@@ -37,11 +37,11 @@ function getCa (options) {
3737
}
3838

3939
function getKey(options) {
40-
return fs.readFileSync(options.getIn(["https", "key"]) || join(__dirname, "certs", "server.key"));
40+
return fs.readFileSync(options.getIn(["https", "key"]) || join(certPath, "server.key"));
4141
}
4242

4343
function getCert(options) {
44-
return fs.readFileSync(options.getIn(["https", "cert"]) || join(__dirname, "certs", "server.crt"));
44+
return fs.readFileSync(options.getIn(["https", "cert"]) || join(certPath, "server.crt"));
4545
}
4646

4747
function getHttpsServerDefaults (options) {

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lib",
1616
"lodash.custom.js",
1717
"client/index",
18-
"client/dist"
18+
"client/dist",
19+
"certs"
1920
],
2021
"engines": {
2122
"node": ">= 0.8.0"
@@ -87,6 +88,7 @@
8788
"rimraf": "2.5.4",
8889
"sinon": "1.17.5",
8990
"supertest": "2.0.0",
91+
"typescript": "^2.6.2",
9092
"vinyl": "1.2.0"
9193
},
9294
"keywords": [

0 commit comments

Comments
 (0)