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