本文整理汇总了TypeScript中m2e-build-tools.m2ePackages类的典型用法代码示例。如果您正苦于以下问题:TypeScript m2ePackages类的具体用法?TypeScript m2ePackages怎么用?TypeScript m2ePackages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了m2ePackages类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: task
task('aot:copy-release', () => {
m2ePackages.forEach((p) => {
copySync(join(releasesDir, `${p}`), join(demoAppOut, `${p}`));
});
});
开发者ID:gnucoop,项目名称:material2-extra,代码行数:5,代码来源:aot.ts
示例2: require
import {join} from 'path';
import {task, watch} from 'gulp';
import {m2ePackages, buildConfig, sequenceTask} from 'm2e-build-tools';
// There are no type definitions available for these imports.
const runSequence = require('run-sequence');
const {packagesDir, projectDir} = buildConfig;
/** Builds everything that is necessary for karma. */
task(':test:build', sequenceTask(
'clean',
// Build ESM output of M2E that also includes all test files.
...m2ePackages.map((p) => `${p}:build-tests`),
));
/**
* Runs the unit tests. Does not watch for changes.
* This task should be used when running tests on the CI server.
*/
task('test:single-run', [':test:build'], (done: () => void) => {
// Load karma not outside. Karma pollutes Promise with a different implementation.
let karma = require('karma');
new karma.Server({
configFile: join(projectDir, 'test/karma.conf.js'),
singleRun: true
}, (exitCode: number) => {
// Immediately exit the process if Karma reported errors, because due to
// potential still running tunnel-browsers gulp won't exit properly.
exitCode === 0 ? done() : process.exit(exitCode);
开发者ID:gnucoop,项目名称:material2-extra,代码行数:31,代码来源:unit-test.ts
示例3: require
import {m2ePackages, buildConfig, sequenceTask} from 'm2e-build-tools';
import {default as chalk} from 'chalk';
// These types lack of type definitions
const madge = require('madge');
/** Glob that matches all SCSS or CSS files that should be linted. */
const stylesGlob = '+(tools|src)/**/*.+(css|scss)';
/** List of flags that will passed to the different TSLint tasks. */
const tsLintBaseFlags = [
'-c', 'tslint.json', '+(src|e2e|tools)/**/*.ts', '--exclude', '**/node_modules/**/*'
];
/** Path to the output of the Material package. */
const m2eOutPaths = m2ePackages.map((p) => join(buildConfig.outputDir, 'packages', `${p}`));
task('lint', ['tslint', 'stylelint', 'madge']);
/** Task to lint Angular Material's scss stylesheets. */
task('stylelint', execNodeTask(
'stylelint', [stylesGlob, '--config', 'stylelint-config.json', '--syntax', 'scss']
));
/** Task to run TSLint against the e2e/ and src/ directories. */
task('tslint', execNodeTask('tslint', tsLintBaseFlags));
/** Task that automatically fixes TSLint warnings. */
task('tslint:fix', execNodeTask(
'tslint', [...tsLintBaseFlags, '--fix'])
);
开发者ID:gnucoop,项目名称:material2-extra,代码行数:31,代码来源:lint.ts
示例4: require
import {writeFileSync, mkdirpSync} from 'fs-extra';
import {Bundler} from 'scss-bundle';
import {m2ePackages, composeRelease, buildConfig, sequenceTask} from 'm2e-build-tools';
import {calendarPackage, masonryPackage} from '../packages';
import {execTask} from '../util/task_helpers';
// There are no type definitions available for these imports.
const gulpRename = require('gulp-rename');
const {packagesDir, outputDir} = buildConfig;
/** Path to the directory where all releases are created. */
const releasesDir = join(outputDir, 'releases');
/** Path to the output of the Ajf packages. */
const m2eOutputPaths = m2ePackages.map((p) => join(outputDir, 'packages', `${p}`));
// Path to the sources of the Ajf package.
const m2ePaths = m2ePackages.map((p) => join(packagesDir, `${p}`));
// Path to the release output of m2e.
const releasePaths = m2ePackages.map((p) => join(releasesDir, `${p}`));
// Matches all SCSS files in the library.
const allScssGlobs = m2ePaths.map((p) => join(p, '**/*.scss'));
[calendarPackage, masonryPackage].forEach((p) => {
task(`m2e-${p.name}:build-release`, () => composeRelease(p));
});
/**
* Overwrite the release task for the m2e package.
*/
task('m2e:build-release', ['m2e:prepare-release'], sequenceTask(
开发者ID:gnucoop,项目名称:material2-extra,代码行数:31,代码来源:material2-extra-release.ts
注:本文中的m2e-build-tools.m2ePackages类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论