mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
building on a mac works! so does editorInset!
This commit is contained in:
parent
f2b3a2be30
commit
4dd6553e34
5 changed files with 612 additions and 197 deletions
|
|
@ -9,11 +9,11 @@ const to = 'dist/sidebar/styles.css'
|
|||
const original_css_contents = fs.readFileSync(from, 'utf8')
|
||||
|
||||
postcss([
|
||||
tailwindcss, // this compiles tailwind of all the files specified in tailwind.config.json
|
||||
autoprefixer,
|
||||
tailwindcss, // this compiles tailwind of all the files specified in tailwind.config.json
|
||||
autoprefixer,
|
||||
])
|
||||
.process(original_css_contents, { from, to })
|
||||
.then(processed_css_contents => { fs.writeFileSync(to, processed_css_contents.css) })
|
||||
.catch(error => {
|
||||
console.error('Error in build-css:', error)
|
||||
})
|
||||
.process(original_css_contents, { from, to })
|
||||
.then(processed_css_contents => { fs.writeFileSync(to, processed_css_contents.css) })
|
||||
.catch(error => {
|
||||
console.error('Error in build-css:', error)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ const esbuild = require('esbuild')
|
|||
|
||||
// Build JS
|
||||
esbuild.build({
|
||||
entryPoints: ['src/sidebar/index.tsx'],
|
||||
bundle: true,
|
||||
minify: true,
|
||||
sourcemap: true,
|
||||
outfile: 'dist/sidebar/index.js',
|
||||
format: 'iife', // apparently iife is safe for browsers (safer than cjs)
|
||||
platform: 'browser',
|
||||
external: ['vscode'],
|
||||
entryPoints: ['src/sidebar/index.tsx'],
|
||||
bundle: true,
|
||||
minify: true,
|
||||
sourcemap: true,
|
||||
outfile: 'dist/sidebar/index.js',
|
||||
format: 'iife', // apparently iife is safe for browsers (safer than cjs)
|
||||
platform: 'browser',
|
||||
external: ['vscode'],
|
||||
}).catch(() => process.exit(1));
|
||||
|
|
|
|||
764
extensions/void/package-lock.json
generated
764
extensions/void/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -101,7 +101,8 @@
|
|||
}
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "echo \"running prepublish\"",
|
||||
"vscode:prepublish": "npm run compile",
|
||||
"compile": "tsc -p ./",
|
||||
"watch": "tsc -watch -p ./",
|
||||
"build": "rimraf dist && node build-tsx.js && node build-css.js",
|
||||
"pretest": "tsc -p ./ && eslint src --ext ts",
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
if (!editor) return
|
||||
|
||||
|
||||
const inset = vscode.window.createWebviewTextEditorInset(editor, 10, 200, {})
|
||||
inset.webview.html = `
|
||||
<html>
|
||||
<body>Hello World!</body>
|
||||
</html>
|
||||
`;
|
||||
// const inset = vscode.window.createWebviewTextEditorInset(editor, 10, 200, {})
|
||||
// inset.webview.html = `
|
||||
// <html>
|
||||
// <body>Hello World!</body>
|
||||
// </html>
|
||||
// `;
|
||||
|
||||
|
||||
// show the sidebar
|
||||
|
|
|
|||
Loading…
Reference in a new issue