-
Notifications
You must be signed in to change notification settings - Fork 289
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
4 changed files
with
51 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ module.exports = { | |
'subject-case': [0, 'never'], | ||
'header-max-length': [2, 'always', 88], | ||
}, | ||
}; | ||
}; |
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 @@ | ||
const path = require('path'); | ||
const fsExtra = require('fs-extra'); | ||
const { omit } = require('lodash'); | ||
const shell = require('shelljs'); | ||
|
||
const outputDir = path.resolve(__dirname, '../../build'); | ||
|
||
const package = require('../../package.json'); | ||
|
||
const getVersion = (version) => { | ||
if (version) { | ||
return version; | ||
} else { | ||
const versionNums = package.version.split('.'); | ||
return versionNums.map((num, index) => index === versionNums.length - 1 ? +num + 1 : num).join('.'); | ||
} | ||
}; | ||
|
||
const createPackageJson = async (version) => { | ||
package.version = getVersion(version); | ||
const fileStr = JSON.stringify(omit(package, 'scripts', 'devDependencies'), null, 2); | ||
await fsExtra.outputFile(path.resolve(outputDir, `package.json`), fileStr, 'utf-8'); | ||
}; | ||
|
||
exports.release = async ({ version }) => { | ||
await createPackageJson(version); | ||
shell.sed('-i', 'workspace:', '', path.resolve(outputDir, 'package.json')); | ||
shell.cp('-R', path.resolve(__dirname, '../../../../README.md'), outputDir); | ||
shell.cd(outputDir); | ||
shell.mkdir('-p', 'theme'); | ||
shell.cp('-R', path.resolve(__dirname, '../../devui/theme/theme.scss'), path.resolve(outputDir, 'theme')); | ||
// shell.exec('npm publish'); | ||
}; |
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,6 +1,6 @@ | ||
{ | ||
"name": "vue-devui", | ||
"version": "0.0.1", | ||
"version": "1.0.0-rc.0", | ||
"license": "MIT", | ||
"description": "DevUI components based on Vite and Vue3", | ||
"keywords": [ | ||
|
@@ -15,23 +15,29 @@ | |
"jsx", | ||
"devui" | ||
], | ||
"homepage": "https://vue-devui.github.io/", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:DevCloudFE/vue-devui.git" | ||
}, | ||
"main": "vue-devui.umd.js", | ||
"module": "vue-devui.es.js", | ||
"style": "style.css", | ||
"scripts": { | ||
"dev": "pnpm generate:theme && vitepress dev docs", | ||
"build": "pnpm generate:theme && node --max-old-space-size=4096 node_modules/vitepress/bin/vitepress.js build docs && cp public/* docs/.vitepress/dist/assets", | ||
"build:lib": "pnpm predev && pnpm build:components && pnpm changelog && pnpm copy", | ||
"build:lib": "pnpm predev && pnpm build:components && pnpm changelog && pnpm release", | ||
"test": "jest --config jest.config.js", | ||
"build:components": "node ./devui-cli/index.js build", | ||
"generate:theme": "node ./devui-cli/index.js generate:theme", | ||
"generate:dts": "node ./devui-cli/index.js generate:dts", | ||
"copy": "cp package.json build && cp ../../README.md build && cd build && mkdir theme && cd ../ && cp devui/theme/theme.scss build/theme", | ||
"release": "node ./devui-cli/index.js release", | ||
"cli": "node ./devui-cli/index.js", | ||
"cli:create": "node ./devui-cli/index.js create -t component", | ||
"predev": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error", | ||
"prebuild": "node ./devui-cli/index.js create -t vue-devui --ignore-parse-error", | ||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", | ||
"cli": "devui" | ||
"devui-cli": "devui" | ||
}, | ||
"dependencies": { | ||
"@devui-design/icons": "^1.3.0", | ||
|