8000 wip · githubocto/flat-vscode@396b157 · GitHub
[go: up one dir, main page]

Skip to content
8000
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Commit 396b157

Browse files
author
Matt Rothenberg
committed
wip
1 parent 76e8531 commit 396b157

File tree

5 files changed

+709
-31
lines changed

5 files changed

+709
-31
lines changed

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.vscode/**
22
.vscode-test/**
3-
out/test/**
3+
out
44
src/**
55
.gitignore
66
.yarnrc

package.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "flat",
33
"displayName": "flat",
44
"publisher": "GitHubOCTO",
5+
"repository": {
6+
"url": "https://github.com/githubocto/flat-vscode"
7+
},
58
"description": "",
69
"version": "0.0.1",
710
"engines": {
@@ -13,7 +16,14 @@
1316
"activationEvents": [
1417
"*"
1518
],
16-
"main": "./out/extension.js",
19+
"main": "./dist/extension.js",
20+
"webview": "./src/webview/index.js",
21+
"targets": {
22+
"main": false,
23+
"webview": {
24+
"distDir": "media"
25+
}
26+
},
1727
"contributes": {
1828
"viewsContainers": {
1929
"activitybar": [
@@ -52,12 +62,15 @@
5262
},
5363
"scripts": {
5464
"vscode:prepublish": "yarn run compile",
55-
"compile": "tsc -p ./",
65+
"webpack:build": "webpack",
66+
"ts:compile": "tsc -p ./",
67+
"compile": "run-s ts:compile webpack:build webview:build",
5668
"watch": "tsc -watch -p ./",
5769
"pretest": "yarn run compile && yarn run lint",
5870
"lint": "eslint src --ext ts",
5971
"test": "node ./out/test/runTest.js",
60-
"dev": "parcel src/webview/index.js --dist-dir ./media"
72+
"dev": "parcel src/webview/index.js --dist-dir ./media",
73+
"webview:build": "parcel build src/webview/index.js"
6174
},
6275
"devDependencies": {
6376
"@parcel/optimizer-cssnano": "2.0.0-nightly.610",
@@ -76,11 +89,15 @@
7689
"eslint": "^7.19.0",
7790
"glob": "^7.1.6",
7891
"mocha": "^8.2.1",
92+
"npm-run-all": "^4.1.5",
7993
"parcel": "^2.0.0-nightly.608",
8094
"postcss-nested": "^5.0.3",
8195
"tailwindcss": "^2.0.3",
8296
"typescript": "^4.1.3",
8397
"vscode-test": "^1.5.0",
98+
"webpack": "^5.24.2",
99+
"webpack-cli": "^4.5.0",
100+
"webpack-filter-warnings-plugin": "^1.2.1",
84101
"yarn": "^1.22.10"
85102
},
86103
"dependencies": {
@@ -100,7 +117,7 @@
100117
"react-query": "^3.12.0",
101118
"react-router-dom": "^5.2.0",
102119
"react-use": "^17.1.1",
103-
"tweetsodium": "^0.0.5",
120+
"tweetsodium": "^0.0.4",
104121
"typeorm": "^0.2.31",
105122
"yup": "^0.32.9",
106123
"zustand": "^3.3.2"

tailwind.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
2-
purge: [],
2+
purge: ["./src/webview/**/*.{js,jsx,ts,tsx}"],
3+
34
darkMode: false, // or 'media' or 'class'
45
theme: {
56
extend: {},

webpack.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const path = require("path");
2+
const { IgnorePlugin } = require("webpack");
3+
const FilterWarningsPlugin = require("webpack-filter-warnings-plugin");
4+
5+
module.exports = {
6+
target: "node",
7+
mode: "production",
8+
entry: "./out/extension.js",
9+
output: {
10+
filename: "main.js",
11+
path: path.resolve(__dirname, "dist"),
12+
},
13+
devtool: "source-map",
14+
externals: {
15+
vscode: "commonjs vscode", // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
16+
},
17+
resolve: {
18+
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
19+
extensions: [".ts", ".js"],
20+
},
21+
plugins: [
22+
new IgnorePlugin({
23+
resourceRegExp: /^pg-native$/,
24+
}),
25+
new FilterWarningsPlugin({
26+
exclude: [
27+
/mongodb/,
28+
/mssql/,
29+
/mysql/,
30+
/mysql2/,
31+
/oracledb/,
32+
/pg/,
33+
/pg-native/,
34+
/pg-query-stream/,
35+
/react-native-sqlite-storage/,
36+
/redis/,
37+
/sqlite3/,
38+
/sql.js/,
39+
/typeorm-aurora-data-api-driver/,
40+
],
41+
}),
42+
],
43+
};

0 commit comments

Comments
 (0)
0