at-builder 1.2.2 ā 1.2.4
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/.claude/settings.local.json +2 -1
- package/.plop/generators/actions.js +80 -13
- package/.plop/templates/analytics.hbs +13 -3
- package/.plop/templates/build.config.hbs +7 -0
- package/.plop/templates/component.cb.hbs +61 -16
- package/CustomWrapperPlugin.js +1 -1
- package/README.md +210 -33
- package/bin/constants/config.js +49 -0
- package/bin/index.js +73 -5
- package/bin/services/doctor.js +342 -0
- package/lib/at-deploy.js +318 -0
- package/package.json +11 -8
- package/plopfile.js +7 -1
- package/src/constants/config.ts +51 -0
- package/src/index.ts +82 -5
- package/src/services/doctor.ts +379 -0
- package/tsconfig.json +1 -1
- package/webpack.config.js +37 -1
- package/target/npmlist.json +0 -196
|
@@ -11,10 +11,8 @@ const fs = require('fs');
|
|
|
11
11
|
* @returns {Array} - Array of actions that plop needs to perform
|
|
12
12
|
*/
|
|
13
13
|
exports.actionHandler = (data) => {
|
|
14
|
-
let { executionPath } = process.env;
|
|
15
14
|
let actions = [];
|
|
16
15
|
let fileName = '';
|
|
17
|
-
let componentType = '';
|
|
18
16
|
let folderName = '';
|
|
19
17
|
let testPath = '';
|
|
20
18
|
let numberOfVariations;
|
|
@@ -30,44 +28,52 @@ exports.actionHandler = (data) => {
|
|
|
30
28
|
{ 'global': true, 'path': `${testPath}/Vanalytics/analytics.js`, 'templateFile': `${TEMPLATE_DIR}/analytics.hbs`, variation },
|
|
31
29
|
{ 'global': false, 'path': `${folderName}/constants/index.js`, 'templateFile': `${TEMPLATE_DIR}/constants.hbs`, variation },
|
|
32
30
|
{ 'global': false, 'path': `${folderName}/scripts/app.js`, 'templateFile': `${TEMPLATE_DIR}/component.cb.hbs`, variation },
|
|
33
|
-
{ 'global': false, 'path': `${folderName}/css/style.scss`, 'templateFile': `${TEMPLATE_DIR}/style.hbs`, variation }
|
|
31
|
+
{ 'global': false, 'path': `${folderName}/css/style.scss`, 'templateFile': `${TEMPLATE_DIR}/style.hbs`, variation },
|
|
32
|
+
{ 'global': true, 'path': `${testPath}/shared/build.config.json`, 'templateFile': `${TEMPLATE_DIR}/build.config.hbs`, variation }
|
|
34
33
|
];
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
// Get the
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
// Get the activities path from environment variables (same approach as webpack config)
|
|
37
|
+
const PWD = process.env.executionPath || process.cwd();
|
|
38
|
+
console.log(`š Using ACTIVITIES_BASE_FOLDER directory: ${process.env.executionPath}`);
|
|
39
|
+
const ACTIVITIES_BASE_FOLDER = process.env.ACTIVITIES_BASE_FOLDER || 'Activities';
|
|
40
|
+
trackName = path.join(PWD, ACTIVITIES_BASE_FOLDER);
|
|
41
|
+
|
|
42
|
+
// Log the activities path for debugging
|
|
43
|
+
console.log(`š Using activities directory: ${trackName}`);
|
|
44
|
+
|
|
45
|
+
// Ensure the activities directory exists
|
|
46
|
+
if (!fs.existsSync(trackName)) {
|
|
47
|
+
fs.mkdirSync(trackName, { recursive: true });
|
|
48
|
+
console.log(`š Created activities directory: ${trackName}`);
|
|
49
|
+
}
|
|
40
50
|
|
|
41
51
|
// Convert the name to camel case
|
|
42
52
|
fileName = toCamelCase(name);
|
|
43
53
|
|
|
44
54
|
// Get the number of variations from the user
|
|
45
55
|
numberOfVariations = parseInt(variationName);
|
|
46
|
-
|
|
56
|
+
|
|
47
57
|
let constantMappingFile = null;
|
|
48
58
|
|
|
49
59
|
// If the user has provided track name and test name and variation name
|
|
50
60
|
if (trackName && testName && variationName) {
|
|
51
61
|
// Get the current year
|
|
52
|
-
let year = new Date().getFullYear();
|
|
53
|
-
// testPath = trackName + `/${year}/` + testName;
|
|
54
62
|
testPath = trackName + `/${testName}`;
|
|
55
63
|
// Get the constant mapping
|
|
56
64
|
constantMappingFile = assignConstants();
|
|
57
65
|
// Convert the name to pascal case
|
|
58
66
|
fileName = toPascalCase(name);
|
|
59
|
-
// Set the component type
|
|
60
|
-
componentType = TEMPLATE_TYPE_SUFFIX_CLASS_BASED;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
// Create actions for the global files
|
|
64
70
|
createActionObject(true);
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
|
|
67
73
|
|
|
68
74
|
// Loop through the number of variations provided by the user
|
|
69
75
|
let i = 1;
|
|
70
|
-
|
|
76
|
+
|
|
71
77
|
do {
|
|
72
78
|
// Get the variation name
|
|
73
79
|
let variation = "Variation-" + i;
|
|
@@ -111,9 +117,70 @@ exports.actionHandler = (data) => {
|
|
|
111
117
|
});
|
|
112
118
|
}
|
|
113
119
|
|
|
120
|
+
// Update .env file with the new activity name
|
|
121
|
+
updateEnvFile(testName);
|
|
114
122
|
|
|
123
|
+
// Show completion message
|
|
124
|
+
console.log(`\nš Activity "${testName}" created successfully!`);
|
|
125
|
+
console.log(`š Location: ${testPath}`);
|
|
126
|
+
console.log(`š Number of variations: ${numberOfVariations}`);
|
|
127
|
+
console.log(`š§ ACTIVITY_FOLDER_NAME updated in .env file`);
|
|
128
|
+
console.log(`\nš” Run "atb build" to build your activity`);
|
|
129
|
+
console.log(`š” Run "atb doctor" to check your configuration`);
|
|
115
130
|
|
|
116
131
|
// Return the actions
|
|
117
132
|
return actions;
|
|
118
133
|
}
|
|
119
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Updates the .env file with the new activity folder name
|
|
137
|
+
* @param {string} activityName - The name of the activity to set in ACTIVITY_FOLDER_NAME
|
|
138
|
+
*/
|
|
139
|
+
function updateEnvFile(activityName) {
|
|
140
|
+
const PWD = process.env.executionPath || process.cwd();
|
|
141
|
+
const envPath = path.join(PWD, '.env');
|
|
142
|
+
|
|
143
|
+
if (!fs.existsSync(envPath)) {
|
|
144
|
+
console.log('ā ļø .env file not found, skipping ACTIVITY_FOLDER_NAME update');
|
|
145
|
+
console.log('š” Run "atb init" to create .env file');
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!activityName || activityName.trim() === '') {
|
|
150
|
+
console.log('ā ļø Activity name is empty, skipping .env update');
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
// Read the current .env file
|
|
156
|
+
let envContent = fs.readFileSync(envPath, 'utf8');
|
|
157
|
+
|
|
158
|
+
// Clean activity name (remove quotes if present)
|
|
159
|
+
const cleanActivityName = activityName.trim().replace(/^["']|["']$/g, '');
|
|
160
|
+
|
|
161
|
+
// Update or add ACTIVITY_FOLDER_NAME
|
|
162
|
+
const activityFolderRegex = /^ACTIVITY_FOLDER_NAME=.*$/m;
|
|
163
|
+
const newLine = `ACTIVITY_FOLDER_NAME="${cleanActivityName}"`;
|
|
164
|
+
|
|
165
|
+
if (activityFolderRegex.test(envContent)) {
|
|
166
|
+
// Update existing line
|
|
167
|
+
envContent = envContent.replace(activityFolderRegex, newLine);
|
|
168
|
+
console.log(`ā
Updated ACTIVITY_FOLDER_NAME to "${cleanActivityName}" in .env file`);
|
|
169
|
+
} else {
|
|
170
|
+
// Add new line if it doesn't exist, ensure it ends with newline
|
|
171
|
+
if (!envContent.endsWith('\n')) {
|
|
172
|
+
envContent += '\n';
|
|
173
|
+
}
|
|
174
|
+
envContent += newLine;
|
|
175
|
+
console.log(`ā
Added ACTIVITY_FOLDER_NAME="${cleanActivityName}" to .env file`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Write the updated content back to .env file
|
|
179
|
+
fs.writeFileSync(envPath, envContent, 'utf8');
|
|
180
|
+
|
|
181
|
+
} catch (error) {
|
|
182
|
+
console.error(`ā Error updating .env file: ${error.message}`);
|
|
183
|
+
console.log('š” You may need to manually set ACTIVITY_FOLDER_NAME in your .env file');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
@@ -5,8 +5,16 @@
|
|
|
5
5
|
* Mutation observer initialize
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const observer = new MutationObserver(function (mutations) {
|
|
9
|
+
mutations.forEach(function (mutation) {
|
|
10
|
+
if (mutation.addedNodes.length) {
|
|
11
|
+
mutation.addedNodes.forEach(function (node) {
|
|
12
|
+
if (node.classList) {
|
|
13
|
+
// do something
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
10
18
|
});
|
|
11
19
|
|
|
12
20
|
// observing now
|
|
@@ -19,5 +27,7 @@
|
|
|
19
27
|
window.{{windowFlagName}} = true;
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
|
-
catch(err){
|
|
30
|
+
catch (err){
|
|
31
|
+
console.log(err);
|
|
32
|
+
}
|
|
23
33
|
}());
|
|
@@ -1,34 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
import { logger } from '../../../../.globals/services/logger';
|
|
3
|
-
import { GetDOMElement } from '../../../../.globals/services/domHandler'; --}}
|
|
4
|
-
{{!-- import * as CONSTANTS from '../constants'; --}}
|
|
1
|
+
// import * as CONSTANTS from '../constants';
|
|
5
2
|
|
|
6
3
|
export class App {
|
|
7
|
-
|
|
8
4
|
/**
|
|
9
|
-
* @param define constructor properties
|
|
5
|
+
* @param define constructor properties
|
|
10
6
|
*/
|
|
11
|
-
constructor(){
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
7
|
+
constructor() {
|
|
8
|
+
this.state = {}; // For managing app state
|
|
9
|
+
}
|
|
15
10
|
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
12
|
+
* Initializes the application, sets up observer and logs the event
|
|
18
13
|
*/
|
|
19
14
|
init = () => {
|
|
20
|
-
|
|
21
|
-
this.
|
|
15
|
+
this.isRunning = true;
|
|
16
|
+
this.onStart();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Starts the app or app-specific functionality
|
|
21
|
+
*/
|
|
22
|
+
onStart = () => {
|
|
23
|
+
// Additional initialization logic (e.g., setting up listeners, data fetching)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Reset the app to its initial state
|
|
28
|
+
*/
|
|
29
|
+
reset = () => {
|
|
30
|
+
this.state = {}; // Reset state
|
|
31
|
+
this.onStart(); // Optionally restart app functionality
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
/**
|
|
25
|
-
*
|
|
35
|
+
* Disconnect mutation observer , clear any window variable or perform cleanup activity
|
|
26
36
|
*/
|
|
27
|
-
destroy(){
|
|
28
|
-
|
|
37
|
+
destroy = () => {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Handles errors that occur within the app
|
|
42
|
+
* @param {string} message - Error message to log
|
|
43
|
+
* @param {Error} error - Optional error object
|
|
44
|
+
*/
|
|
45
|
+
handleError = (message, error = null) => {
|
|
46
|
+
// Additional error handling (e.g., sending error details to a server)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Logs app's current state
|
|
51
|
+
*/
|
|
52
|
+
logState = () => {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Sets or updates a property in the app's state
|
|
57
|
+
* @param {string} key - The key of the state property
|
|
58
|
+
* @param {any} value - The value to set
|
|
59
|
+
*/
|
|
60
|
+
setState = (key, value) => {
|
|
61
|
+
this.state[key] = value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Gets a property from the app's state
|
|
66
|
+
* @param {string} key - The key of the state property
|
|
67
|
+
* @returns {any} - The value of the state property
|
|
68
|
+
*/
|
|
69
|
+
getState = (key) => {
|
|
70
|
+
return this.state[key];
|
|
71
|
+
}
|
|
72
|
+
|
|
29
73
|
/**
|
|
30
74
|
* Mutation Observer Callback
|
|
31
75
|
*/
|
|
32
76
|
callback = () => {
|
|
77
|
+
// Callback logic for mutation observer
|
|
33
78
|
}
|
|
34
79
|
}
|
package/CustomWrapperPlugin.js
CHANGED
package/README.md
CHANGED
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/at-builder)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
A streamlined command-line tool for creating, building, and deploying Adobe Target A/B testing activities with modern web technologies.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## **šÆ Features**
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- šļø **Project Initialization**: Set up new projects with complete configuration
|
|
13
|
+
- šØ **Activity Templates**: Generate new activities with customizable variations
|
|
14
|
+
- ā” **Smart Building**: Development and production builds with hot reload
|
|
15
|
+
- š **Adobe Target Deployment**: Direct deployment to Adobe Target activities
|
|
16
|
+
- 𩺠**Health Diagnostics**: Automatic configuration validation and fixing
|
|
17
|
+
- š **Flexible Structure**: Configurable activities folder structure
|
|
18
|
+
- š§ **Environment Management**: Automatic .env file handling
|
|
19
|
+
- š» **Modern Toolchain**: TypeScript, Webpack, Babel, SCSS support
|
|
14
20
|
|
|
15
21
|
---
|
|
16
22
|
|
|
@@ -24,73 +30,244 @@ npm install -g at-builder
|
|
|
24
30
|
|
|
25
31
|
---
|
|
26
32
|
|
|
27
|
-
## **
|
|
33
|
+
## **š Quick Start**
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
1. **Initialize a new project:**
|
|
36
|
+
```bash
|
|
37
|
+
atb init
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. **Create a new activity:**
|
|
41
|
+
```bash
|
|
42
|
+
atb new
|
|
43
|
+
```
|
|
30
44
|
|
|
45
|
+
3. **Build your activity:**
|
|
31
46
|
```bash
|
|
32
|
-
atb
|
|
47
|
+
atb build
|
|
33
48
|
```
|
|
34
49
|
|
|
35
|
-
|
|
50
|
+
4. **Deploy to Adobe Target:**
|
|
51
|
+
```bash
|
|
52
|
+
atb deploy
|
|
53
|
+
```
|
|
36
54
|
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## **š Commands Reference**
|
|
58
|
+
|
|
59
|
+
### **Core Commands**
|
|
60
|
+
|
|
61
|
+
| Command | Description | Options |
|
|
62
|
+
|---------|-------------|---------|
|
|
63
|
+
| `atb init` | Initialize project with configuration files | |
|
|
64
|
+
| `atb new` | Create new Adobe Target activity with variations | |
|
|
65
|
+
| `atb build` | Build activity for development | `--prod` for production |
|
|
66
|
+
| `atb dev` | Start development server with file watching | `--browser` to open browser |
|
|
67
|
+
| `atb deploy` | Deploy activity to Adobe Target | `--dry-run` for testing |
|
|
68
|
+
| `atb doctor` | Diagnose and fix configuration issues | `--fix` to auto-fix |
|
|
39
69
|
|
|
40
70
|
### **Examples**
|
|
41
71
|
|
|
42
72
|
```bash
|
|
43
|
-
#
|
|
44
|
-
atb
|
|
73
|
+
# Initialize new project
|
|
74
|
+
atb init
|
|
75
|
+
|
|
76
|
+
# Create new activity
|
|
77
|
+
atb new
|
|
78
|
+
|
|
79
|
+
# Development build with hot reload
|
|
80
|
+
atb build
|
|
81
|
+
|
|
82
|
+
# Production build for Adobe Target
|
|
83
|
+
atb build --prod
|
|
84
|
+
|
|
85
|
+
# Development server with browser
|
|
86
|
+
atb dev --browser
|
|
45
87
|
|
|
46
|
-
#
|
|
47
|
-
atb
|
|
88
|
+
# Deploy to Adobe Target
|
|
89
|
+
atb deploy
|
|
48
90
|
|
|
49
|
-
#
|
|
50
|
-
atb
|
|
91
|
+
# Check project configuration
|
|
92
|
+
atb doctor
|
|
93
|
+
|
|
94
|
+
# Auto-fix configuration issues
|
|
95
|
+
atb doctor --fix
|
|
51
96
|
```
|
|
52
97
|
|
|
53
98
|
---
|
|
54
99
|
|
|
55
|
-
##
|
|
100
|
+
## **š§ Project Structure**
|
|
101
|
+
|
|
102
|
+
After initialization, your project will have:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
your-project/
|
|
106
|
+
āāā .env # Environment configuration
|
|
107
|
+
āāā adobe.config.js # Adobe Target API settings
|
|
108
|
+
āāā watch-config.json # Build configuration
|
|
109
|
+
āāā package.json # NPM configuration
|
|
110
|
+
āāā Activities/ # Your activities folder
|
|
111
|
+
āāā your-activity/ # Activity folder (auto-created)
|
|
112
|
+
āāā Variation-1/ # Test variations
|
|
113
|
+
ā āāā index.js # Entry point
|
|
114
|
+
ā āāā css/
|
|
115
|
+
ā ā āāā style.scss
|
|
116
|
+
ā āāā scripts/
|
|
117
|
+
ā ā āāā app.js
|
|
118
|
+
ā āāā constants/
|
|
119
|
+
ā āāā index.js
|
|
120
|
+
āāā Vanalytics/ # Analytics tracking
|
|
121
|
+
āāā shared/ # Shared configuration
|
|
122
|
+
```
|
|
56
123
|
|
|
57
|
-
|
|
124
|
+
---
|
|
58
125
|
|
|
59
|
-
|
|
60
|
-
- **Returns**: *(string)* - The version number of the package.
|
|
126
|
+
## **āļø Configuration**
|
|
61
127
|
|
|
62
|
-
|
|
128
|
+
### **Environment Variables (.env)**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Project Structure
|
|
132
|
+
ACTIVITIES_BASE_FOLDER="Activities"
|
|
133
|
+
ACTIVITY_FOLDER_NAME="your-activity-name"
|
|
134
|
+
|
|
135
|
+
# Development Settings
|
|
136
|
+
NODE_ENV="development"
|
|
137
|
+
PUPPETEER_LANDING_PAGE=""
|
|
138
|
+
TARGET_URL=""
|
|
139
|
+
LOGIN_URL=""
|
|
140
|
+
VARIATION="Variation-1"
|
|
141
|
+
|
|
142
|
+
# Adobe Target Deployment
|
|
143
|
+
ADOBE_CLIENT_ID="your-client-id"
|
|
144
|
+
ADOBE_CLIENT_SECRET="your-client-secret"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### **Adobe Target Configuration (adobe.config.js)**
|
|
63
148
|
|
|
64
149
|
```javascript
|
|
65
|
-
|
|
150
|
+
module.exports = {
|
|
151
|
+
BASE_URL: 'https://mc.adobe.io/target/activities/',
|
|
152
|
+
IMS_TOKEN_URL: 'https://ims-na1.adobelogin.com/ims/token/v1',
|
|
153
|
+
IMS_SCOPE: 'openid,target_sdk'
|
|
154
|
+
};
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## **š Workflow**
|
|
160
|
+
|
|
161
|
+
1. **Setup**: Run `atb init` to create project configuration
|
|
162
|
+
2. **Create**: Run `atb new` to generate activity templates
|
|
163
|
+
3. **Develop**: Modify variations in `/Activities/{name}/Variation-*/`
|
|
164
|
+
4. **Test**: Run `atb build` for development testing
|
|
165
|
+
5. **Build**: Run `atb build --prod` for production deployment
|
|
166
|
+
6. **Deploy**: Run `atb deploy` to deploy to Adobe Target
|
|
66
167
|
|
|
67
|
-
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## **𩺠Troubleshooting**
|
|
171
|
+
|
|
172
|
+
### **Health Check**
|
|
173
|
+
```bash
|
|
174
|
+
# Diagnose configuration issues
|
|
175
|
+
atb doctor
|
|
176
|
+
|
|
177
|
+
# Automatically fix issues
|
|
178
|
+
atb doctor --fix
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### **Common Issues**
|
|
182
|
+
|
|
183
|
+
- **Missing .env file**: Run `atb init` or `atb doctor --fix`
|
|
184
|
+
- **Build errors**: Check `ACTIVITY_FOLDER_NAME` in .env
|
|
185
|
+
- **Deploy failures**: Verify Adobe credentials in .env
|
|
186
|
+
- **Missing activity folder**: Create activity with `atb new`
|
|
187
|
+
|
|
188
|
+
## **šØ Advanced Configuration**
|
|
189
|
+
|
|
190
|
+
### **Custom Activities Folder**
|
|
191
|
+
|
|
192
|
+
You can customize the activities folder location:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Use a different activities folder
|
|
196
|
+
ACTIVITIES_BASE_FOLDER="MyActivities"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### **Build Scripts Integration**
|
|
200
|
+
|
|
201
|
+
Add to your project's package.json:
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"scripts": {
|
|
206
|
+
"build:target": "atb build --prod",
|
|
207
|
+
"deploy:target": "atb deploy",
|
|
208
|
+
"dev:target": "atb dev --browser"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
68
211
|
```
|
|
69
212
|
|
|
70
|
-
|
|
213
|
+
---
|
|
71
214
|
|
|
72
|
-
|
|
73
|
-
- **Returns**: *(string)* - The help information string.
|
|
215
|
+
## **š API Integration**
|
|
74
216
|
|
|
75
|
-
|
|
217
|
+
For programmatic usage:
|
|
76
218
|
|
|
77
219
|
```javascript
|
|
78
|
-
const { getHelpInfo } = require("at-builder");
|
|
220
|
+
const { getVersion, getHelpInfo } = require("at-builder");
|
|
221
|
+
|
|
222
|
+
// Get version
|
|
223
|
+
console.log(getVersion());
|
|
79
224
|
|
|
225
|
+
// Get help information
|
|
80
226
|
console.log(getHelpInfo());
|
|
81
|
-
// Outputs detailed help information for the CLI tool
|
|
82
227
|
```
|
|
83
228
|
|
|
84
229
|
---
|
|
85
230
|
|
|
86
|
-
## **
|
|
231
|
+
## **š¤ Contributing**
|
|
232
|
+
|
|
233
|
+
1. Fork the repository
|
|
234
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
235
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
236
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
237
|
+
5. Open a Pull Request
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## **š Changelog**
|
|
242
|
+
|
|
243
|
+
### v1.2.3
|
|
244
|
+
- ⨠Added `deploy` command for Adobe Target deployment
|
|
245
|
+
- 𩺠Added `doctor` command for configuration diagnostics
|
|
246
|
+
- š§ Automatic .env file updates when creating activities
|
|
247
|
+
- š Configurable activities folder structure
|
|
248
|
+
- ā” Improved environment variable validation
|
|
249
|
+
- š Enhanced error handling and user guidance
|
|
250
|
+
|
|
251
|
+
### Previous Versions
|
|
252
|
+
- v1.2.2: Build improvements and bug fixes
|
|
253
|
+
- v1.2.1: Enhanced CLI interface
|
|
254
|
+
- v1.2.0: Initial public release
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## **š License**
|
|
87
259
|
|
|
88
260
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
89
261
|
|
|
90
262
|
---
|
|
91
263
|
|
|
92
|
-
##
|
|
264
|
+
## **š Support**
|
|
265
|
+
|
|
266
|
+
- **Repository**: [https://github.com/upesenga/at-builder](https://github.com/upesenga/at-builder)
|
|
267
|
+
- **Issues**: [https://github.com/upesenga/at-builder/issues](https://github.com/upesenga/at-builder/issues)
|
|
268
|
+
- **Author**: Upendra Sengar
|
|
269
|
+
- **License**: MIT
|
|
93
270
|
|
|
94
|
-
|
|
271
|
+
---
|
|
95
272
|
|
|
96
|
-
|
|
273
|
+
**Made with ā¤ļø for Adobe Target developers**
|