Skip to content

Commit

Permalink
Merge pull request #11 from ErKeLost/optimize/farmup
Browse files Browse the repository at this point in the history
chore: optimize farmup
  • Loading branch information
ErKeLost authored May 23, 2024
2 parents 2cfaa3e + 2f05db0 commit 05fe8ab
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-cameras-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'farmup': patch
---

optimize writeresource logic
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
"biome.enabled": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
}
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
"access": "public"
},
"scripts": {
"dev": "farm",
"start": "farm",
"dev": "farm watch",
"build": "farm build",
"preview": "farm preview",
"clean": "farm clean",
"watch": "farm watch",
"release": "pnpm run build && changeset publish"
},
"bin": {
Expand Down Expand Up @@ -47,7 +45,7 @@
"email": "[email protected]"
},
"dependencies": {
"@changesets/cli": "^2.27.1",
"@changesets/cli": "^2.27.3",
"@farmfe/core": "^1.1.9",
"cac": "^6.7.14",
"fs-extra": "^11.2.0",
Expand All @@ -61,4 +59,4 @@
"README.md",
"bin"
]
}
}
12 changes: 12 additions & 0 deletions playground/farm.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from '@farmfe/core';

export default defineConfig({
compilation: {
input: {
index: 'index.ts',
},
output: {

}
},
});
1 change: 1 addition & 0 deletions playground/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('test farmup');
15 changes: 15 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "playground",
"version": "1.0.0",
"private": true,
"description": "",
"scripts": {
"dev": "farmup -w"
},
"keywords": [],
"devDependencies": {
"farmup": "workspace:*"
},
"author": "",
"license": "ISC"
}
32 changes: 19 additions & 13 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages:
- playground
- .
7 changes: 3 additions & 4 deletions src/plugins/auto-execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,13 @@ export default function autoExecute(options: CommonOptions = {}, logger = defaul
executer = new Executer(normalizeOption.options.execute, logger, normalizeOption.options);
}

const nameWithoutExt = path.parse(resourceEntry.name).name;
const { name: nameWithoutExt } = path.parse(resourceEntry.name);
const execLogger = new Logger({ name: `${CLI_NAME}:${nameWithoutExt}` });

executer.execute(
executePath,
nameWithoutExt,
new Logger({
name: `${CLI_NAME}:${nameWithoutExt}`,
}),
execLogger,
);
},
},
Expand Down

0 comments on commit 05fe8ab

Please sign in to comment.