@@ -10,7 +10,7 @@ const log = require('fancy-log');
10
10
11
11
//TODO: Add job to git clone and build the component packages to retrieve build artifacts.
12
12
13
- // Copy the inst directories for each of the component packages.
13
+ // Update the inst directories for each of the component packages.
14
14
function copyCoreInstDirectory ( ) {
15
15
if (
16
16
fs . existsSync (
@@ -53,7 +53,7 @@ function copyTableInstDirectory() {
53
53
}
54
54
}
55
55
56
- // Copy the man directories for each of the component packages.
56
+ // Update the man directories for each of the component packages.
57
57
function copyCoreManDirectory ( ) {
58
58
if (
59
59
fs . existsSync (
@@ -90,7 +90,7 @@ function copyTableManDirectory() {
90
90
}
91
91
}
92
92
93
- // Copy the R directories for each of the component packages.
93
+ // Update the R directories for each of the component packages.
94
94
function copyCoreRDirectory ( ) {
95
95
if ( fs . existsSync (
96
96
path . relative ( __dirname , 'gulp-assets/dash-core-components/R' )
@@ -143,16 +143,14 @@ function appendCoreNamespace() {
143
143
. toString ( )
144
144
. split ( '\n' ) ;
145
145
namespace . shift ( ) ;
146
+ namespace . unshift ( '# dashCoreComponents exports appended by `npm unify` command: do not edit by hand\n' )
146
147
namespace = namespace . join ( '\n' ) ;
147
- return src ( '. /NAMESPACE' )
148
+ return src ( 'gulp-assets /NAMESPACE.template ' )
148
149
. pipe ( print ( ) )
149
150
. pipe (
150
- footer (
151
- '# dashCoreComponents exports appended by `npm unify` command: do not edit by hand\n'
152
- )
151
+ replace ( "{dcc_exports}" , namespace )
153
152
)
154
- . pipe ( footer ( namespace ) )
155
- . pipe ( dest ( '.' , { overwrite : true } ) ) ;
153
+ . pipe ( dest ( './NAMESPACE' , { overwrite : true } ) ) ;
156
154
}
157
155
158
156
function appendHtmlNamespace ( ) {
@@ -161,16 +159,14 @@ function appendHtmlNamespace() {
161
159
. toString ( )
162
160
. split ( '\n' ) ;
163
161
namespace . shift ( ) ;
162
+ namespace . unshift ( '# dashHtmlComponents exports appended by `npm unify` command: do not edit by hand\n' )
164
163
namespace = namespace . join ( '\n' ) ;
165
164
return src ( './NAMESPACE' )
166
165
. pipe ( print ( ) )
167
166
. pipe (
168
- footer (
169
- '# dashHtmlComponents exports appended by `npm unify` command: do not edit by hand\n'
170
- )
167
+ replace ( "{html_exports}" , namespace )
171
168
)
172
- . pipe ( footer ( namespace ) )
173
- . pipe ( dest ( '.' , { overwrite : true } ) ) ;
169
+ . pipe ( dest ( './NAMESPACE' , { overwrite : true } ) ) ;
174
170
}
175
171
176
172
function appendTableNamespace ( ) {
@@ -179,57 +175,42 @@ function appendTableNamespace() {
179
175
. toString ( )
180
176
. split ( '\n' ) ;
181
177
namespace . shift ( ) ;
178
+ namespace . unshift ( '# dashTable exports appended by `npm unify` command: do not edit by hand\n' )
182
179
namespace = namespace . join ( '\n' ) ;
183
180
return src ( './NAMESPACE' )
184
181
. pipe ( print ( ) )
185
182
. pipe (
186
- footer (
187
- '# dashTable exports appended by `npm unify` command: do not edit by hand\n'
188
- )
183
+ replace ( "{table_exports}" , namespace )
189
184
)
190
- . pipe ( footer ( namespace ) )
191
- . pipe ( dest ( '.' , { overwrite : true } ) ) ;
185
+ . pipe ( dest ( './NAMESPACE' , { overwrite : true } ) ) ;
192
186
}
193
187
194
188
// Append the internal.R for each of the component packages to the DashR internal.R.
195
189
function appendCoreInternal ( ) {
196
- return src ( 'R /internal.R ' )
190
+ return src ( 'gulp-assets /internal.template ' )
197
191
. pipe ( print ( ) )
198
192
. pipe (
199
- footer (
200
- '# dashCoreComponents metadata appended by `npm unify` command\n'
201
- )
193
+ replace ( "{dcc_deps}" , fs . readFileSync ( 'gulp-assets/dash-core-components/R/internal.R' ) )
202
194
)
203
- . pipe (
204
- footer (
205
- fs . readFileSync ( 'gulp-assets/dash-core-components/R/internal.R' )
206
- )
207
- )
208
- . pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
195
+ . pipe ( dest ( 'R/internal.R' , { overwrite : true } ) ) ;
209
196
}
210
197
211
198
function appendHtmlInternal ( ) {
212
199
return src ( 'R/internal.R' )
213
200
. pipe ( print ( ) )
214
201
. pipe (
215
- footer (
216
- '# dashHtmlComponents metadata appended by `npm unify` command\n'
217
- )
202
+ replace ( "{html_deps}" , fs . readFileSync ( 'gulp-assets/dash-html-components/R/internal.R' ) )
218
203
)
219
- . pipe (
220
- footer (
221
- fs . readFileSync ( 'gulp-assets/dash-html-components/R/internal.R' )
222
- )
223
- )
224
- . pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
204
+ . pipe ( dest ( 'R/internal.R' , { overwrite : true } ) ) ;
225
205
}
226
206
227
207
function appendTableInternal ( ) {
228
208
return src ( 'R/internal.R' )
229
209
. pipe ( print ( ) )
230
- . pipe ( footer ( '# dashTable metadata appended by `npm unify` command\n' ) )
231
- . pipe ( footer ( fs . readFileSync ( 'gulp-assets/dash-table/R/internal.R' ) ) )
232
- . pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
210
+ . pipe (
211
+ replace ( "{table_deps}" , fs . readFileSync ( 'gulp-assets/dash-table/R/internal.R' ) )
212
+ )
213
+ . pipe ( dest ( 'R/internal.R' , { overwrite : true } ) ) ;
233
214
}
234
215
235
216
@@ -251,5 +232,3 @@ exports.updateNamespace = series(
251
232
appendHtmlInternal ,
252
233
appendTableInternal
253
234
) ;
254
-
255
- exports . test = series ( copyCoreInstDirectory ) ;
0 commit comments