forked from polkadot-js/apps
-
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.
add polkadex-parachain and get polkadot-js new version
- Loading branch information
jiajing.chen
committed
Dec 4, 2023
1 parent
3add0de
commit 5b5f022
Showing
4,000 changed files
with
236,583 additions
and
49,098 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
FROM ubuntu:latest as builder | ||
|
||
# Install any needed packages | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y build-essential curl git gnupg ca-certificates | ||
|
||
# install nodejs | ||
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - | ||
RUN apt-get install --no-install-recommends -y nodejs && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN npm install yarn -g | ||
|
||
WORKDIR /apps | ||
COPY . . | ||
|
||
RUN yarn && NODE_ENV=production yarn build:www | ||
|
||
# =========================================================== | ||
FROM nginx:stable-alpine | ||
|
||
# The following is mainly for doc purpose to show which ENV is supported | ||
ENV WS_URL= | ||
|
||
WORKDIR /usr/share/nginx/html | ||
|
||
COPY docker/env.sh . | ||
|
||
RUN apk add --no-cache bash; chmod +x env.sh | ||
|
||
COPY docker/nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=builder /apps/packages/apps/build /usr/share/nginx/html | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] |
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,33 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2017-2023 @polkadot/apps authors & contributors | ||
# This software may be modified and distributed under the terms | ||
# of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
# fail fast on any non-zero exits | ||
set -e | ||
|
||
# the docker image name and dockerhub repo | ||
NAME="polkadot-js-apps" | ||
REPO="jacogr" | ||
|
||
# extract the current npm version from package.json | ||
VERSION=$(cat package.json \ | ||
| grep version \ | ||
| head -1 \ | ||
| awk -F: '{ print $2 }' \ | ||
| sed 's/[",]//g' \ | ||
| sed 's/ //g') | ||
|
||
echo "*** Building $NAME" | ||
docker build -t $NAME -f docker/Dockerfile . | ||
|
||
docker login -u $REPO -p $DOCKER_PASS | ||
|
||
echo "*** Tagging $REPO/$NAME" | ||
if [[ $VERSION != *"beta"* ]]; then | ||
docker tag $NAME $REPO/$NAME:$VERSION | ||
fi | ||
docker tag $NAME $REPO/$NAME | ||
|
||
echo "*** Publishing $NAME" | ||
docker push $REPO/$NAME |
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 was deleted.
Oops, something went wrong.
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,16 @@ | ||
// Copyright 2017-2023 @polkadot/apps authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import baseConfig from '@polkadot/dev/config/eslint'; | ||
|
||
export default [ | ||
...baseConfig, | ||
{ | ||
rules: { | ||
// add override for any (a metric ton of them, initial conversion) | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// we generally use this in isFunction, not via calling | ||
'@typescript-eslint/unbound-method': 'off' | ||
} | ||
} | ||
]; |
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,66 @@ | ||
// Copyright 2017-2023 @polkadot/apps authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
const typescript = require('typescript'); | ||
|
||
const findPackages = require('./scripts/findPackages.cjs'); | ||
|
||
function transform (file, enc, done) { | ||
const { ext } = path.parse(file.path); | ||
|
||
if (ext === '.tsx') { | ||
const { outputText } = typescript.transpileModule(fs.readFileSync(file.path, enc), { | ||
compilerOptions: { target: 'es2018' }, | ||
fileName: path.basename(file.path) | ||
}); | ||
|
||
this.parser.parseFuncFromString(outputText, (key, options) => { | ||
options.defaultValue = key; | ||
|
||
if (process.platform !== 'win32') { | ||
options.ns = /packages\/(.*?)\/src/g.exec(file.path)[1].replace('page-', 'app-'); | ||
} else { | ||
options.ns = /packages\\(.*?)\\src/g.exec(file.path)[1].replace('page-', 'app-'); | ||
} | ||
|
||
this.parser.set(key, options); | ||
}); | ||
} | ||
|
||
done(); | ||
} | ||
|
||
module.exports = { | ||
input: [ | ||
'packages/*/src/**/*.{ts,tsx}', | ||
// Use ! to filter out files or directories | ||
'!packages/*/src/**/*.spec.{ts,tsx}', | ||
'!packages/*/src/i18n/**', | ||
'!**/node_modules/**' | ||
], | ||
options: { | ||
debug: false, // true to print config | ||
defaultLng: 'en', | ||
func: { | ||
extensions: ['.tsx', '.ts'], | ||
list: ['t', 'i18next.t', 'i18n.t'] | ||
}, | ||
keySeparator: false, // key separator | ||
lngs: ['en'], | ||
ns: findPackages().map(({ dir }) => dir.replace('page-', 'app-')), | ||
nsSeparator: false, // namespace separator | ||
resource: { | ||
jsonIndent: 2, | ||
lineEnding: '\n', | ||
loadPath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json', | ||
savePath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json' | ||
}, | ||
trans: { | ||
component: 'Trans' | ||
} | ||
}, | ||
output: './', | ||
transform | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.