@@ -65,66 +65,6 @@ gulp.task("overwrite-package-json", (done) => {
6565 done ( ) ;
6666} ) ;
6767
68- const createPrependerdLobStructure = ( cb ) => {
69- const folders = [
70- './dist/app-lob/samples' ,
71- './dist/app-lob/samples/grid' ,
72- './dist/app-lob/samples/tree-grid' ,
73- './dist/app-lob/samples/grid-finjs-dock-manager' ,
74- './dist/app-lob/samples/hierarchical-grid' ,
75- './dist/app-lob/grid' ,
76- './dist/app-lob/tree-grid' ,
77- './dist/app-lob/grid-finjs-dock-manager' ,
78- './dist/app-lob/hierarchical-grid'
79- ] ;
80- folders . forEach ( dir => {
81- if ( ! fs . existsSync ( dir ) ) {
82- fs . mkdirSync ( dir ) ;
83- }
84- } ) ;
85- cb ( ) ;
86- }
87-
88- const addPrerenderedLobPages = ( cb ) => {
89- const { metadata } = require ( './projects/app-lob/src/app/metadata' ) ;
90- const indexFilePath = path . resolve ( __dirname , './' , 'dist/app-lob/browser' , 'index.html' ) ;
91-
92- // read in the index.html file
93- fs . readFile ( indexFilePath , 'utf8' , function ( err , data ) {
94- if ( err ) {
95- return console . error ( err ) ;
96- }
97-
98- metadata . forEach ( ( { url, title, description, og_url, folder } ) => {
99- let result = data ;
100- result = result . replace ( / \$ O G _ T I T L E / g, title ) ;
101- result = result . replace ( / \$ O G _ D E S C R I P T I O N / g, description ) ;
102- result = result . replace ( / \$ O G _ U R L / g, og_url ) ;
103-
104- let filename = url . substring ( 1 ) . replace ( / \/ / g, '-' ) ;
105- if ( filename . length ) {
106- filename = filename + '.html' ;
107- } else {
108- filename = 'index.html' ;
109- }
110-
111- fs . writeFile ( path . resolve ( __dirname , './' , './dist/app-lob/samples/' + folder , filename ) , result , ( err ) => {
112- if ( err ) {
113- console . log ( err ) ;
114- }
115- } ) ;
116- fs . writeFile ( path . resolve ( __dirname , './' , './dist/app-lob/' + folder , filename ) , result , ( err ) => {
117- if ( err ) {
118- console . log ( err ) ;
119- }
120- } ) ;
121- } )
122- } )
123- cb ( ) ;
124- }
125-
126- exports . prerenderPages = gulp . series ( createPrependerdLobStructure , addPrerenderedLobPages ) ;
127-
12868gulp . task ( "watch-live-editing" , gulp . series ( "generate-live-editing" , ( ) => {
12969 gulp . watch ( [ "./src/**/*.*" , "!./src/assets/**" , "./live-editing/**/*.*" , "package.json" ] , function ( ) {
13070 Object . keys ( require . cache ) . forEach ( function ( key ) {
0 commit comments