Skip to content

Commit b7d10a8

Browse files
committed
remove "app" from rollup config name
1 parent b80287a commit b7d10a8

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed
File renamed without changes.

src/bundle.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export function bundleApp(context?: BuildContext): Promise<any> {
2727
context = generateContext(context);
2828
fillConfigDefaults(context, BUNDLE_APP_TASK_INFO);
2929

30-
if (!context.rollupAppConfig.dest) {
31-
context.rollupAppConfig.dest = join(context.buildDir, 'main.es6.js');
30+
if (!context.rollupConfig.dest) {
31+
context.rollupConfig.dest = join(context.buildDir, 'main.es6.js');
3232
}
3333

3434
// bundle the app then create create css
35-
return rollup(context.rollupAppConfig).then((bundle: RollupBundle) => {
35+
return rollup(context.rollupConfig).then((bundle: RollupBundle) => {
3636

3737
// set the module files used in this bundle
3838
// this reference can be used elsewhere in the build (sass)
@@ -43,7 +43,7 @@ export function bundleApp(context?: BuildContext): Promise<any> {
4343
setModulePathsCache(context.moduleFiles);
4444

4545
// write the bundle
46-
return bundle.write(context.rollupAppConfig);
46+
return bundle.write(context.rollupConfig);
4747
});
4848
}
4949

@@ -76,7 +76,9 @@ export function getModulePathsCache(): string[] {
7676
function setModulePathsCache(modulePaths: string[]) {
7777
// async save the module paths for later lookup
7878
outputJson(getCachePath(), modulePaths, (err) => {
79-
Logger.error(`Error writing module paths cache: ${err}`);
79+
if (err) {
80+
Logger.error(`Error writing module paths cache: ${err}`);
81+
}
8082
});
8183
}
8284

@@ -91,10 +93,10 @@ function getCachePath(): string {
9193
}
9294

9395
const BUNDLE_APP_TASK_INFO: TaskInfo = {
94-
contextProperty: 'rollupAppConfig',
95-
fullArgOption: '--rollupApp',
96-
shortArgOption: '-b',
97-
defaultConfigFilename: 'rollup.app.config'
96+
contextProperty: 'rollupConfig',
97+
fullArgOption: '--rollup',
98+
shortArgOption: '-r',
99+
defaultConfigFilename: 'rollup.config'
98100
};
99101

100102
const BUNDLE_POLYFILL_TASK_INFO: TaskInfo = {

src/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface BuildContext {
77
buildDir?: string;
88
configDir?: string;
99

10-
rollupAppConfig?: RollupConfig;
10+
rollupConfig?: RollupConfig;
1111
rollupPolyfillConfig?: RollupConfig;
1212
cleancssConfig?: CleanCssConfig;
1313
copyConfig?: CopyConfig;

0 commit comments

Comments
 (0)