Skip to content

Commit

Permalink
Hardcode license and remove raw-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyyakym committed Oct 8, 2018
1 parent 0f89ed6 commit 268c6df
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 28 deletions.
18 changes: 6 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"babel-loader": "^8.0.0",
"better-npm-run": "^0.1.1",
"jest": "23.5.0",
"raw-loader": "^0.5.1",
"webpack": "^4.17.1",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.0"
Expand Down
9 changes: 0 additions & 9 deletions src/license/license.key.pub

This file was deleted.

10 changes: 9 additions & 1 deletion src/license/verify.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
const crypto = require('crypto');
const jwt = require('jsonwebtoken');

const LICENSE_PUBLIC_KEY = require('./license.key.pub');
const LICENSE_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArTes262OG4eY8RDAEKFo
w25lLGmDybuT8GAuOjnXnaGfWrevUcsBEBVs3SzUkcUHPP9pMq9Cus5w9+b8wfau
Q+pFwdZe4TIgi4A/1X9KjMeuvXB/BxNkLQBxnmwiSoPADL+Y+/6Ginlj57KU4BGc
p4MSISlDPMvz4GR99AdC/R1swlA4QR2O8/Y2nelKhPjXuUbmegR3OzAa6+T1WOLA
VwJuhx91/2eROvIPG8t+LLky1XRQa+sdcEywR1nKa2L5to32UIRSg+Houq3ObF9c
WaYPv3VXZinO2jXtnUafKDWqFmqzCjLiY8cshqpKlEvrVQdGF6/R/BwXfAFcx6lx
qwIDAQAB
-----END PUBLIC KEY-----`;

const sha256 = (string) => crypto.createHash('sha256').update(string).digest('hex');

Expand Down
5 changes: 0 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ const getWebpackConfig = (override) => override({
]
}
}
},
{
test: /\.pub$/,
exclude: /node_modules/,
use: 'raw-loader'
}
]
},
Expand Down

0 comments on commit 268c6df

Please sign in to comment.