Skip to content

Commit 94d6e14

Browse files
committed
removes webpack build from command, use ng build instead!
1 parent df45471 commit 94d6e14

File tree

2 files changed

+6
-63
lines changed

2 files changed

+6
-63
lines changed

README.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ npm install angular-cli-ghpages --save-dev
3838

3939
## Usage
4040

41-
Execute `ng ghpages` in order to deploy the project with a `production` build.
41+
Execute `ng ghpages` in order to deploy the project with a build from `dist` folder.
42+
Note: you have to create the folder in before (e.g. `ng build --prod`)
4243

4344
Usage:
4445

@@ -95,33 +96,8 @@ Suppress logging. With silent `true` log messages are suppressed and error messa
9596
* default: `dist`
9697

9798
Directory for all published sources, relative to the project-root.
98-
Most probably no change is required here, useful together with --skip-build.
99+
Most probably no change is required here.
99100
This option can be used to deploy completely different folders, which are note related at all to angular.
100-
(Hint: usual angular-cli config is ignored here!)
101-
102-
AND ALSO: Output path for the build, if a build is done.
103-
104-
#### <a id="target">--target</a>
105-
* optional
106-
* default: `production`
107-
* alias: `t`
108-
109-
Build target (`development` or `production`), see [Build Targets and Environment Files](https://github.com/angular/angular-cli/#build-targets-and-environment-files).
110-
111-
112-
#### <a id="environment">--environment</a>
113-
* optional
114-
* default: `prod`
115-
* alias: `e`
116-
117-
Environment file to be used with that build (`dev`, `prod` or own), see [Build Targets and Environment Files](https://github.com/angular/angular-cli/#build-targets-and-environment-files).
118-
119-
120-
#### <a id="skip-build">--skip-build</a>
121-
* optional
122-
* default: `false` (boolean)
123-
124-
Skip building the project before deploying, useful together with --dir.
125101

126102

127103

deploy.js

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,6 @@ module.exports = Command.extend({
5555
type: String,
5656
default: 'dist',
5757
description: 'Directory for all published sources, relative to the project-root. Most probably no change is required here.'
58-
}, {
59-
name: 'target',
60-
type: String,
61-
default: 'production',
62-
aliases: ['t', { 'dev': 'development' }, { 'prod': 'production' }],
63-
description: 'Build target (`development` or `production`)'
64-
}, {
65-
name: 'environment',
66-
type: String,
67-
default: 'prod',
68-
aliases: ['e'],
69-
description: 'Environment file to be used with that build (`dev`, `prod` or own)'
70-
}, {
71-
name: 'skip-build',
72-
type: Boolean,
73-
default: false,
74-
description: 'Skip building the project before deploying, useful together with --dir'
7558
}, {
7659
name: 'dotfiles',
7760
type: Boolean,
@@ -95,21 +78,6 @@ module.exports = Command.extend({
9578
// gh-pages: forwards messages to ui
9679
options.logger = function(message) { ui.write(message + "\n"); }
9780

98-
var buildTask = new WebpackBuild.default({
99-
ui: this.ui,
100-
analytics: this.analytics,
101-
cliProject: this.project,
102-
target: options.target,
103-
environment: options.environment,
104-
outputPath: dir
105-
});
106-
107-
var buildOptions = {
108-
target: options.target,
109-
environment: options.environment,
110-
outputPath: dir
111-
};
112-
11381
if (process.env.TRAVIS) {
11482
options.message += '\n\n' +
11583
'Triggered by commit: https://github.com/' + process.env.TRAVIS_REPO_SLUG + '/commit/' + process.env.TRAVIS_COMMIT + '\n' +
@@ -128,12 +96,11 @@ module.exports = Command.extend({
12896
var access = publish = Promise.denodeify(fs.access);
12997
var publish = Promise.denodeify(ghpages.publish);
13098

131-
function build() {
132-
if (options.skipBuild) return Promise.resolve();
133-
return buildTask.run(buildOptions);
99+
function go() {
100+
return Promise.resolve();
134101
}
135102

136-
return build()
103+
return go()
137104
.then(function() {
138105
return access(dir, fs.F_OK)
139106
})

0 commit comments

Comments
 (0)