first commit

This commit is contained in:
buttle 2021-10-22 11:00:33 +02:00
commit 8a4693a46f
5 changed files with 147 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules
dist
package-lock.json

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "archive-list",
"version": "1.0.0",
"description": "List arc-hive collections for Omeka",
"main": "webpack.config.js",
"devDependencies": {
"babel-loader": "^8.2.3",
"vue": "^2.6.14",
"vue-loader": "^15.9.8",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.14",
"webpack-cli": "^4.9.1"
},
"scripts": {
"build": "webpack --config webpack.config.js --mode development",
"build-prod": "webpack --config webpack.config.js --mode production"
}
}

View File

@ -0,0 +1,47 @@
<!--
This file is part of ArciveList.
# SPDX-FileCopyrightText: 2021 Hangar.org
# SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
created() {
},
ready: function () {
},
mounted() {
},
methods: {
},
watched: {
},
computed: {
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,39 @@
/*
This file is part of LiberaForms.
# SPDX-FileCopyrightText: 2021 LiberaForms.org
# SPDX-License-Identifier: AGPL-3.0-or-later
*/
import Vue from "vue";
//import VueMq from 'vue-mq'
import ArchiveList from "../components/archiveList.vue";
//import 'es6-promise/auto'
//import store from "../store.js"
//import i18n from "../i18n.js"
export const bus = new Vue();
var ComponentClass = Vue.extend(ArchiveList)
/*
.use(VueMq, {
breakpoints: { // default breakpoints - customize this
sm: 450,
md: 1250,
lg: Infinity,
},
defaultBreakpoint: 'sm' // customize this for SSR
})
*/
document.querySelectorAll("[data-vue-component=archive-list]")
.forEach((element) => {
new ComponentClass({
components: {'ArchiveList': ArchiveList},
/*
propsData: { ...element.dataset },
props: ["endpoint", "language", "csrf_token"],
store: store,
i18n: i18n,
*/
}).$mount(element);
});

40
webpack.config.js Normal file
View File

@ -0,0 +1,40 @@
const { dirname } = require("path");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
module.exports = {
entry: {
"archive-list": "./src/loaders/archiveListLoader.js",
},
optimization: {
minimize: true
},
output: {
filename: "dist/[name].js",
path: __dirname,
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
},
// this will apply to both plain `.js` files
// AND `<script>` blocks in `.vue` files
{
test: /\.js$/,
loader: "babel-loader",
},
// this will apply to both plain `.css` files
// AND `<style>` blocks in `.vue` files
{
test: /\.css$/,
use: ["vue-style-loader", "css-loader"],
}
],
},
plugins: [
// make sure to include the plugin for the magic
new VueLoaderPlugin(),
],
};