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
|
## installation
|
||||||
|
|
||||||
1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install).
|
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:
|
2. install notion-enhancer globally via yarn or npm:
|
||||||
`npm i -g notion-enhancer` or `yarn global add notion-enhancer`
|
`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),
|
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.option('-y, --yes', ': skip prompts (may overwrite data)');
|
||||||
|
|
||||||
cli
|
cli
|
||||||
.command('apply', ': add enhancements to the notion app')
|
.command('apply', ': add the enhancer to the notion app')
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
console.info('=== NOTION ENHANCEMENT LOG ===');
|
console.info('=== NOTION ENHANCEMENT LOG ===');
|
||||||
await require('./pkg/apply.js')();
|
await require('./pkg/apply.js')();
|
||||||
|
@ -212,6 +212,7 @@ s {
|
|||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 0.5em;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
background: var(--theme_local--card);
|
background: var(--theme_local--card);
|
||||||
|
color: var(--theme_local--overlay);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
transition: background 200ms;
|
transition: background 200ms;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
12
pkg/apply.js
12
pkg/apply.js
@ -9,8 +9,7 @@
|
|||||||
const fs = require('fs-extra'),
|
const fs = require('fs-extra'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
{ readdirIterator } = require('readdir-enhanced'),
|
{ readdirIterator } = require('readdir-enhanced'),
|
||||||
{ promisify } = require('util'),
|
{ extractAll } = require('asar'),
|
||||||
{ exec } = require('child_process'),
|
|
||||||
helpers = require('./helpers.js'),
|
helpers = require('./helpers.js'),
|
||||||
{ version } = require('../package.json');
|
{ version } = require('../package.json');
|
||||||
|
|
||||||
@ -57,13 +56,8 @@ module.exports = async function ({ overwrite_version } = {}) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.info(' ...unpacking app.asar');
|
console.info(' ...unpacking app.asar');
|
||||||
const asar_app = path.resolve(`${__notion}/app.asar`),
|
const asar_app = path.resolve(`${__notion}/app.asar`);
|
||||||
asar_exec = path.resolve(`${__dirname}/../node_modules/asar/bin/asar.js`);
|
extractAll(asar_app, `${path.resolve(`${__notion}/app`)}`);
|
||||||
await promisify(exec)(
|
|
||||||
`"${asar_exec}" extract "${asar_app}" "${path.resolve(
|
|
||||||
`${__notion}/app`
|
|
||||||
)}"`
|
|
||||||
);
|
|
||||||
fs.move(asar_app, path.resolve(`${__notion}/app.asar.bak`));
|
fs.move(asar_app, path.resolve(`${__notion}/app.asar.bak`));
|
||||||
|
|
||||||
// patching launch script target of custom wrappers
|
// patching launch script target of custom wrappers
|
||||||
|
Loading…
Reference in New Issue
Block a user