upgrade to now build from web-utils
This commit is contained in:
parent
6340cc5454
commit
d61e4fa719
@ -14,157 +14,13 @@
|
||||
You should have received a copy of the GNU Affero General Public License along with
|
||||
GNU Anastasis; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
/* eslint-disable no-undef */
|
||||
import esbuild from 'esbuild'
|
||||
import fs from 'fs';
|
||||
import path from "path"
|
||||
import sass from "sass";
|
||||
import { build } from "@gnu-taler/web-util/build";
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
const BASE = process.cwd();
|
||||
|
||||
const preact = path.join(
|
||||
BASE,
|
||||
"node_modules",
|
||||
"preact",
|
||||
"compat",
|
||||
"dist",
|
||||
"compat.module.js",
|
||||
);
|
||||
|
||||
const preactCompatPlugin = {
|
||||
name: "preact-compat",
|
||||
setup(build) {
|
||||
build.onResolve({ filter: /^(react-dom|react)$/ }, (args) => {
|
||||
return {
|
||||
path: preact,
|
||||
};
|
||||
});
|
||||
await build({
|
||||
source: {
|
||||
js: ["src/index.ts"],
|
||||
assets: ["src/index.html"],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
let GIT_ROOT = BASE
|
||||
while (!fs.existsSync(path.join(GIT_ROOT, '.git')) && GIT_ROOT !== '/') {
|
||||
GIT_ROOT = path.join(GIT_ROOT, '../')
|
||||
}
|
||||
if (GIT_ROOT === '/') {
|
||||
// eslint-disable-next-line no-undef
|
||||
console.log("not found")
|
||||
// eslint-disable-next-line no-undef
|
||||
process.exit(1);
|
||||
}
|
||||
const GIT_HASH = GIT_ROOT === '/' ? undefined : git_hash()
|
||||
|
||||
|
||||
let _package = JSON.parse(fs.readFileSync(path.join(BASE, 'package.json')));
|
||||
|
||||
function git_hash() {
|
||||
const rev = fs.readFileSync(path.join(GIT_ROOT, '.git', 'HEAD')).toString().trim().split(/.*[: ]/).slice(-1)[0];
|
||||
if (rev.indexOf('/') === -1) {
|
||||
return rev;
|
||||
} else {
|
||||
return fs.readFileSync(path.join(GIT_ROOT, '.git', rev)).toString().trim();
|
||||
}
|
||||
}
|
||||
|
||||
const DEFAULT_SASS_FILTER = /\.(s[ac]ss|css)$/
|
||||
|
||||
const buildSassPlugin = {
|
||||
name: "custom-build-sass",
|
||||
setup(build) {
|
||||
|
||||
build.onLoad({ filter: DEFAULT_SASS_FILTER }, ({ path: file }) => {
|
||||
const resolveDir = path.dirname(file)
|
||||
const { css: contents } = sass.compile(file, { loadPaths: ["./"] })
|
||||
|
||||
return {
|
||||
resolveDir,
|
||||
loader: 'css',
|
||||
contents
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
function copyFilesPlugin(options) {
|
||||
if (!options.basedir) {
|
||||
options.basedir = process.cwd()
|
||||
}
|
||||
return {
|
||||
name: "copy-files",
|
||||
setup(build) {
|
||||
build.onEnd(() => {
|
||||
for (const fop of options) {
|
||||
fs.copyFileSync(path.join(options.basedir, fop.src), path.join(options.basedir, fop.dest));
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function getFilesInDirectory(startPath, regex) {
|
||||
if (!fs.existsSync(startPath)) {
|
||||
return;
|
||||
}
|
||||
const files = fs.readdirSync(startPath);
|
||||
const result = files.flatMap(file => {
|
||||
const filename = path.join(startPath, file);
|
||||
|
||||
const stat = fs.lstatSync(filename);
|
||||
if (stat.isDirectory()) {
|
||||
return getFilesInDirectory(filename, regex);
|
||||
}
|
||||
else if (regex.test(filename)) {
|
||||
return filename
|
||||
}
|
||||
}).filter(x => !!x)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
const allTestFiles = getFilesInDirectory(path.join(BASE, 'src'), /test.tsx?$/)
|
||||
const entryPoints = ["src/index.ts", "src/stories.tsx", ...allTestFiles];
|
||||
|
||||
export const buildConfig = {
|
||||
entryPoints: [...entryPoints],
|
||||
bundle: true,
|
||||
outdir: 'dist',
|
||||
minify: false,
|
||||
loader: {
|
||||
'.svg': 'dataurl',
|
||||
'.ttf': 'file',
|
||||
'.woff': 'file',
|
||||
'.woff2': 'file',
|
||||
'.eot': 'file',
|
||||
},
|
||||
target: [
|
||||
'es6'
|
||||
],
|
||||
format: 'esm',
|
||||
platform: 'browser',
|
||||
sourcemap: true,
|
||||
jsxFactory: 'h',
|
||||
jsxFragment: 'Fragment',
|
||||
define: {
|
||||
'__VERSION__': `"${_package.version}"`,
|
||||
'__GIT_HASH__': `"${GIT_HASH}"`,
|
||||
},
|
||||
plugins: [
|
||||
preactCompatPlugin,
|
||||
copyFilesPlugin([
|
||||
{
|
||||
src: "./src/index.html",
|
||||
dest: "./dist/index.html",
|
||||
},
|
||||
]),
|
||||
buildSassPlugin
|
||||
],
|
||||
}
|
||||
|
||||
await esbuild.build(buildConfig)
|
||||
|
||||
|
||||
|
||||
|
||||
destination: "./dist/prod",
|
||||
css: "sass",
|
||||
});
|
||||
|
@ -15,17 +15,26 @@
|
||||
GNU Anastasis; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
import { serve } from "@gnu-taler/web-util/lib/index.node";
|
||||
import esbuild from 'esbuild';
|
||||
import { buildConfig } from "./build.mjs";
|
||||
import { serve } from "@gnu-taler/web-util/node";
|
||||
import { initializeDev, getFilesInDirectory } from "@gnu-taler/web-util/build";
|
||||
|
||||
buildConfig.inject = ['./node_modules/@gnu-taler/web-util/lib/live-reload.mjs']
|
||||
const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/);
|
||||
const devEntryPoints = ["src/stories.tsx", "src/index.ts", ...allTestFiles];
|
||||
|
||||
const build = initializeDev({
|
||||
source: {
|
||||
js: devEntryPoints,
|
||||
assets: ["src/index.html"],
|
||||
},
|
||||
css: "sass",
|
||||
destination: "./dist/dev",
|
||||
});
|
||||
|
||||
await build();
|
||||
|
||||
serve({
|
||||
folder: './dist',
|
||||
folder: "./dist/dev",
|
||||
port: 8080,
|
||||
source: './src',
|
||||
development: true,
|
||||
onUpdate: async () => esbuild.build(buildConfig)
|
||||
})
|
||||
|
||||
source: "./src",
|
||||
onSourceUpdate: build,
|
||||
});
|
||||
|
@ -17,12 +17,10 @@
|
||||
"@gnu-taler/anastasis-core": "workspace:*",
|
||||
"@gnu-taler/taler-util": "workspace:*",
|
||||
"@gnu-taler/web-util": "workspace:*",
|
||||
"@types/chai": "^4.3.0",
|
||||
"chai": "^4.3.6",
|
||||
"date-fns": "2.29.2",
|
||||
"jssha": "^3.3.0",
|
||||
"jed": "1.1.1",
|
||||
"preact": "10.11.3",
|
||||
"preact-render-to-string": "^5.1.19",
|
||||
"preact-router": "^3.2.1",
|
||||
"qrcode-generator": "^1.4.4"
|
||||
},
|
||||
@ -40,10 +38,11 @@
|
||||
"devDependencies": {
|
||||
"@creativebulma/bulma-tooltip": "^1.2.0",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/chai": "^4.3.0",
|
||||
"chai": "^4.3.6",
|
||||
"bulma": "^0.9.3",
|
||||
"bulma-checkbox": "^1.1.1",
|
||||
"bulma-radio": "^1.1.1",
|
||||
"jssha": "^3.2.0",
|
||||
"mocha": "^9.2.0",
|
||||
"sass": "1.56.1",
|
||||
"typescript": "^4.9.4"
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||
import Match from "preact-router/match";
|
||||
import { Match } from "preact-router/match.js";
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
import { NavigationBar } from "./NavigationBar.js";
|
||||
import { Sidebar } from "./SideBar.js";
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { h, FunctionalComponent } from "preact";
|
||||
import { useState } from "preact/hooks";
|
||||
import { DurationPicker as TestedComponent } from "./DurationPicker.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
component: TestedComponent,
|
||||
|
@ -19,7 +19,8 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
import { setupI18n } from "@gnu-taler/taler-util";
|
||||
import { parseGroupImport, tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import { parseGroupImport } from "@gnu-taler/web-util/browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import * as pages from "./pages/home/index.stories.js";
|
||||
import { ComponentChildren, VNode, h as create } from "preact";
|
||||
import { AnastasisProvider } from "./context/anastasis.js";
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { AuthenticationProviderStatusOk } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { WithoutProviderType, WithProviderType } from "./views.jsx";
|
||||
|
||||
export default {
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
import { expect } from "chai";
|
||||
import useComponentState from "./state.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
describe("AddingProviderScreen states", () => {
|
||||
it("should not load more if has reach the end", async () => {
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { AttributeEntryScreen as TestedComponent } from "./AttributeEntryScreen.js";
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { AuthenticationEditorScreen as TestedComponent } from "./AuthenticationEditorScreen.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { BackupFinishedScreen as TestedComponent } from "./BackupFinishedScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Backup finish",
|
||||
|
@ -26,7 +26,7 @@ import {
|
||||
} from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { ChallengeOverviewScreen as TestedComponent } from "./ChallengeOverviewScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Challenge overview",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { ChallengePayingScreen as TestedComponent } from "./ChallengePayingScreen.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { ContinentSelectionScreen as TestedComponent } from "./ContinentSelectionScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Continent selection",
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { EditPoliciesScreen as TestedComponent } from "./EditPoliciesScreen.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { PoliciesPayingScreen as TestedComponent } from "./PoliciesPayingScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Policies paying",
|
||||
|
@ -23,7 +23,7 @@ import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { encodeCrock, stringToBytes } from "@gnu-taler/taler-util";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { RecoveryFinishedScreen as TestedComponent } from "./RecoveryFinishedScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Recovery Finished",
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { ReviewPoliciesScreen as TestedComponent } from "./ReviewPoliciesScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Reviewing Policies",
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { SecretEditorScreen as TestedComponent } from "./SecretEditorScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Secret editor",
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import {
|
||||
SecretSelectionScreen,
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { SolveScreen as TestedComponent } from "./SolveScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Solve Screen",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { StartScreen as TestedComponent } from "./StartScreen.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../utils/index.js";
|
||||
import { TruthsPayingScreen as TestedComponent } from "./TruthsPayingScreen.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Truths Paying",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -25,7 +25,7 @@ import {
|
||||
} from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Auth method: Email solve",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { KnownAuthMethods, authMethods as TestedComponent } from "./index.js";
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Auth method: Post solve",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -25,7 +25,7 @@ import {
|
||||
} from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Auth method: Question solve",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
|
||||
export default {
|
||||
title: "Auth method: SMS solve",
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @author Sebastian Javier Marchano (sebasjm)
|
||||
*/
|
||||
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index.js";
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import * as tests from "@gnu-taler/web-util/testing";
|
||||
import { reducerStatesExample } from "../../../utils/index.js";
|
||||
import { KnownAuthMethods, authMethods as TestedComponent } from "./index.js";
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
You should have received a copy of the GNU Affero General Public License along with
|
||||
GNU Anastasis; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
//@ts-ignore
|
||||
import jssha from "jssha";
|
||||
|
||||
const SEARCH_RANGE = 16;
|
||||
|
@ -22,7 +22,7 @@ import { strings } from "./i18n/strings.js";
|
||||
|
||||
import * as pages from "./pages/home/index.stories.js";
|
||||
|
||||
import { renderStories } from "@gnu-taler/web-util/lib/index.browser";
|
||||
import { renderStories } from "@gnu-taler/web-util/browser";
|
||||
|
||||
import "./scss/main.scss";
|
||||
|
||||
|
@ -1,46 +1,38 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Basic Options */
|
||||
"target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
|
||||
"module": "ESNext" /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"target": "ES5",
|
||||
"module": "ES6",
|
||||
"lib": [
|
||||
"es2021",
|
||||
"dom"
|
||||
], /* Specify library files to be included in the compilation: */
|
||||
// "allowJs": true /* Allow javascript files to be compiled. */,
|
||||
"DOM",
|
||||
"ES2017"
|
||||
],
|
||||
"allowJs": true /* Allow javascript files to be compiled. */,
|
||||
// "checkJs": true, /* Report errors in .js files. */
|
||||
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
||||
"jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */,
|
||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
// "outDir": "./", /* Redirect output structure to the directory. */
|
||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
// "removeComments": true, /* Do not emit comments to output. */
|
||||
"jsxFactory": "h",
|
||||
"jsxFragmentFactory": "Fragment",
|
||||
"noEmit": true /* Do not emit outputs. */,
|
||||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||
/* Strict Type-Checking Options */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
/* Additional Checks */
|
||||
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
||||
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
/* Module Resolution Options */
|
||||
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
||||
"moduleResolution": "Node16" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
||||
"esModuleInterop": true /* */,
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||
// "types": [], /* Type declaration files to be included in compilation. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||
/* Source Map Options */
|
||||
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
||||
@ -53,16 +45,7 @@
|
||||
/* Advanced Options */
|
||||
"skipLibCheck": true /* Skip type checking of declaration files. */
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../taler-util/"
|
||||
},
|
||||
{
|
||||
"path": "../anastasis-core/"
|
||||
}
|
||||
],
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"tests/**/*"
|
||||
"src/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user