Skip to content

Commit

Permalink
🎨 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
letmejustputthishere committed Jan 18, 2024
1 parent 7fe136a commit d8caacb
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 67 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,30 @@ on:
# branches: [ "main" ]
pull_request:

concurrency:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Start dfx
run: |
dfx cache install
dfx start --background
- run: npm run setup
- run: npm test
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Start dfx
run: |
dfx cache install
dfx start --background
- run: npm run setup
- run: npm test
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dfinity-foundation.vscode-motoko"]
"recommendations": ["dfinity-foundation.vscode-motoko"]
}
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"workbench.startupEditor": "readme",
"workbench.editorAssociations": {
"README.md": "vscode.markdown.preview.editor"
}
"workbench.startupEditor": "readme",
"workbench.editorAssociations": {
"README.md": "vscode.markdown.preview.editor"
}
}
36 changes: 18 additions & 18 deletions dfx.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"canisters": {
"backend": {
"type": "motoko",
"main": "backend/main.mo"
},
"frontend": {
"dependencies": ["backend"],
"type": "assets",
"source": ["dist/"]
}
},
"defaults": {
"build": {
"packtool": "npm run --silent sources"
}
},
"output_env_file": ".env",
"version": 2
"canisters": {
"backend": {
"type": "motoko",
"main": "backend/main.mo"
},
"frontend": {
"dependencies": ["backend"],
"type": "assets",
"source": ["dist/"]
}
},
"defaults": {
"build": {
"packtool": "npm run --silent sources"
}
},
"output_env_file": ".env",
"version": 2
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "run-s test:backend test:frontend",
"test:frontend": "vitest run",
"test:backend": "mo-test",
"format": "prettier --write \"src/**/*.{json,js,jsx,ts,tsx,css,scss}\" \"backend/**/*.mo\"",
"format": "prettier --write .",
"sources": "mops sources",
"postinstall": "mops install",
"dev": "vite dev",
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/src/global.scss">
<link rel="stylesheet" href="/src/global.scss" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
53 changes: 27 additions & 26 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,34 @@ import { defineConfig } from 'vitest/config';
import environment from 'vite-plugin-environment';

export default defineConfig({
plugins: [sveltekit(),
// this is needed to surface the environment variables to your app
// https://vitejs.dev/guide/env-and-mode
// https://www.npmjs.com/package/vite-plugin-environment
environment('all', { prefix: 'CANISTER_' }),
environment('all', { prefix: 'DFX_' }),
environment({ BACKEND_CANISTER_ID: '' }),
plugins: [
sveltekit(),
// this is needed to surface the environment variables to your app
// https://vitejs.dev/guide/env-and-mode
// https://www.npmjs.com/package/vite-plugin-environment
environment('all', { prefix: 'CANISTER_' }),
environment('all', { prefix: 'DFX_' }),
environment({ BACKEND_CANISTER_ID: '' })
],
optimizeDeps: {
// he global object varies between environments (like window in browsers, global in Node.js), leading to compatibility issues.
// By defining global as globalThis, developers unify access to the global scope, as globalThis is a standard and
// environment-agnostic way to refer to the global object/
esbuildOptions: {
define: {
global: 'globalThis',
},
},
},
server: {
// this is needed to redirect api calls to the local replica locally
proxy: {
'/api': {
target: 'http://127.0.0.1:4943',
changeOrigin: true,
},
},
},
optimizeDeps: {
// he global object varies between environments (like window in browsers, global in Node.js), leading to compatibility issues.
// By defining global as globalThis, developers unify access to the global scope, as globalThis is a standard and
// environment-agnostic way to refer to the global object/
esbuildOptions: {
define: {
global: 'globalThis'
}
}
},
server: {
// this is needed to redirect api calls to the local replica locally
proxy: {
'/api': {
target: 'http://127.0.0.1:4943',
changeOrigin: true
}
}
},
test: {
include: ['tests/**/*.{test,spec}.{js,ts}']
}
Expand Down

0 comments on commit d8caacb

Please sign in to comment.