refactor: remove js2asar.py and port logic to JS in more readable / GN-style way (#16718)

* refactor: remove js2asar.py and port logic to JS in more readable / GN-style way

* refactor: further clean up ASAR impl, add new node_action GN template
This commit is contained in:
Samuel Attard 2019-02-05 12:10:15 -08:00 committed by GitHub
parent 8582325e85
commit b202ad1e24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 168 additions and 73 deletions

View file

@ -4,7 +4,7 @@
<title>Electron</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self'" />
<link href="./styles.css" type="text/css" rel="stylesheet" />
<link href="./node_modules/octicons/build/build.css" type="text/css" rel="stylesheet" />
<link href="./octicon/build.css" type="text/css" rel="stylesheet" />
</head>
<body>

View file

@ -35,7 +35,7 @@ function initialize () {
document.querySelector('.command-example').innerText = `${electronPath} path-to-app`
function getOcticonSvg (name) {
const octiconPath = path.resolve(__dirname, 'node_modules', 'octicons', 'build', 'svg', `${name}.svg`)
const octiconPath = path.resolve(__dirname, 'octicon', `${name}.svg`)
if (fs.existsSync(octiconPath)) {
const content = fs.readFileSync(octiconPath, 'utf8')
const div = document.createElement('div')