mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 22:19:02 +00:00
theoretically patch broken windows install
This commit is contained in:
parent
ff41cb78d5
commit
606f6e6325
@ -13,6 +13,7 @@ want to contribute? check the the [contribution guidelines](CONTRIBUTING.md).
|
||||
## installation
|
||||
|
||||
1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install).
|
||||
if on windows, the next steps will need to be done in the newly installed "node.js command prompt".
|
||||
2. install notion-enhancer globally via yarn or npm:
|
||||
`npm i -g notion-enhancer` or `yarn global add notion-enhancer`
|
||||
3. ensure no notion processes are running (you may want to check the task manager to make sure),
|
||||
|
2
bin.js
2
bin.js
@ -22,7 +22,7 @@ const cli = require('cac')(),
|
||||
cli.option('-y, --yes', ': skip prompts (may overwrite data)');
|
||||
|
||||
cli
|
||||
.command('apply', ': add enhancements to the notion app')
|
||||
.command('apply', ': add the enhancer to the notion app')
|
||||
.action(async (options) => {
|
||||
console.info('=== NOTION ENHANCEMENT LOG ===');
|
||||
await require('./pkg/apply.js')();
|
||||
|
@ -212,6 +212,7 @@ s {
|
||||
padding: 0.2em 0.5em;
|
||||
margin-top: 0.5em;
|
||||
background: var(--theme_local--card);
|
||||
color: var(--theme_local--overlay);
|
||||
border-radius: 2px;
|
||||
transition: background 200ms;
|
||||
user-select: none;
|
||||
|
12
pkg/apply.js
12
pkg/apply.js
@ -9,8 +9,7 @@
|
||||
const fs = require('fs-extra'),
|
||||
path = require('path'),
|
||||
{ readdirIterator } = require('readdir-enhanced'),
|
||||
{ promisify } = require('util'),
|
||||
{ exec } = require('child_process'),
|
||||
{ extractAll } = require('asar'),
|
||||
helpers = require('./helpers.js'),
|
||||
{ version } = require('../package.json');
|
||||
|
||||
@ -57,13 +56,8 @@ module.exports = async function ({ overwrite_version } = {}) {
|
||||
});
|
||||
}
|
||||
console.info(' ...unpacking app.asar');
|
||||
const asar_app = path.resolve(`${__notion}/app.asar`),
|
||||
asar_exec = path.resolve(`${__dirname}/../node_modules/asar/bin/asar.js`);
|
||||
await promisify(exec)(
|
||||
`"${asar_exec}" extract "${asar_app}" "${path.resolve(
|
||||
`${__notion}/app`
|
||||
)}"`
|
||||
);
|
||||
const asar_app = path.resolve(`${__notion}/app.asar`);
|
||||
extractAll(asar_app, `${path.resolve(`${__notion}/app`)}`);
|
||||
fs.move(asar_app, path.resolve(`${__notion}/app.asar.bak`));
|
||||
|
||||
// patching launch script target of custom wrappers
|
||||
|
Loading…
Reference in New Issue
Block a user