mango-cms 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,42 +1,41 @@
1
1
  {
2
- "name": "cfl-front",
3
- "version": "0.0.0",
4
- "scripts": {
5
- "dev": "vite",
6
- "build": "vite build",
7
- "preview": "vite preview",
8
- "mango": "mango"
9
- },
10
- "dependencies": {
11
- "mango-cms": "^0.1.16",
12
- "@headlessui/vue": "^1.6.7",
13
- "@mapbox/mapbox-gl-geocoder": "^5.0.0",
14
- "@sweetalert2/theme-dark": "^5.0.10",
15
- "@tinymce/tinymce-vue": "^4",
16
- "@vitejs/plugin-vue": "^2.2.0",
17
- "@vueup/vue-quill": "^1.0.0-beta.7",
18
- "@vueuse/motion": "^2.0.0-beta.12",
19
- "algoliasearch": "^4.12.0",
20
- "axios": "^0.24.0",
21
- "canvas-confetti": "^1.5.1",
22
- "datebook": "^7.0.8",
23
- "dayjs": "^1.10.7",
24
- "express": "^4.18.1",
25
- "google-maps": "^4.3.3",
26
- "mapbox-gl": "^2.7.0",
27
- "sweetalert2": "^11.4.0",
28
- "vue": "^3.2.37",
29
- "vue-router": "4",
30
- "vue-slider-component": "^4.0.0-beta.4",
31
- "vue-upload-component": "^3.1.2",
32
- "vue3-clipboard": "^1.0.0",
33
- "vue3-touch-events": "^4.1.0",
34
- "vuedraggable": "^4.1.0"
35
- },
36
- "devDependencies": {
37
- "autoprefixer": "^10.4.0",
38
- "postcss": "^8.4.5",
39
- "tailwindcss": "^3.0.2",
40
- "vite": "^4.2.1"
2
+ "name": "mango-front",
3
+ "version": "0.0.0",
4
+ "scripts": {
5
+ "dev": "vite",
6
+ "build": "vite build",
7
+ "preview": "vite preview",
8
+ "mango": "mango"
9
+ },
10
+ "dependencies": {
11
+ "mango-cms": "^0.1.16",
12
+ "@headlessui/vue": "^1.6.7",
13
+ "@mapbox/mapbox-gl-geocoder": "^5.0.0",
14
+ "@sweetalert2/theme-dark": "^5.0.10",
15
+ "@tinymce/tinymce-vue": "^4",
16
+ "@vueup/vue-quill": "^1.0.0-beta.7",
17
+ "@vueuse/motion": "^2.0.0-beta.12",
18
+ "algoliasearch": "^4.12.0",
19
+ "axios": "^0.24.0",
20
+ "canvas-confetti": "^1.5.1",
21
+ "datebook": "^7.0.8",
22
+ "dayjs": "^1.10.7",
23
+ "express": "^4.18.1",
24
+ "google-maps": "^4.3.3",
25
+ "mapbox-gl": "^2.7.0",
26
+ "sweetalert2": "^11.4.0",
27
+ "vue": "^3.2.37",
28
+ "vue-router": "4",
29
+ "vue-slider-component": "^4.0.0-beta.4",
30
+ "vue-upload-component": "^3.1.2",
31
+ "vue3-clipboard": "^1.0.0",
32
+ "vue3-touch-events": "^4.1.0",
33
+ "vuedraggable": "^4.1.0"
34
+ },
35
+ "devDependencies": {
36
+ "autoprefixer": "^10.4.0",
37
+ "postcss": "^8.4.5",
38
+ "tailwindcss": "^3.0.2",
39
+ "vite": "^4.5.9"
40
+ }
41
41
  }
42
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "exports": {
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "index.js",
11
11
  "cli.js",
12
+ "webpack.config.js",
12
13
  "default/**/*",
13
14
  "!default/node_modules/**"
14
15
  ],
@@ -0,0 +1,58 @@
1
+ const path = require('path');
2
+ const webpack = require('webpack');
3
+ const nodeExternals = require('webpack-node-externals');
4
+ const NodemonPlugin = require('nodemon-webpack-plugin');
5
+
6
+
7
+ // Get the user's project root from the execution context (passed via CLI or fallback to cwd)
8
+ process.env.PROJECT_ROOT = process.env.PROJECT_ROOT || process.cwd();
9
+ process.env.MANGO_ROOT = process.env.MANGO_ROOT || __dirname;
10
+ let moduleLocation = process.env.PROJECT_ROOT
11
+
12
+ let legacyMode = process.env.PROJECT_ROOT == process.env.MANGO_ROOT
13
+ if (legacyMode) {
14
+ moduleLocation = __dirname
15
+ process.env.PROJECT_ROOT = path.join(__dirname, '..')
16
+ }
17
+ console.log('env', process.env.PROJECT_ROOT, process.env.MANGO_ROOT, legacyMode, path.resolve(moduleLocation, 'node_modules'))
18
+
19
+ const userProjectRoot = process.env.PROJECT_ROOT
20
+ const mangoRoot = process.env.MANGO_ROOT
21
+ const buildPath = legacyMode ? mangoRoot : userProjectRoot
22
+
23
+ console.log('moduleLocation', moduleLocation)
24
+
25
+ module.exports = {
26
+ mode: 'production',
27
+ resolve: {
28
+ alias: {
29
+ '@mango': path.resolve(mangoRoot),
30
+ '@cms': path.resolve(mangoRoot, 'src/cms'),
31
+ '@config': path.resolve(userProjectRoot, 'config'),
32
+ '@fields': path.resolve(mangoRoot, 'src/cms/1. build/fields'),
33
+ '@mongo': path.resolve(mangoRoot, 'src/cms/1. build/libraries/mongo'),
34
+ '@helpers': path.resolve(mangoRoot, 'src/cms/1. build/helpers'),
35
+ },
36
+ },
37
+ devtool: 'inline-source-map',
38
+ entry: {
39
+ server: path.resolve(mangoRoot, 'src/main.js'), // Entry point in @mango-cms/core
40
+ },
41
+ output: {
42
+ path: path.resolve(buildPath, 'build'), // Change to build in mango directory
43
+ filename: 'index.js',
44
+ },
45
+ target: 'node',
46
+ plugins: [new NodemonPlugin()],
47
+ node: {
48
+ __dirname: false,
49
+ __filename: false,
50
+ },
51
+ externals: [
52
+ nodeExternals(),
53
+ // Also check for externals in the mango package
54
+ nodeExternals({
55
+ modulesDir: path.resolve(moduleLocation, 'node_modules')
56
+ })
57
+ ],
58
+ };