本文整理汇总了TypeScript中grunt.initConfig函数的典型用法代码示例。如果您正苦于以下问题:TypeScript initConfig函数的具体用法?TypeScript initConfig怎么用?TypeScript initConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了initConfig函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: getOutputDirectory
getOutputDirectory, loadTasks, unloadTasks, runGruntTask, prepareOutputDirectory,
cleanOutputDirectory
} from '../util';
const outputPath = getOutputDirectory();
const cwd = process.cwd();
let symlink: SinonStub;
let shell: SinonStub = stub();
let run: SinonStub;
registerSuite({
name: 'tasks/link',
setup() {
grunt.initConfig({
distDirectory: outputPath
});
symlink = stub(fs, 'symlink');
shell.withArgs(
'npm link',
{
cwd: outputPath
}
).returns(
Promise.resolve({
stdout: ''
})
);
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:30,代码来源:link.ts
示例2: beforeEach
beforeEach() {
grunt.initConfig({
apiDocDirectory,
apiPubDirectory,
tsconfig: {
compilerOptions: {
inlineSourceMap: true,
inlineSources: true,
listFiles: true,
module: 'commonjs',
noImplicitAny: true,
pretty: true,
target: 'es5'
}
},
typedoc: {
options: {
mode: 'modules',
excludeExternals: true,
excludeNotExported: true,
tsconfig: tsconfigPath,
logger: 'none',
publishOptions: {
subDirectory: 'api',
publishMode: publishModeStub
}
}
}
});
write.reset();
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:31,代码来源:typedoc.ts
示例3: require
import * as registerSuite from 'intern!object';
import * as assert from 'intern/chai!assert';
import * as grunt from 'grunt';
import { loadTasks, unloadTasks, runGruntTask } from '../util';
import Test = require("intern/lib/Test");
let fakeRepl: any = {};
const fakeDojoRequire = function () {
};
registerSuite({
name: 'tasks/repl',
setup() {
grunt.initConfig({});
loadTasks({
repl: {
start() {
return {
context: fakeRepl
};
}
},
'../lib/load-dojo-loader': {
default() {
return {
baseUrl: './base-url',
packages: [
{
name: 'package-1'
}
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:31,代码来源:repl.ts
示例4: getInputDirectory
import * as registerSuite from 'intern!object';
import * as assert from 'intern/chai!assert';
import * as grunt from 'grunt';
import {
getInputDirectory, loadTasks, prepareInputDirectory, unloadTasks, cleanInputDirectory,
createDummyFile, runGruntTask, fileExistsInInputDirectory
} from '../util';
const inputDirectory = getInputDirectory();
registerSuite({
name: 'tasks/fixSourceMaps',
setup() {
grunt.initConfig({
distDirectory: inputDirectory
});
loadTasks();
prepareInputDirectory();
},
teardown() {
unloadTasks();
cleanInputDirectory();
},
sourcMaps() {
createDummyFile('test/sourcemap.js.map', JSON.stringify(
{
"version": 3,
"file": "global.js",
"sourceRoot": "",
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:31,代码来源:fixSourceMaps.ts
示例5: getInputDirectory
createDummyDirectory,
fileExistsInInputDirectory,
fileExistsInOutputDirectory, cleanInputDirectory, cleanOutputDirectory
} from '../util';
const inputDirectory = getInputDirectory();
const outputPath = getOutputDirectory();
registerSuite({
name: 'tasks/rename',
setup() {
grunt.initConfig({
rename: {
textFiles: {
expand: true,
cwd: inputDirectory,
src: ['**/*.txt'],
dest: outputPath
}
}
});
loadTasks();
},
teardown() {
unloadTasks();
},
basic: {
beforeEach() {
prepareInputDirectory();
prepareOutputDirectory();
},
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:32,代码来源:rename.ts
示例6: unloadTasks
unloadTasks();
cleanOutputDirectory();
},
beforeEach() {
grunt.initConfig({
distDirectory: outputPath,
tsconfig: {
"compilerOptions": {
"inlineSourceMap": true,
"inlineSources": true,
"listFiles": true,
"module": "commonjs",
"noImplicitAny": true,
"pretty": true,
"target": "es6"
}
},
ts: {
custom: {
compilerOptions: {
target: 'custom'
}
}
}
});
run.reset();
write.reset();
},
开发者ID:dylans,项目名称:grunt-dojo2,代码行数:30,代码来源:ts.ts
注:本文中的grunt.initConfig函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论