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

change to vue3 vite and typescript #3

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
],
rules: {
'jsdoc/require-jsdoc': 'off',
Expand Down
35 changes: 27 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
/.idea/
/*.iml
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

/vendor/
/vendor-bin/*/vendor/
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/.php-cs-fixer.cache
/tests/.phpunit.cache
/cypress/videos/
/cypress/screenshots/

/node_modules/
/js/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint"
]
}
19 changes: 19 additions & 0 deletions container/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20.13.0-bookworm-slim

RUN apt-get -qq update \
&& apt-get -y -qq install --no-install-recommends \
jq \
net-tools \
curl \
git \
patch \
&& apt-get clean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/

RUN npm install -g webpack-cli \
&& cat /etc/skel/.bashrc | sed -r 's/^#alias l/alias l/' > ~/.bashrc \
&& echo "\nPS1='\[\033[01;32m\]\u@<\${CONTAINER_NAME} 🫙>\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\\$ '" >> ~/.bashrc

WORKDIR /app

ENTRYPOINT ["/usr/bin/bash"]
35 changes: 35 additions & 0 deletions container/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

CONTAINER_NAME="nc-simplesettings-dev"
CODE_DIR_IN_CONTAINER="/app"

function main() {
local container_dir="$( readlink -f "$( dirname "${0}" )" )"
local image_name="localhost/${CONTAINER_NAME}:latest"
local repo_root_dir="$( pwd )"

podman image build \
-f ${container_dir}/Containerfile \
-t ${image_name} \
${container_dir}

if [ ${?} -ne 0 ]; then
echo "Error building the image."
exit 1
fi

echo "Run ${image_name} as ${CONTAINER_NAME} ..."

podman run \
--network=host \
--rm \
-it \
--env "CONTAINER_NAME=${CONTAINER_NAME}" \
--name ${CONTAINER_NAME} \
--workdir "${CODE_DIR_IN_CONTAINER}" \
--mount "type=bind,source=${repo_root_dir},target=${CODE_DIR_IN_CONTAINER}" \
"${image_name}" \
"${@}"
}

main "${@}"
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
3 changes: 3 additions & 0 deletions js/main.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions js/main.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*!
* Vue.js v2.7.16
* (c) 2014-2023 Evan You
* Released under the MIT License.
*/
1 change: 1 addition & 0 deletions js/main.js.map

Large diffs are not rendered by default.

Loading
Loading