Skip to content

Commit

Permalink
fix: resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykKuniczak committed Dec 16, 2024
1 parent 8f06376 commit a8d94cd
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 182 deletions.
82 changes: 0 additions & 82 deletions chrome-extension/manifest.js

This file was deleted.

18 changes: 13 additions & 5 deletions chrome-extension/utils/plugins/make-manifest-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync, mkdirSync, writeFileSync, copyFileSync } from 'node:fs';
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
import { env, platform } from 'node:process';
Expand All @@ -7,7 +7,17 @@ import { colorLog, ManifestParser } from '@extension/dev-utils';
import type { PluginOption } from 'vite';

const manifestFile = resolve(import.meta.dirname, '..', '..', 'manifest.js');
const refreshFile = resolve(import.meta.dirname, '..', 'refresh.js');
const refreshFile = resolve(
import.meta.dirname,
'..',
'..',
'..',
'packages',
'hmr',
'lib',
'injections',
'refresh.js',
);

const getManifestWithCacheBurst = async () => {
const withCacheBurst = (path: string) => `${path}?${Date.now().toString()}`;
Expand All @@ -31,14 +41,12 @@ export default (config: { outDir: string }): PluginOption => {

const manifestPath = resolve(to, 'manifest.json');
const isFirefox = env.__FIREFOX__ === 'true';
const isDev = process.env.__DEV__ === 'true';
const isDev = env.__DEV__ === 'true';

writeFileSync(manifestPath, ManifestParser.convertManifestToString(manifest, isFirefox));

isDev && addRefreshContentScript(manifest);

writeFileSync(manifestPath, ManifestParser.convertManifestToString(manifest, isFirefox ? 'firefox' : 'chrome'));

isDev && copyFileSync(refreshFile, resolve(to, 'refresh.js'));

colorLog(`Manifest file copy complete: ${manifestPath}`, 'success');
Expand Down
72 changes: 0 additions & 72 deletions chrome-extension/utils/refresh.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/storage/lib/impl/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './exampleThemeStorage';
export * from './exampleThemeStorage.js';
2 changes: 1 addition & 1 deletion packages/storage/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type { BaseStorage } from './base/types.js';
export * from './impl';
export * from './impl/index.js';
42 changes: 21 additions & 21 deletions pnpm-lock.yaml

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

0 comments on commit a8d94cd

Please sign in to comment.