Skip to content

Commit

Permalink
fix: build process
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 20, 2023
1 parent a772278 commit 83fc4e6
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 240 deletions.
25 changes: 19 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"explorer.fileNesting.patterns": {
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts, ${capture}.d.ts.map",
"*.ts": "${capture}.js, ${capture}.js.map, ${capture}.d.ts, ${capture}.d.ts.map",
"tsconfig.json": "tsconfig.*.json"
"tsconfig.json": "tsconfig.*.json, .tsbuildinfo"
},
"files.associations": {
"*.ajs": "json",
Expand All @@ -23,12 +23,20 @@
"files.exclude": {
// "**/*.map": true,
// "**/*.d.ts": true,
"**/*.tsbuildinfo": true
// "**/*.tsbuildinfo": true
},
"git.autoStash": true,
"git.branchProtection": ["main", "next"],
"githubPullRequests.ignoredPullRequestBranches": ["main", "next"],
"markdownlint.ignore": ["**/CHANGELOG.md"],
"git.branchProtection": [
"main",
"next"
],
"githubPullRequests.ignoredPullRequestBranches": [
"main",
"next"
],
"markdownlint.ignore": [
"**/CHANGELOG.md"
],
"npm.packageManager": "yarn",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"prettier.useEditorConfig": true,
Expand All @@ -39,5 +47,10 @@
},
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"cSpell.words": ["Alwatr", "flatomise", "nanolib", "tsbuildinfo"]
"cSpell.words": [
"Alwatr",
"flatomise",
"nanolib",
"tsbuildinfo"
]
}
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@
"scripts": {
"b": "yarn run build",
"c": "yarn run clean",
"cb": "run-s clean build",
"cb": "yarn run clean && yarn run build",
"l": "yarn run lint",
"f": "yarn run format",
"rl": "run-s pull clean build release",
"upd": "yarn set version latest; yarn up '*' -i; yarn up '*' -R; yarn dlx @yarnpkg/sdks vscode;",
"lint": "run-s lint:ts lint:es",
"lint:es": "eslint . --config .eslintrc.json --ext .ts",
"lint:ts": "lerna run lint:ts",
"rl": "yarn run pull && yarn run clean && yarn run build && yarn run release",
"upd": "yarn set version latest; yarn up '*' -i; yarn up '*' -R; yarn dlx @yarnpkg/sdks vscode; yarn dedupe",
"lint": "eslint . --config .eslintrc.json --ext .ts",
"build": "lerna run build",
"format": "run-s format:prettier format:eslint",
"format:eslint": "yarn run lint:es --fix",
"format": "yarn run format:prettier && yarn run format:eslint",
"format:eslint": "yarn run lint --fix",
"format:prettier": "prettier . --ignore-path .gitignore --write",
"clean": "git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn",
"clean": "git add . && git clean -d -x -f --exclude=node_modules --exclude='*.env' --exclude=_data --exclude='.pnp*' --exclude=.yarn",
"pull": "git pull",
"release": "lerna version",
"publish": "lerna publish from-package"
Expand All @@ -46,7 +44,6 @@
"eslint": "^8.56.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
Expand Down
38 changes: 17 additions & 21 deletions packages/flat-string/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
{
"name": "@alwatr/flat-string",
"version": "1.0.0",
"description": "The `flat-string` function Flattens the underlying C structures of a concatenated JavaScript string.",
"description": "The `flat-string` function flattens the underlying C structures of a concatenated JavaScript string.",
"author": "S. Ali Mihandoost <[email protected]>",
"keywords": [
"string",
"flat",
"flatten",
"optimize",
"concat",
"concatenation",
"util",
"typescript",
"esm",
"alwatr"
],
"main": "main.js",
"type": "module",
"types": "main.d.ts",
"author": "S. Ali Mihandoost <[email protected]>",
"main": "./dist/main.cjs",
"module": "./dist/main.mjs",
"types": "./dist/main.d.ts",
"exports": {
".": {
"import": "./dist/main.mjs",
"require": "./dist/main.cjs",
"types": "./dist/main.d.ts"
}
},
"license": "MIT",
"files": [
"**/*.{d.ts.map,d.ts,js.map,js,html,md}"
Expand All @@ -38,29 +46,17 @@
"w": "yarn run watch",
"c": "yarn run clean",
"cb": "yarn run clean && yarn run build",
"d": "yarn run build && ALWATR_DEBUG=1 yarn node",
"d": "yarn run build:es && ALWATR_DEBUG=1 yarn node",
"build": "yarn run build:ts & yarn run build:es",
"build:es": "yarn node ./esbuild.mjs",
"build:es": "echo underdevelopment",
"build:ts": "tsc --build",
"watch": "run-p -l 'watch:*'",
"watch": "yarn run watch:ts & yarn run watch:es",
"watch:es": "yarn run build:es --watch",
"watch:ts": "yarn run build:ts --watch --preserveWatchOutput",
"clean": "rm -rfv *.js *.d.ts *.d.ts.map *.js.map .tsbuildinfo"
"clean": "rm -rfv dist .tsbuildinfo"
},
"devDependencies": {
"@alwatr/tsconfig-base": "workspace:^",
"typescript": "^5.3.3"
},
"tsconfig": {
"extends": "@alwatr/tsconfig-base",
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": ".tsbuildinfo",
"rootDir": "src",
"outDir": "."
},
"include": [
"src/**/*.ts"
]
}
}
11 changes: 11 additions & 0 deletions packages/flat-string/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "@alwatr/tsconfig-base",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"tsBuildInfoFile": ".tsbuildinfo"
},
"include": ["src/**/*.ts"]
}
6 changes: 3 additions & 3 deletions packages/tsconfig-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["ES2023"],
"lib": ["ES2023", "DOM"],
// "allowJs": true,
// "checkJs": true,
// "jsx": "preserve",
Expand Down Expand Up @@ -56,10 +56,10 @@
/* Source Map Options */
"sourceMap": true,
"declarationMap": true,
"inlineSources": true,
// "inlineSourceMap": true,
// "sourceRoot": "",
// "mapRoot": "",
// "inlineSourceMap": true,
"inlineSources": true,

/* Experimental Options */
"experimentalDecorators": true,
Expand Down
Loading

0 comments on commit 83fc4e6

Please sign in to comment.