Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed Nov 11, 2024
2 parents 2f9c28f + ddb7808 commit 7898bbd
Show file tree
Hide file tree
Showing 811 changed files with 29,380 additions and 5,963 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# npm run pre-commit
55 changes: 55 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules
**/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/api
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

documentation.json
/storybook-static
/storybook-static.zip

/.angular

*storybook.log
17 changes: 17 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"proseWrap": "preserve",
"quoteProps": "consistent",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"shanoor.vscode-nginx",
"MariusAlchimavicius.json-to-ts",
"formulahendry.auto-rename-tag",
"lukasz-wronski.ftp-sync"
"lukasz-wronski.ftp-sync",
"dbaeumer.vscode-eslint"
]
}
22 changes: 17 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
"editor.wordWrap": "on",
"editor.wrappingIndent": "indent",
"html.format.enable": true,
"eslint.options": {
"configFile": "./.vscode/.eslintrc.json"
},
"workbench.colorTheme": "One Monokai",
"workbench.iconTheme": "vscode-icons",
"eslint.run": "onSave",
"editor.accessibilitySupport": "off",
"git.ignoreMissingGitWarning": true,
"git.enableSmartCommit": true,
Expand All @@ -26,5 +22,21 @@
"files.eol": "\n",
"gitlens.currentLine.enabled": false,
"prettier.singleAttributePerLine": false,
"prettier.bracketSameLine": true
"prettier.bracketSameLine": true,
"eslint.options": {
"extensions": [".ts", ".html"]
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "html"],
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
}
4 changes: 2 additions & 2 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ Configuration file `config/proxy.config.js`. During local development, it will f
```javascript
const PROXY_CONFIG = [
{
context: ["/api", "/user", "/sites"],
target: "https://yourdomain.com",
context: ['/api', '/user', '/sites'],
target: 'https://yourdomain.com',
secure: false,
changeOrigin: true,
},
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export const environment: IEnvironment = {
```javascript
const PROXY_CONFIG = [
{
context: ["/api", "/user", "/sites"],
target: "https://yourdomain.com",
context: ['/api', '/user', '/sites'],
target: 'https://yourdomain.com',
secure: false,
changeOrigin: true,
},
Expand Down
56 changes: 28 additions & 28 deletions config/proxy.config.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
const PROXY_CONFIG = [
{
context: [
"/en/api",
"/api",
"/session",
"/user",
"/sites",
"/admin",
"/manage",
"/system",
"/core",
"/libraries",
"/modules",
"/themes",
"/shs-term-data",
"/contextual",
"/webform_rest",
"/quickedit",
"/history",
"/media-library",
"/autocomplete",
"/entity_reference_autocomplete",
"/views/ajax",
"/batch",
"/editor",
"/export",
"/print",
"/wechat",
"/media",
'/en/api',
'/api',
'/session',
'/user',
'/sites',
'/admin',
'/manage',
'/system',
'/core',
'/libraries',
'/modules',
'/themes',
'/shs-term-data',
'/contextual',
'/webform_rest',
'/quickedit',
'/history',
'/media-library',
'/autocomplete',
'/entity_reference_autocomplete',
'/views/ajax',
'/batch',
'/editor',
'/export',
'/print',
'/wechat',
'/media',
],
target: "https://builder.design",
target: 'https://builder.design',
secure: false,
changeOrigin: true,
},
Expand Down
26 changes: 13 additions & 13 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
specs: ['./src/**/*.e2e-spec.ts'],
capabilities: {
browserName: 'chrome'
browserName: 'chrome',
},
directConnect: true,
SELENIUM_PROMISE_MANAGER: false,
Expand All @@ -22,16 +20,18 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
print: function () {},
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
project: require('path').join(__dirname, './tsconfig.json'),
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};
jasmine.getEnv().addReporter(
new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY,
},
})
);
},
};
5 changes: 1 addition & 4 deletions e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"node"
]
"types": ["jasmine", "node"]
}
}
43 changes: 43 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');

module.exports = tseslint.config(
{
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
rules: {
'max-len': [
'warn',
{
code: 100,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'object-shorthand': ['warn', 'always', { avoidQuotes: true }],
'quote-props': ['warn', 'consistent-as-needed'],
'quotes': ['warn', 'single', { allowTemplateLiterals: true }],
'semi': ['warn', 'always'],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@angular-eslint/no-empty-lifecycle-method': 'off',
},
},
{
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {
'@angular-eslint/template/prefer-self-closing-tags': 'warn',
},
}
);
24 changes: 12 additions & 12 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

module.exports = function (config) {
config.set({
basePath: "",
frameworks: ["jasmine", "@angular-devkit/build-angular"],
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("karma-coverage"),
require("@angular-devkit/build-angular/plugins/karma"),
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
Expand All @@ -19,16 +19,16 @@ module.exports = function (config) {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require("path").join(__dirname, "./coverage/xinshi"),
subdir: ".",
reporters: [{ type: "html" }, { type: "text-summary" }],
dir: require('path').join(__dirname, './coverage/xinshi'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ["progress", "kjhtml"],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ["Chrome"],
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
});
Expand Down
Loading

0 comments on commit 7898bbd

Please sign in to comment.