Skip to content

Commit

Permalink
Update release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
icodesign committed Jul 21, 2024
1 parent 0e72861 commit fba503e
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build package
run: pnpm run --filter @icodesign/dolphin build

- name: Make sure build artifacts are created (apps/cli/dist/index.cjs)
run: |
if [ ! -f "apps/cli/dist/index.cjs" ]; then
echo "Build artifacts does not exist. Exiting."
exit 1
fi
- name: Create and publish versions
uses: changesets/action@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.pnpm-store
.npmrc
package

# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @icodesign/dolphin

## 1.0.0
## 0.3.0

### Major Changes

- 4492aa4: Initial release
- Initial release
4 changes: 4 additions & 0 deletions apps/cli/bin/cli.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

var cli = require('../dist/index.cjs');
cli();
41 changes: 27 additions & 14 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,49 @@
{
"name": "@icodesign/dolphin",
"version": "1.0.0",
"exports": "./dist/index.js",
"bin": "./dist/index.cjs",
"version": "0.3.0",
"main": "./dist/index.cjs",
"bin": "./bin/cli.cjs",
"type": "module",
"description": "Dolphin is an innovative, automated internationalization (i18n) service designed to integrate seamlessly into your development pipeline.",
"keywords": [
"i18n",
"internationalization",
"localization",
"l10n",
"ai",
"artificial intelligence",
"translation",
"nlp",
"dolphin"
],
"author": "Lance Wang (icodesign)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/icodesign/dolphin"
},
"files": [
"dist"
],
"publishConfig": {
"directory": "package"
},
"clean-publish": {
"withoutPublish": true,
"tempDir": "package"
},
"scripts": {
"clean": "rimraf dist",
"build": "tsup",
"dev": "tsc -w --preserveWatchOutput",
"start": "node dist/index.cjs",
"start:debug": "node --inspect-brk dist/index.cjs",
"prepack": "pnpm build",
"prepublishOnly": "rm -rf ./package && clean-publish --fields 'dependencies,publishConfig' && cp ../../README.md ../../LICENSE ./package",
"postpublish": "rm -rf ./package",
"pkg:mac": "NODE_ENV=production pkg . --no-bytecode --public-packages '*' --public --targets node18-macos-x64,node18-macos-arm64 -o dist/bin/dolphin-macos",
"pkg:mac:compressed": "NODE_ENV=production pkg . --no-bytecode --public-packages '*' --public --targets node18-macos-x64,node18-macos-arm64 --compress Brotli -o dist/bin/dolphin-macos"
},
"keywords": [
"i18n",
"internationalization",
"localization",
"l10n",
"ai",
"artificial intelligence",
"translation",
"nlp",
"dolphin"
],
"dependencies": {
"@repo/base": "workspace:*",
"@repo/ioloc": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion apps/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';

import { version } from '../package.json';
import { commands } from './commands/index.js';

// process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '1'
Expand All @@ -9,7 +10,7 @@ import { commands } from './commands/index.js';

const parser = yargs(hideBin(process.argv))
.command(commands)
.version('0.1.0')
.version(version)
.help()
.alias('help', 'h');

Expand Down
18 changes: 4 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
{
"name": "@icodesign/dolphin",
"version": "0.1.0",
"name": "dolphin",
"private": true,
"description": "Dolphin is an innovative, automated internationalization (i18n) service designed to integrate seamlessly into your development pipeline.",
"keywords": [
"i18n",
"internationalization",
"localization",
"l10n",
"ai",
"artificial intelligence",
"translation",
"nlp",
"dolphin"
],
"author": "Lance Wang (icodesign)",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/icodesign/dolphin"
},
"scripts": {
"ci:publish": "pnpm publish -r"
"ci:version": "pnpm changeset version",
"ci:publish": "pnpm publish -r --access public"
},
"dependencies": {
"typescript": "^5.5.0"
},
"devDependencies": {
"@changesets/cli": "^2.27.7",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"clean-publish": "^5.0.0",
"prettier": "^3.3.0"
}
}
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fba503e

Please sign in to comment.