ripal-ui 1.0.12 → 1.0.13
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/package.json +1 -1
- package/scripts/generateConfig.js +11 -4
package/package.json
CHANGED
|
@@ -3,8 +3,7 @@ const fs = require('fs');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
|
|
5
5
|
// Define the config file content
|
|
6
|
-
const configContent = `
|
|
7
|
-
const config = {
|
|
6
|
+
const configContent = `const config = {
|
|
8
7
|
appName: "",
|
|
9
8
|
appLangs: {
|
|
10
9
|
default: null,
|
|
@@ -61,13 +60,21 @@ export default config
|
|
|
61
60
|
`;
|
|
62
61
|
|
|
63
62
|
// Path to generate the config file in the user's project root
|
|
64
|
-
const configFilePath = path.resolve(process.cwd(), 'ripal-ui.config.js');
|
|
63
|
+
const configFilePath = path.resolve(process.cwd(), '../../ripal-ui.config.js');
|
|
65
64
|
|
|
66
65
|
// Check if the config file already exists
|
|
67
66
|
if (!fs.existsSync(configFilePath)) {
|
|
68
67
|
// Write the config file
|
|
69
68
|
fs.writeFileSync(configFilePath, configContent);
|
|
70
69
|
console.log('ripal-ui.config.js has been generated in the root project.');
|
|
70
|
+
|
|
71
|
+
fs.mkdirSync(
|
|
72
|
+
path.resolve(process.cwd(), '../../lang')
|
|
73
|
+
);
|
|
74
|
+
fs.writeFileSync(
|
|
75
|
+
path.resolve(process.cwd(), '../../lang/en.json'), `[
|
|
76
|
+
say_hello: "Hello world"
|
|
77
|
+
]`);
|
|
71
78
|
} else {
|
|
72
79
|
console.log('ripal-ui.config.js already exists. No changes made.');
|
|
73
|
-
}
|
|
80
|
+
}
|