Use resolves
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = (env, argv) => {
|
||||
devtool: isDev ? 'inline-source-map' : false,
|
||||
watch: isDev,
|
||||
entry: {
|
||||
app: path.resolve(SRC, 'scripts', 'app.js')
|
||||
app: path.resolve(SRC, 'app.js')
|
||||
},
|
||||
output: {
|
||||
path: DIST,
|
||||
@@ -93,9 +93,11 @@ module.exports = (env, argv) => {
|
||||
new VueLoaderPlugin()
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '...'],
|
||||
extensions: ['.vue', '.scss', '...'],
|
||||
alias: {
|
||||
'@scripts': path.resolve(SRC, 'scripts')
|
||||
'@components': path.resolve(SRC, 'components'),
|
||||
'@scripts': path.resolve(SRC, 'scripts'),
|
||||
'@styles': path.resolve(SRC, 'styles')
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import Project from './components/project.vue';
|
||||
import Admin from './components/admin.vue';
|
||||
import Upload from './components/upload.vue';
|
||||
import Project from '@components/project';
|
||||
import Admin from '@components/admin';
|
||||
import Upload from '@components/upload';
|
||||
|
||||
const aoRoutes = {
|
||||
'project': Project,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
//Librairies
|
||||
import Api from './api.js';
|
||||
import Lang from './lang.js';
|
||||
import Projects from './projects.js';
|
||||
import User from './user.js';
|
||||
import Api from '@scripts/api';
|
||||
import Lang from '@scripts/lang';
|
||||
import Projects from '@scripts/projects';
|
||||
import User from '@scripts/user';
|
||||
import { createApp } from 'vue';
|
||||
|
||||
//Main template
|
||||
import Spot from '../Spot.vue';
|
||||
import Spot from './Spot';
|
||||
|
||||
//Style
|
||||
import Css from './../styles/spot.scss';
|
||||
import Css from '@styles/spot';
|
||||
|
||||
//App Configuration from PHP
|
||||
const appConfig = JSON.parse(document.getElementById('app-config').textContent);
|
||||
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import SpotIcon from './spotIcon.vue';
|
||||
import SpotButton from './spotButton.vue';
|
||||
import AdminInput from './adminInput.vue';
|
||||
import SpotIcon from '@components/spotIcon';
|
||||
import SpotButton from '@components/spotButton';
|
||||
import AdminInput from '@components/adminInput';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -4,14 +4,14 @@ import { Map, NavigationControl, Marker, LngLatBounds, LngLat, Popup } from 'map
|
||||
import { createApp, ref, provide, inject } from 'vue';
|
||||
import Simplebar from 'simplebar-vue';
|
||||
|
||||
import lightbox from '../scripts/lightbox.js';
|
||||
import { getOuterWidth } from '../scripts/common.js';
|
||||
import lightbox from '@scripts/lightbox';
|
||||
import { getOuterWidth } from '@scripts/common';
|
||||
|
||||
import SpotIcon from './spotIcon.vue';
|
||||
import SpotIconStack from './spotIconStack.vue';
|
||||
import SpotButton from './spotButton.vue';
|
||||
import ProjectPost from './projectPost.vue';
|
||||
import ProjectPopup from './projectPopup.vue';
|
||||
import SpotIcon from '@components/spotIcon';
|
||||
import SpotIconStack from '@components/spotIconStack';
|
||||
import SpotButton from '@components/spotButton';
|
||||
import ProjectPost from '@components/projectPost';
|
||||
import ProjectPopup from '@components/projectPopup';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import spotIcon from './spotIcon.vue';
|
||||
import projectRelTime from './projectRelTime.vue';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
import projectRelTime from '@components/projectRelTime';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script>
|
||||
import projectMapLink from './projectMapLink.vue';
|
||||
import spotIcon from './spotIcon.vue';
|
||||
import projectRelTime from './projectRelTime.vue';
|
||||
import projectMediaLink from './projectMediaLink.vue';
|
||||
import { options } from '../scripts/lightbox';
|
||||
import projectMapLink from '@components/projectMapLink';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
import projectRelTime from '@components/projectRelTime';
|
||||
import projectMediaLink from '@components/projectMediaLink';
|
||||
import { options } from '@scripts/lightbox';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script>
|
||||
import spotIcon from './spotIcon.vue';
|
||||
import spotIconStack from './spotIconStack.vue';
|
||||
import spotButton from './spotButton.vue';
|
||||
import projectMediaLink from './projectMediaLink.vue';
|
||||
import projectMapLink from './projectMapLink.vue';
|
||||
import projectRelTime from './projectRelTime.vue';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
import spotIconStack from '@components/spotIconStack';
|
||||
import spotButton from '@components/spotButton';
|
||||
import projectMediaLink from '@components/projectMediaLink';
|
||||
import projectMapLink from '@components/projectMapLink';
|
||||
import projectRelTime from '@components/projectRelTime';
|
||||
import { LngLat } from 'maplibre-gl';
|
||||
import { copyTextToClipboard } from '../scripts/common.js';
|
||||
import { copyTextToClipboard } from '@scripts/common';
|
||||
|
||||
import autosize from 'autosize';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import spotIcon from './spotIcon.vue';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import SpotIcon from './spotIcon.vue';
|
||||
import SpotIcon from '@components/spotIcon';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { getIcon } from '../scripts/icons.js';
|
||||
import { getIcon } from '@scripts/icons';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -55,3 +55,17 @@ export default {
|
||||
</span>
|
||||
<FontAwesomeIcon v-else :icon="iconDefinition" :class="classNames" :fixed-width="resolvedFixedWidth" :width-auto="resolvedAutoWidth" :size="resolvedSize" :transform="resolvedTransform" />
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "@styles/var";
|
||||
|
||||
.spot-icon {
|
||||
&.margin-right {
|
||||
margin-right: var.$elem-spacing;
|
||||
}
|
||||
|
||||
&.margin-left {
|
||||
margin-left: var.$elem-spacing;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { FontAwesomeLayers } from '@fortawesome/vue-fontawesome';
|
||||
import spotIcon from './spotIcon.vue';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -4,8 +4,8 @@ import Uppy from '@uppy/core';
|
||||
import XHRUpload from '@uppy/xhr-upload';
|
||||
import '@uppy/core/css/style.min.css';
|
||||
|
||||
import SpotIcon from './spotIcon.vue';
|
||||
import SpotButton from './spotButton.vue';
|
||||
import SpotIcon from '@components/spotIcon';
|
||||
import SpotButton from '@components/spotButton';
|
||||
|
||||
export default {
|
||||
name: 'upload',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getDragPosition } from './common.js';
|
||||
import { getDragPosition } from '@scripts/common';
|
||||
|
||||
$.prototype.defaultVal = function(sDefaultValue)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { icon } from '@fortawesome/fontawesome-svg-core';
|
||||
import { getIcon } from './icons.js';
|
||||
import { getIcon } from '@scripts/icons';
|
||||
|
||||
const defaults = {
|
||||
albumLabel: 'Image %1 of %2',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@use "color";
|
||||
@use "@styles/color";
|
||||
|
||||
/* Animations */
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
@use "var";
|
||||
|
||||
.spot-icon {
|
||||
&.margin-right {
|
||||
margin-right: var.$elem-spacing;
|
||||
}
|
||||
|
||||
&.margin-left {
|
||||
margin-left: var.$elem-spacing;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@use "common";
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/common";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
body.lb-disable-scrolling {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@use "var";
|
||||
@use "@styles/var";
|
||||
|
||||
@media only screen and (max-width: 800px) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
#admin {
|
||||
margin: 1em;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
#feed {
|
||||
#feed-panel {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@use "common";
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/common";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
$thumbnail-max-size: 60px;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@use "common";
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/common";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
$panel-width: 30vw;
|
||||
$panel-width-max: "400px + 3 * #{var.$block-spacing}";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
@use 'page.project.map' as map;
|
||||
@use 'page.project.panel' as panel;
|
||||
@use 'page.project.feed' as feed;
|
||||
@use 'page.project.settings' as settings;
|
||||
@use '@styles/page.project.map' as map;
|
||||
@use '@styles/page.project.panel' as panel;
|
||||
@use '@styles/page.project.feed' as feed;
|
||||
@use '@styles/page.project.settings' as settings;
|
||||
|
||||
#projects {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@use "common";
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/common";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
#settings {
|
||||
#settings-panel {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@use "var";
|
||||
@use "color";
|
||||
@use "@styles/var";
|
||||
@use "@styles/color";
|
||||
|
||||
#upload {
|
||||
padding: 1em;
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
/* Site Global CSS */
|
||||
@use "sass:meta";
|
||||
@use 'common';
|
||||
@use '@styles/common';
|
||||
|
||||
/* Modules */
|
||||
@use 'fa';
|
||||
@use 'lightbox';
|
||||
@import '../../node_modules/simplebar-vue/dist/simplebar.min.css';
|
||||
@include meta.load-css('vue');
|
||||
@use '@styles/lightbox';
|
||||
@import 'simplebar-vue/dist/simplebar.min.css';
|
||||
@include meta.load-css('@styles/vue');
|
||||
|
||||
/* Pages Specific CSS */
|
||||
@include meta.load-css('page.project');
|
||||
@include meta.load-css('page.upload');
|
||||
@include meta.load-css('page.admin');
|
||||
@include meta.load-css('@styles/page.project');
|
||||
@include meta.load-css('@styles/page.upload');
|
||||
@include meta.load-css('@styles/page.admin');
|
||||
|
||||
@include meta.load-css('mobile');
|
||||
@include meta.load-css('@styles/mobile');
|
||||
Reference in New Issue
Block a user