1
1
const { dest, parallel, series, src} = require ( 'gulp' ) ;
2
2
const print = require ( 'gulp-print' ) . default ;
3
- const fs = require ( 'fs-extra' ) ;
4
3
const replace = require ( 'gulp-replace' ) ;
4
+ const rename = require ( 'gulp-rename' ) ;
5
+ const concat = require ( "gulp-concat" )
6
+ const fs = require ( 'fs-extra' ) ;
5
7
const path = require ( 'path' ) ;
6
8
const log = require ( 'fancy-log' ) ;
7
- const rename = require ( 'gulp-rename' ) ;
8
9
const shell = require ( 'shelljs' ) ;
9
10
10
11
// Task to git clone and build the component packages to retrieve build artifacts.
@@ -127,6 +128,7 @@ function copyCoreRDirectory() {
127
128
'!gulp-assets/dash-core-components/R/internal.R' ,
128
129
] )
129
130
. pipe ( print ( ) )
131
+ . pipe ( concat ( 'dashCoreComponents.R' ) )
130
132
. pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
131
133
}
132
134
return log ( 'Unable to find dash-core-components `R` directory.' ) ;
@@ -143,6 +145,7 @@ function copyHtmlRDirectory() {
143
145
'!gulp-assets/dash-html-components/R/internal.R' ,
144
146
] )
145
147
. pipe ( print ( ) )
148
+ . pipe ( concat ( 'dashHtmlComponents.R' ) )
146
149
. pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
147
150
}
148
151
return log ( 'Unable to find dash-html-components `R` directory.' ) ;
@@ -155,60 +158,10 @@ function copyTableRDirectory() {
155
158
'!gulp-assets/dash-table/R/internal.R' ,
156
159
] )
157
160
. pipe ( print ( ) )
161
+ . pipe ( concat ( 'dashTable.R' ) )
158
162
. pipe ( dest ( 'R/' , { overwrite : true } ) ) ;
159
163
}
160
- return log ( 'Unable to find dash-core-components `R` directory.' ) ;
161
- }
162
-
163
- // Append the NAMESPACE for each of the component packages to the DashR NAMESPACE.
164
- function appendCoreNamespace ( ) {
165
- var namespace = fs
166
- . readFileSync ( 'gulp-assets/dash-core-components/NAMESPACE' )
167
- . toString ( )
168
- . split ( '\n' ) ;
169
- namespace . shift ( ) ;
170
- namespace . unshift (
171
- '# dashCoreComponents exports appended by `npm unify` command: do not edit by hand'
172
- ) ;
173
- namespace = namespace . join ( '\n' ) ;
174
- return src ( 'gulp-assets/NAMESPACE.template' )
175
- . pipe ( print ( ) )
176
- . pipe ( replace ( '{dcc_exports}' , namespace ) )
177
- . pipe ( rename ( 'NAMESPACE' ) )
178
- . pipe ( dest ( './' , { overwrite : true } ) ) ;
179
- }
180
-
181
- function appendHtmlNamespace ( ) {
182
- var namespace = fs
183
- . readFileSync ( 'gulp-assets/dash-html-components/NAMESPACE' )
184
- . toString ( )
185
- . split ( '\n' ) ;
186
- namespace . shift ( ) ;
187
- namespace . unshift (
188
- '# dashHtmlComponents exports appended by `npm unify` command: do not edit by hand'
189
- ) ;
190
- namespace = namespace . join ( '\n' ) ;
191
- return src ( './NAMESPACE' )
192
- . pipe ( print ( ) )
193
- . pipe ( replace ( '{html_exports}' , namespace ) )
194
- . pipe ( dest ( './' , { overwrite : true } ) ) ;
195
- }
196
-
197
- function appendTableNamespace ( ) {
198
- var namespace = fs
199
- . readFileSync ( 'gulp-assets/dash-table/NAMESPACE' )
200
- . toString ( )
201
- . split ( '\n' ) ;
202
- namespace . shift ( ) ;
203
- namespace . push ( 'export(df_to_list)' ) ;
204
- namespace . unshift (
205
- '# dashTable exports appended by `npm unify` command: do not edit by hand'
206
- ) ;
207
- namespace = namespace . join ( '\n' ) ;
208
- return src ( './NAMESPACE' )
209
- . pipe ( print ( ) )
210
- . pipe ( replace ( '{table_exports}' , namespace ) )
211
- . pipe ( dest ( './' , { overwrite : true } ) ) ;
164
+ return log ( 'Unable to find dash-table `R` directory.' ) ;
212
165
}
213
166
214
167
// Append the internal.R for each of the component packages to the DashR internal.R.
@@ -284,9 +237,6 @@ exports.unify = series(
284
237
) ;
285
238
286
239
exports . update = series (
287
- appendCoreNamespace ,
288
- appendHtmlNamespace ,
289
- appendTableNamespace ,
290
240
appendCoreInternal ,
291
241
appendHtmlInternal ,
292
242
appendTableInternal ,
0 commit comments