mango-cms 0.2.2 → 0.2.3

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.
package/cli.js CHANGED
@@ -169,7 +169,7 @@ program
169
169
  fs.copySync(templateDir, projectDir);
170
170
 
171
171
  // Create config directory if it doesn't exist
172
- const configDir = path.join(projectDir, 'config');
172
+ const configDir = path.join(projectDir, 'mango');
173
173
 
174
174
  // Create or update settings.json
175
175
  const settingsPath = path.join(configDir, 'config/settings.json');
@@ -224,8 +224,8 @@ program
224
224
  .action(async () => {
225
225
  try {
226
226
  const currentDir = process.cwd();
227
- const templateConfigDir = path.join(__dirname, 'default/config');
228
- const targetConfigDir = path.join(currentDir, 'config');
227
+ const templateConfigDir = path.join(__dirname, 'default/mango');
228
+ const targetConfigDir = path.join(currentDir, 'mango');
229
229
 
230
230
  // Check if config directory already exists
231
231
  if (fs.existsSync(targetConfigDir)) {
@@ -256,7 +256,7 @@ program
256
256
  await checkSystemDependencies();
257
257
 
258
258
  // Check for license in settings.json
259
- const settingsPath = path.join(process.cwd(), 'config/config/settings.json');
259
+ const settingsPath = path.join(process.cwd(), 'mango/config/settings.json');
260
260
  await ensureLicenseExists(settingsPath);
261
261
 
262
262
  // Ensure src exists
@@ -297,7 +297,7 @@ program
297
297
  .action(async () => {
298
298
  try {
299
299
  // Check for license in settings.json
300
- const settingsPath = path.join(process.cwd(), 'config/config/settings.json');
300
+ const settingsPath = path.join(process.cwd(), 'mango/config/settings.json');
301
301
  await ensureLicenseExists(settingsPath);
302
302
 
303
303
  // Ensure src exists
@@ -6,7 +6,7 @@
6
6
 
7
7
  <script setup>
8
8
  import Mango from './mango'
9
- import { siteName } from '@config/config/settings.json'
9
+ import { siteName } from '@mango/config/settings.json'
10
10
  import { ref, watch, computed, nextTick, onUnmounted } from 'vue'
11
11
  import { useRoute } from 'vue-router'
12
12
 
@@ -5,16 +5,16 @@ import fs from 'fs'
5
5
 
6
6
  // Determine project root based on config directory location
7
7
  let projectRoot = process.cwd()
8
- let configPath = path.resolve(projectRoot, 'config')
8
+ let configPath = path.resolve(projectRoot, 'mango')
9
9
 
10
10
  // If config doesn't exist in current directory, check parent
11
11
  if (!fs.existsSync(configPath)) {
12
12
  projectRoot = path.resolve(projectRoot, '..')
13
- configPath = path.resolve(projectRoot, 'config')
13
+ configPath = path.resolve(projectRoot, 'mango')
14
14
 
15
15
  // If config still doesn't exist, throw error
16
16
  if (!fs.existsSync(configPath)) {
17
- throw new Error('Config folder not found. Please ensure your config folder exists either in the current directory or parent directory.')
17
+ throw new Error('Mango folder not found. Please ensure your mango folder exists either in the current directory or parent directory.')
18
18
  }
19
19
  }
20
20
 
@@ -27,6 +27,7 @@ export default defineConfig({
27
27
  resolve: {
28
28
  alias: {
29
29
  '@config': configPath,
30
+ '@mango': configPath,
30
31
  '@settings': path.resolve(configPath, 'config/settings.json'),
31
32
  '@collections': path.resolve(configPath, 'config/.collections.json'),
32
33
  '@plugins': path.resolve(configPath, 'plugins'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "main": "./index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",
package/webpack.config.js CHANGED
@@ -26,9 +26,9 @@ module.exports = {
26
26
  mode: 'production',
27
27
  resolve: {
28
28
  alias: {
29
- '@mango': path.resolve(mangoRoot),
30
29
  '@cms': path.resolve(mangoRoot, 'src/cms'),
31
- '@config': path.resolve(userProjectRoot, 'config'),
30
+ '@config': path.resolve(userProjectRoot, legacyMode ? 'config' : 'mango'),
31
+ '@mango': path.resolve(userProjectRoot, legacyMode ? 'config' : 'mango'),
32
32
  '@fields': path.resolve(mangoRoot, 'src/cms/1. build/fields'),
33
33
  '@mongo': path.resolve(mangoRoot, 'src/cms/1. build/libraries/mongo'),
34
34
  '@helpers': path.resolve(mangoRoot, 'src/cms/1. build/helpers'),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes