diff --git a/.czrc b/.czrc deleted file mode 100755 index 84eba79..0000000 --- a/.czrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "path": "./node_modules/@commitlint/cz-commitlint" -} \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 5188215..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html -cache: - paths: - - node_modules/ -stages: - - install - - lint - - lintdoc - - check-types - - test - - # 当 merge_requests, master, dev, test 分支时会执行依赖安装 -install_dependencies: - stage: install - script: - - npm install --unsafe-perm=true --allow-root - only: - - merge_requests - - /master|(f|F)ix|(d|D)ev_|(f|F)eat|(i|I)ssue|ref|perf|next|test_/ -# 当 merge_requests 执行 eslint 检查 -code_quality: - stage: lint - script: - - npm run lint - only: - - merge_requests - - /(f|F)ix|(d|D)ev_|(f|F)eat|(i|I)ssue|ref|perf|next/ -# 当 merge_requests 执行 tsc 类型检查 -check_types: - stage: check-types - script: - - npm run check-types - only: - - merge_requests - - /(f|F)ix|(d|D)ev_|(f|F)eat|(i|I)ssue|ref|perf|next/ -# 当 merge_requests 有更时会执行单元测试任务 -test: - stage: test - script: - - npm run test - only: - - merge_requests - - /(f|F)ix|(d|D)ev_|(f|F)eat|(i|I)ssue|ref|perf|next/ -#执行 MD 文档校验, 为 doc 或者 master 命名当分支更新时才会触发 -doc_quality: - stage: lintdoc - script: - - npm run lint-doc - only: - - /doc(s)|release/ - - master diff --git a/.lintstagedrc.js b/.lintstagedrc.js deleted file mode 100644 index 80da5e0..0000000 --- a/.lintstagedrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - '*.{js,jsx,less}': ['prettier --write'], - '*.{ts,tsx}': ['prettier --parser=typescript --write'], -}; diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 28e728b..0000000 --- a/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -src -node_modules -scripts -.babelrc.js -.czrc -.eslintignore -.eslintrc.json -.gitignore -.gitlab-ci.yml -commitlint.config.js -jest.config.js -package-lock.json -setupTests.js -tsconfig.build.json -tsconfig.json -.npmrc \ No newline at end of file diff --git a/package.json b/package.json index 946c988..33d5c53 100644 --- a/package.json +++ b/package.json @@ -1,59 +1,69 @@ { - "name": "dt-react-monaco-editor", - "version": "1.0.4", - "description": "Monaco editor for React.", - "authors": "DTStack Corporation", - "keywords": [ - "react", - "monaco", - "editor" - ], - "repository": { - "type": "git", - "url": "https://github.com/DTStack/dt-react-monaco-editor.git" - }, - "main": "lib/index.js", - "module": "lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib/*" - ], - "scripts": { - "prepare": "husky install", - "prepublishOnly": "npm run build", - "build": "rm -rf lib && tsc", - "watch": "rm -rf lib && tsc --watch", - "release": "npm run build && node ./scripts/release.js", - "check-types": "tsc --noEmit --skipLibCheck", - "lint": "prettier --check './src/**/*.{js,jsx,tsx,ts,less}'", - "lint-fix": "prettier --write './src/**/*.{js,jsx,tsx,ts,less}'" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/" - }, - "devDependencies": { - "@commitlint/cli": "^17.6.3", - "@commitlint/config-conventional": "^17.6.3", - "@commitlint/cz-commitlint": "^17.5.0", - "@types/react": "18.x", - "commitizen": "^4.3.0", - "husky": "^8.0.3", - "inquirer": "^8.2.2", - "lint-staged": "^10.0.7", - "monaco-editor": "0.31.1", - "prettier": "^2.2.0", - "react": "18.x", - "standard-version": "^7.0.1", - "tslib": "^2.5.0", - "typescript": "^5.0.4" - }, - "peerDependencies": { - "monaco-editor": "^0.31.0", - "react": ">=16.13.1" - }, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "packageManager": "pnpm@9.7.0" + "name": "dt-react-monaco-editor", + "version": "1.0.4", + "description": "Monaco editor for React.", + "authors": "DTStack Corporation", + "keywords": [ + "react", + "monaco", + "editor" + ], + "repository": { + "type": "git", + "url": "https://github.com/DTStack/dt-react-monaco-editor.git" + }, + "main": "lib/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", + "files": [ + "lib/*" + ], + "scripts": { + "prepare": "husky install", + "prepublishOnly": "npm run build", + "build": "rm -rf lib && tsc", + "watch": "rm -rf lib && tsc --watch", + "release": "npm run build && node ./scripts/release.js", + "check-types": "tsc --noEmit --skipLibCheck", + "lint": "prettier --check './src/**/*.{js,jsx,tsx,ts,less}'", + "lint-fix": "prettier --write './src/**/*.{js,jsx,tsx,ts,less}'" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/" + }, + "devDependencies": { + "@commitlint/cli": "^17.6.3", + "@commitlint/config-conventional": "^17.6.3", + "@commitlint/cz-commitlint": "^17.5.0", + "@types/react": "18.x", + "commitizen": "^4.3.0", + "husky": "^8.0.3", + "inquirer": "^8.2.2", + "lint-staged": "^10.0.7", + "monaco-editor": "0.31.1", + "prettier": "^2.2.0", + "react": "18.x", + "standard-version": "^7.0.1", + "tslib": "^2.5.0", + "typescript": "^5.0.4" + }, + "peerDependencies": { + "monaco-editor": "^0.31.0", + "react": ">=16.13.1" + }, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "packageManager": "pnpm@9.7.0", + "config": { + "commitizen": { + "path": "./node_modules/@commitlint/cz-commitlint" + } + }, + "lint-staged": { + "*": [ + "prettier --write --ignore-unknown" + ] + } }