Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm instead of yarn #125

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 12 additions & 12 deletions bin/freenit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ EOF

frontend_common() {
echo "# ${NAME}" >README.md
yarn add --dev chota
npm install --save-dev chota

mkdir bin
cd bin
Expand All @@ -172,7 +172,7 @@ setup() {
cd \${PROJECT_ROOT}
update=\${1}
if [ "\${OFFLINE}" != "yes" -a "\${update}" != "no" ]; then
yarn install
npm install
fi
}
EOF
Expand All @@ -197,7 +197,7 @@ BIN_DIR=\`dirname \$0\`
. "\${BIN_DIR}/common.sh"
setup

env CI=true yarn run test
env CI=true npm run test
EOF
chmod +x test.sh

Expand All @@ -214,7 +214,7 @@ echo "Frontend"
echo "========"
cd "\${PROJECT_ROOT}"
rm -rf build
yarn run build
npm run build
touch build/.keep
EOF
chmod +x collect.sh
Expand Down Expand Up @@ -287,9 +287,9 @@ EOF
}

react() {
yarn init vite@latest "${NAME}" -- --template react-ts
npm init vite@latest "${NAME}" -- --template react-ts
cd "${NAME}"
yarn install @freenit-framework/axios react-router-dom @mdi/js
npm install @freenit-framework/axios react-router-dom @mdi/js
frontend_common

rm src/App.* src/index.css src/logo.svg
Expand Down Expand Up @@ -388,18 +388,18 @@ setup

echo "Frontend"
echo "========"
env BACKEND_URL=\${BACKEND_URL} yarn run dev --host 0.0.0.0
env BACKEND_URL=\${BACKEND_URL} npm run dev -- --host 0.0.0.0
EOF
chmod +x devel.sh
cd ..
}

svelte() {
yarn create svelte "${NAME}"
npm create svelte@latest "${NAME}"
cd "${NAME}"
yarn install
npm install
frontend_common
yarn add --dev @zerodevx/svelte-toast @freenit-framework/svelte-base
npm install --save-dev @zerodevx/svelte-toast @freenit-framework/svelte-base
cat >.prettierrc<<EOF
{
"useTabs": false,
Expand Down Expand Up @@ -535,7 +535,7 @@ EOF
</script>
EOF

yarn run format
npm run format
cd bin
cat >devel.sh<<EOF
#!/bin/sh
Expand All @@ -547,7 +547,7 @@ setup

echo "Frontend"
echo "========"
env BACKEND_URL=\${BACKEND_URL} yarn run dev --host 0.0.0.0
env BACKEND_URL=\${BACKEND_URL} npm run dev -- --host 0.0.0.0
EOF
chmod +x devel.sh
cd ../..
Expand Down