-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
179 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Build (Tauri) | ||
|
||
on: | ||
push: | ||
branches: [ "tauri" ] | ||
pull_request: | ||
branches: [ "tauri" ] | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ] | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: '3.7' | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm i | ||
- run: npm run build | ||
- run: npm run test | ||
- run: npm run tauri build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ runner.OS }} | ||
path: dist/ergo-wallet-*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
// Add you postcss configuration here | ||
// Learn more about it at https://github.com/webpack-contrib/postcss-loader#config-files | ||
plugins: [ | ||
['tailwindcss'], | ||
['autoprefixer'], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import "tailwindcss/base"; | ||
@import "tailwindcss/components"; | ||
@import "tailwindcss/utilities"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: ['./src/**/*.{js,jsx,ts,tsx}'], | ||
important: '#app', | ||
theme: { | ||
extend: {}, | ||
}, | ||
corePlugins: { | ||
// Remove the Tailwind CSS preflight styles so it can use Material UI's preflight instead (CssBaseline). | ||
preflight: false, | ||
}, | ||
plugins: [], | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,93 @@ | ||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
module.exports = [ | ||
// { | ||
// mode: 'development', | ||
// entry: path.join(__dirname, 'src/main/electron.ts'), | ||
// target: 'electron-main', | ||
// module: { | ||
// rules: [{ | ||
// test: /\.(ts|tsx)$/, | ||
// exclude: /node_modules/, | ||
// loader: 'ts-loader', | ||
// }] | ||
// }, | ||
// output: { | ||
// path: __dirname + '/app', | ||
// filename: 'index.js' | ||
// }, | ||
// resolve: { | ||
// extensions: ['.js', '.ts'] | ||
// } | ||
// }, | ||
{ | ||
mode: 'development', | ||
entry: './src/renderer/index.tsx', | ||
target: 'web', | ||
devtool: 'source-map', | ||
devServer: { | ||
static: { | ||
directory: path.join(__dirname, 'app'), | ||
}, | ||
compress: true, | ||
host: 'localhost', | ||
port: 9000, | ||
// { | ||
// mode: 'development', | ||
// entry: path.join(__dirname, 'src/main/electron.ts'), | ||
// target: 'electron-main', | ||
// module: { | ||
// rules: [{ | ||
// test: /\.(ts|tsx)$/, | ||
// exclude: /node_modules/, | ||
// loader: 'ts-loader', | ||
// }] | ||
// }, | ||
// output: { | ||
// path: __dirname + '/app', | ||
// filename: 'index.js' | ||
// }, | ||
// resolve: { | ||
// extensions: ['.js', '.ts'] | ||
// } | ||
// }, | ||
const config = { | ||
entry: './src/renderer/index.tsx', | ||
target: 'web', | ||
devtool: 'source-map', | ||
devServer: { | ||
static: { | ||
directory: path.join(__dirname, 'app'), | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts(x?)$/, | ||
include: /src/, | ||
use: [{loader: 'ts-loader'}] | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ['style-loader', 'css-loader'], | ||
include: [/typeface-roboto/, /typeface-roboto-mono/], | ||
}, | ||
{ | ||
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]', | ||
outputPath: 'fonts/' | ||
} | ||
compress: true, | ||
host: 'localhost', | ||
port: 9000, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts(x?)$/, | ||
include: /src/, | ||
use: [{ loader: 'ts-loader' }] | ||
}, | ||
{ | ||
test: /\.css$/i, | ||
use: ['style-loader', 'css-loader', 'postcss-loader'], | ||
include: [/typeface-roboto/, /typeface-roboto-mono/, path.resolve(__dirname, 'src')], | ||
}, | ||
{ | ||
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]', | ||
outputPath: 'fonts/' | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
output: { | ||
path: __dirname + '/app', | ||
filename: 'renderer.js' | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: './src/renderer/index.html' | ||
}), | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ from: path.join(__dirname, 'resources/icons/16x16.png'), to: './icons/' } | ||
], | ||
options: { | ||
// copyUnmodified: true | ||
} | ||
}), | ||
], | ||
resolve: { | ||
extensions: ['.js', '.tsx', '.ts'] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
output: { | ||
path: __dirname + '/app', | ||
filename: 'renderer.js' | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: './src/renderer/index.html' | ||
}), | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ from: path.join(__dirname, 'resources/icons/16x16.png'), to: './icons/' } | ||
], | ||
options: { | ||
// copyUnmodified: true | ||
} | ||
}), | ||
], | ||
resolve: { | ||
extensions: ['.js', '.tsx', '.ts'] | ||
} | ||
} | ||
|
||
|
||
module.exports = () => { | ||
if (isProduction) { | ||
config.mode = 'production'; | ||
} else { | ||
config.mode = 'development'; | ||
} | ||
]; | ||
return config; | ||
}; |