mirror of
https://github.com/tlsnotary/explorer.git
synced 2026-01-08 04:23:52 -05:00
refactor: directory structure for server and web
This commit is contained in:
@@ -3,6 +3,6 @@ node_modules
|
|||||||
wasm
|
wasm
|
||||||
tlsn
|
tlsn
|
||||||
postcss.config.js
|
postcss.config.js
|
||||||
webpack.config.js
|
webpack.web.config.js
|
||||||
*.json
|
*.json
|
||||||
*.scss
|
*.scss
|
||||||
@@ -4,12 +4,12 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:ui": "NODE_ENV=production webpack --config webpack.config.js",
|
"build:ui": "NODE_ENV=production webpack --config webpack.web.config.js",
|
||||||
"build:server": "NODE_ENV=production webpack --config webpack.server.config.js",
|
"build:server": "NODE_ENV=production webpack --config webpack.server.config.js",
|
||||||
"watch:server": "webpack --config webpack.server.config.js --watch",
|
"watch:server": "webpack --config webpack.server.config.js --watch",
|
||||||
"nodemon:server": "nodemon build/server/index.js",
|
"nodemon:server": "nodemon build/server/index.bundle.js",
|
||||||
"dev:server": "NODE_ENV=development concurrently npm:watch:server npm:nodemon:server",
|
"dev:server": "NODE_ENV=development concurrently npm:watch:server npm:nodemon:server",
|
||||||
"dev:ui": "NODE_ENV=development webpack-dev-server --config webpack.config.js --hot"
|
"dev:ui": "NODE_ENV=development webpack-dev-server --config webpack.web.config.js --hot"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
|
||||||
console.log('hi')
|
console.log('hi');
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ['./src/**/*.{js,jsx,ts,tsx}'],
|
content: ['./web/**/*.{js,jsx,ts,tsx}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
"noEmit": false,
|
"noEmit": false,
|
||||||
"jsx": "react"
|
"jsx": "react"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": [
|
||||||
|
"web"
|
||||||
|
],
|
||||||
"exclude": ["build", "node_modules"]
|
"exclude": ["build", "node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ var options = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
isDevelopment && new ReactRefreshWebpackPlugin(),
|
|
||||||
new CleanWebpackPlugin({ verbose: false }),
|
new CleanWebpackPlugin({ verbose: false }),
|
||||||
new webpack.ProgressPlugin(),
|
new webpack.ProgressPlugin(),
|
||||||
new webpack.EnvironmentPlugin(["NODE_ENV"]),
|
new webpack.EnvironmentPlugin(["NODE_ENV"]),
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ var options = {
|
|||||||
/ResizeObserver loop completed with undelivered notifications/
|
/ResizeObserver loop completed with undelivered notifications/
|
||||||
],
|
],
|
||||||
entry: {
|
entry: {
|
||||||
index: path.join(__dirname, "src", "index.tsx"),
|
index: path.join(__dirname, "web", "index.tsx"),
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: "[name].bundle.js",
|
filename: "[name].bundle.js",
|
||||||
path: path.resolve(__dirname, "build"),
|
path: path.resolve(__dirname, "build", "ui"),
|
||||||
clean: true,
|
clean: true,
|
||||||
publicPath: ASSET_PATH,
|
publicPath: ASSET_PATH,
|
||||||
},
|
},
|
||||||
@@ -46,7 +46,7 @@ var options = {
|
|||||||
{
|
{
|
||||||
// look for .css or .scss files
|
// look for .css or .scss files
|
||||||
test: /\.(css|scss)$/,
|
test: /\.(css|scss)$/,
|
||||||
// in the `src` directory
|
// in the `web` directory
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "style-loader",
|
loader: "style-loader",
|
||||||
@@ -132,7 +132,7 @@ var options = {
|
|||||||
patterns: [
|
patterns: [
|
||||||
{
|
{
|
||||||
from: "node_modules/tlsn-js/build",
|
from: "node_modules/tlsn-js/build",
|
||||||
to: path.join(__dirname, "build"),
|
to: path.join(__dirname, "build", "ui"),
|
||||||
force: true,
|
force: true,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user