File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ function run {
3838 ./node_modules/.bin/gulp docs.dgeni --doc-version=" $VERSION_NAME "
3939 ./node_modules/.bin/gulp docs.dgeni --doc-version=" nightly"
4040
41+ ./node_modules/.bin/gulp docs.homepageVersionUpdate
42+
4143 else
4244
4345 if [ -d " $DOCS_DEST /nightly/api" ]; then
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export const ES_2015 = 'es2015';
1717export const ES5 = 'es5' ;
1818export const INDEX_JS = 'index.js' ;
1919export const BUNDLES = 'bundles' ;
20+ export const SITE_NAME = 'ionic-site' ;
2021
2122// File Paths
2223export const PROJECT_ROOT = join ( __dirname , '../..' ) ;
@@ -36,6 +37,7 @@ export const DIST_VENDOR_ROOT = join(DIST_ROOT, VENDOR_NAME);
3637export const NODE_MODULES_ROOT = join ( PROJECT_ROOT , NODE_MODULES ) ;
3738export const SCRIPTS_ROOT = join ( PROJECT_ROOT , SCRIPTS_NAME ) ;
3839export const SRC_ROOT = join ( PROJECT_ROOT , SRC_NAME ) ;
40+ export const SITE_ROOT = join ( PROJECT_ROOT , '..' , SITE_NAME ) ;
3941
4042export const SRC_COMPONENTS_ROOT = join ( SRC_ROOT , COMPONENTS_NAME ) ;
4143export const WORKERS_SRC = join ( SCRIPTS_ROOT , 'workers' ) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { valid }from 'semver';
1010import { argv } from 'yargs' ;
1111
1212import { DIST_DEMOS_ROOT } from '../constants' ;
13+ import { SITE_ROOT } from '../constants' ;
14+ import { PROJECT_ROOT } from '../constants' ;
1315
1416task ( 'docs' , [ 'docs.dgeni' , 'docs.demos' , 'docs.sassVariables' ] ) ;
1517
@@ -136,3 +138,16 @@ task('docs.sassVariables', () => {
136138 writeFileSync ( outputFile , JSON . stringify ( variables ) ) ;
137139 } ) ) ;
138140} ) ;
141+
142+ task ( 'docs.homepageVersionUpdate' , ( ) => {
143+ // This assumes you're currently releasing
144+ const sourcePackageJSON = require ( `${ PROJECT_ROOT } /package.json` ) ;
145+ let now = new Date ( ) ;
146+
147+ const frameworkInfo = JSON . stringify ( {
148+ version : sourcePackageJSON . version ,
149+ date : now . toISOString ( ) . split ( 'T' ) [ 0 ]
150+ } , null , 2 ) ;
151+
152+ writeFileSync ( `${ SITE_ROOT } /server/data/framework-info.json` , frameworkInfo ) ;
153+ } ) ;
You can’t perform that action at this time.
0 commit comments