Skip to content

Commit

Permalink
Revert "chore: format"
Browse files Browse the repository at this point in the history
This reverts commit 359fcca.
  • Loading branch information
boehs committed Apr 23, 2024
1 parent a27e247 commit d5c1c6b
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 98 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '🐛 Bug Report'
name: "🐛 Bug Report"
description: Create a bug report for Umami.
body:
- type: textarea
Expand Down Expand Up @@ -29,4 +29,4 @@ body:
- type: input
attributes:
label: How are you deploying your application? (if relevant)
description: 'For example: Vercel, Railway, Docker, etc'
description: 'For example: Vercel, Railway, Docker, etc'
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
strategy:
matrix:
include:
- node-version: 18.x
db-type: postgresql
- node-version: 18.x
db-type: mysql
- node-version: 18.x
db-type: postgresql
- node-version: 18.x
db-type: mysql

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'
env:
DATABASE_TYPE: ${{ matrix.db-type }}
- run: npm install --global yarn
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
env:
DATABASE_TYPE: ${{ matrix.db-type }}
- run: npm install --global yarn
- run: yarn install --frozen-lockfile
- run: yarn build
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"useTabs": true,
"tabWidth": 2,
"arrowParens": "avoid",
"endOfLine": "lf",
"printWidth": 100,
Expand Down
34 changes: 17 additions & 17 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
112 changes: 56 additions & 56 deletions rollup.components.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,72 +14,72 @@ import svgr from '@svgr/rollup';
const md5 = str => crypto.createHash('md5').update(str).digest('hex');

const customResolver = resolve({
extensions: ['.js', '.jsx', '.ts', '.tsx'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
});

const aliasConfig = {
entries: [
{ find: /^app/, replacement: path.resolve('./src/app') },
{ find: /^components/, replacement: path.resolve('./src/components') },
{ find: /^hooks/, replacement: path.resolve('./src/hooks') },
{ find: /^lib/, replacement: path.resolve('./src/lib') },
{ find: /^store/, replacement: path.resolve('./src/store') },
{ find: /^public/, replacement: path.resolve('./public') },
{ find: /^assets/, replacement: path.resolve('./src/assets') },
],
customResolver,
entries: [
{ find: /^app/, replacement: path.resolve('./src/app') },
{ find: /^components/, replacement: path.resolve('./src/components') },
{ find: /^hooks/, replacement: path.resolve('./src/hooks') },
{ find: /^lib/, replacement: path.resolve('./src/lib') },
{ find: /^store/, replacement: path.resolve('./src/store') },
{ find: /^public/, replacement: path.resolve('./public') },
{ find: /^assets/, replacement: path.resolve('./src/assets') },
],
customResolver,
};

const jsBundle = {
input: 'src/index.ts',
output: [
{
file: 'dist/index.js',
format: 'es',
sourcemap: true,
},
],
plugins: [
del({ targets: 'dist/*', runOnce: true }),
copy({ targets: [{ src: './package.components.json', dest: 'dist', rename: 'package.json' }] }),
postcss({
config: false,
extract: 'styles.css',
sourceMap: true,
minimize: true,
modules: {
generateScopedName: function (name, filename, css) {
const file = path.basename(filename, '.css').replace('.module', '');
const hash = Buffer.from(md5(`${name}:${filename}:${css}`))
.toString('base64')
.substring(0, 5);
input: 'src/index.ts',
output: [
{
file: 'dist/index.js',
format: 'es',
sourcemap: true,
},
],
plugins: [
del({ targets: 'dist/*', runOnce: true }),
copy({ targets: [{ src: './package.components.json', dest: 'dist', rename: 'package.json' }] }),
postcss({
config: false,
extract: 'styles.css',
sourceMap: true,
minimize: true,
modules: {
generateScopedName: function (name, filename, css) {
const file = path.basename(filename, '.css').replace('.module', '');
const hash = Buffer.from(md5(`${name}:${filename}:${css}`))
.toString('base64')
.substring(0, 5);

return `${file}-${name}--${hash}`;
},
},
}),
svgr({ icon: true }),
nodeExternals(),
json(),
alias(aliasConfig),
esbuild({
target: 'es6',
jsx: 'automatic',
loaders: {
'.js': 'jsx',
},
}),
],
return `${file}-${name}--${hash}`;
},
},
}),
svgr({ icon: true }),
nodeExternals(),
json(),
alias(aliasConfig),
esbuild({
target: 'es6',
jsx: 'automatic',
loaders: {
'.js': 'jsx',
},
}),
],
};

const dtsBundle = {
input: 'src/index.ts',
output: {
file: 'dist/index.d.ts',
format: 'es',
},
plugins: [alias(aliasConfig), nodeExternals(), json(), dts()],
external: [/\.css/],
input: 'src/index.ts',
output: {
file: 'dist/index.d.ts',
format: 'es',
},
plugins: [alias(aliasConfig), nodeExternals(), json(), dts()],
external: [/\.css/],
};

export default [jsBundle, dtsBundle];
4 changes: 2 additions & 2 deletions rollup.tracker.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export default {
plugins: [
replace({
'/api/send': process.env.COLLECT_API_ENDPOINT || '/api/send',
'delimiters': ['', ''],
'preventAssignment': true,
delimiters: ['', ''],
preventAssignment: true,
}),
terser(),
],
Expand Down
10 changes: 5 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
"pages/*": ["./pages/*"],
"queries/*": ["./queries/*"],
"store/*": ["./store/*"],
"styles/*": ["./styles/*"]
"styles/*": ["./styles/*"],
},
"plugins": [
{
"name": "next"
}
]
"name": "next",
},
],
},
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules"],
}

0 comments on commit d5c1c6b

Please sign in to comment.