Skip to content

Commit

Permalink
fix: add script support for new frontend framework (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker-john authored Jan 27, 2024
1 parent 95a327b commit a56a008
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import lighthouse from "lighthouse";

function buildProject(project) {
console.log('Building project: ', project.name);
runCommand('pnpm i', project.path);
if (project.install) {
runCommand(project.install, project.path);
} else {
runCommand('pnpm i', project.path);
}
if (project.build) {
runCommand(project.build, project.path);
} else {
Expand Down
45 changes: 44 additions & 1 deletion projectList.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
{
"name":"angular",
"path":"app/angular-realworld-example-app"
"path":"app/angular-realworld-example-app",
"build":"\"node_modules/.bin/ng\" build --configuration production --base-href ./"
},
{
"name":"svelte",
Expand All @@ -31,5 +32,47 @@
"path":"app/realworld-qwik",
"build":"\"node_modules/.bin/vite\" build",
"preview":"\"node_modules/.bin/vite\" preview"
},
{
"name":"ember",
"path":"app/ember-realworld",
"build":"set NODE_OPTIONS=--openssl-legacy-provider && \"node_modules/.bin/ember\" build --environment=production"
},
{
"name":"apprun",
"path":"app/apprun-realworld-example-app",
"preview":"\"node_modules/.bin/webpack\" serve --mode production"
},
{
"name":"hyperapp",
"path":"app/hyperapp-realworld-example-app",
"build":"\"node_modules/.bin/parcel\" build index.html"
},
{
"name":"imba",
"path":"app/imba-realworld-example-app"
},
{
"name":"riot",
"path":"app/riot_realworld_example_app",
"dist":"docs"
},
{
"name":"san",
"path":"app/san-realworld-app",
"build":"(if exist dist rmdir dist /Q /S) && set NODE_OPTIONS=--openssl-legacy-provider && \"node_modules/.bin/webpack\" --config=webpack.config.js --mode=production"
},
{
"name":"stencil",
"path":"app/stencil-realworld-app",
"dist":"www",
"build":"(if exist www rmdir www /S /Q) && \"node_modules/.bin/stencil\" build --prerender"
},
{
"name":"yew",
"path":"app/rust-yew-realworld-example-app",
"install":"cargo install wasm-pack && cargo install --locked trunk",
"build":"cd crates/conduit-wasm && trunk build",
"dist":"crates/conduit-wasm/dist"
}
]

0 comments on commit a56a008

Please sign in to comment.