forked from umami-software/umami
-
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
8 changed files
with
1,777 additions
and
42 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
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ node_modules | |
/build | ||
/public/script.js | ||
/geo | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
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,2 @@ | ||
export * from 'components/pages/settings/teams/TeamAddForm'; | ||
export * from 'components/pages/settings/teams/TeamAddWebsiteForm'; |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
const flexBugs = require('postcss-flexbugs-fixes'); | ||
const presetEnv = require('postcss-preset-env'); | ||
|
||
module.exports = { | ||
plugins: [ | ||
'postcss-flexbugs-fixes', | ||
[ | ||
'postcss-preset-env', | ||
{ | ||
autoprefixer: { | ||
flexbox: 'no-2009', | ||
}, | ||
stage: 3, | ||
features: { | ||
'custom-properties': false, | ||
}, | ||
flexBugs, | ||
presetEnv({ | ||
autoprefixer: { | ||
flexbox: 'no-2009', | ||
}, | ||
], | ||
stage: 3, | ||
features: { | ||
'custom-properties': false, | ||
}, | ||
}), | ||
], | ||
}; |
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,90 @@ | ||
import path from 'path'; | ||
import crypto from 'crypto'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import alias from '@rollup/plugin-alias'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import del from 'rollup-plugin-delete'; | ||
import esbuild from 'rollup-plugin-esbuild'; | ||
import dts from 'rollup-plugin-dts'; | ||
import svgr from '@svgr/rollup'; | ||
import externals from 'rollup-plugin-node-externals'; | ||
import json from '@rollup/plugin-json'; | ||
|
||
const md5 = str => crypto.createHash('md5').update(str).digest('hex'); | ||
|
||
const aliases = [ | ||
{ find: /^components/, replacement: path.resolve('./components') }, | ||
{ find: /^hooks/, replacement: path.resolve('./hooks') }, | ||
{ find: /^assets/, replacement: path.resolve('./assets') }, | ||
{ find: /^lib/, replacement: path.resolve('./lib') }, | ||
{ find: /^store/, replacement: path.resolve('./store') }, | ||
{ find: /^public/, replacement: path.resolve('./public') }, | ||
]; | ||
|
||
const aliasResolver = resolve({ | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}); | ||
|
||
const jsBundle = { | ||
input: 'components/index.ts', | ||
output: [ | ||
{ | ||
file: 'dist/index.js', | ||
format: 'cjs', | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: 'dist/index.mjs', | ||
format: 'es', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
del({ targets: 'dist/*', runOnce: true }), | ||
postcss({ | ||
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 }), | ||
externals(), | ||
alias({ | ||
entries: aliases, | ||
customResolver: aliasResolver, | ||
}), | ||
json(), | ||
esbuild({ | ||
loaders: { | ||
'.js': 'jsx', | ||
}, | ||
}), | ||
], | ||
}; | ||
|
||
const dtsBundle = { | ||
input: 'components/index.ts', | ||
output: { | ||
file: 'dist/index.d.ts', | ||
format: 'es', | ||
}, | ||
plugins: [ | ||
alias({ | ||
entries: aliases, | ||
customResolver: aliasResolver, | ||
}), | ||
externals(), | ||
dts(), | ||
], | ||
}; | ||
|
||
export default [jsBundle, dtsBundle]; |
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,28 +1,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"outDir": "./build", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"incremental": true, | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"skipLibCheck": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"esModuleInterop": true, | ||
"noImplicitAny": false, | ||
"preserveConstEnums": true, | ||
"removeComments": true, | ||
"sourceMap": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"allowJs": true, | ||
"strict": true, | ||
"outDir": "dist/types", | ||
"target": "esnext", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "react-jsx", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"skipLibCheck": true, | ||
"baseUrl": ".", | ||
"strictNullChecks": false, | ||
"noEmit": true, | ||
"jsx": "preserve" | ||
"paths": { "*": ["./*"] } | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"include": ["next-env.d.ts", "**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.