mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c64503e0bf
This includes a `genrule` to create the generated `ExampleModule`
21 lines
678 B
TypeScript
21 lines
678 B
TypeScript
import {sync as glob} from 'glob';
|
|
import {task} from 'gulp';
|
|
import {buildConfig} from 'material2-build-tools';
|
|
import * as path from 'path';
|
|
import {generateExampleModule} from '../../example-module/generate-example-module';
|
|
|
|
const {packagesDir} = buildConfig;
|
|
|
|
/** Path to find the examples */
|
|
const examplesPath = path.join(packagesDir, 'material-examples');
|
|
|
|
/** Output path of the module that is being created */
|
|
const outputModuleFilename = path.join(examplesPath, 'example-module.ts');
|
|
|
|
/**
|
|
* Creates the examples module and metadata
|
|
*/
|
|
task('build-examples-module', () => {
|
|
generateExampleModule(glob(path.join(examplesPath, '**/*.ts')), outputModuleFilename);
|
|
});
|