Skip to content

aio: remove gulp tasks #14889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 5, 2017
Merged

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Mar 2, 2017

This is built upon #14868. Only the last commit is specific to this PR.

Closes #14921

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CI is failing

@@ -1,4 +1,7 @@
import { LinkDirective } from './link.directive';

describe('LinkDirective', () => {
xdescribe('LinkDirective', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use xdescribe simply remove the second argument from all nested its and you'll get the same effect but the its will be marked as pending rather than disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bug in zone.js. See my other comment

});

xit('should fetch the navigation views', () => {});
xit('should compute the navigation map', () => {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just remove the second arg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IgorMinar It doesn't work because there is a bug in zone.js:

  /**
   * Gets a function wrapping the body of a Jasmine `it/beforeEach/afterEach` block to
   * execute in a ProxyZone zone.
   * This will run in `testProxyZone`. The `testProxyZone` will be reset by the `ZoneQueueRunner`
   */
  function wrapTestInZone(testBody: Function): Function {
    // The `done` callback is only passed through if the function expects at least one argument.
    // Note we have to make a function with correct number of arguments, otherwise jasmine will
    // think that all functions are sync or async.
    return (testBody.length == 0) ? function() {
      return testProxyZone.run(testBody, this);
    } : function(done) {
      return testProxyZone.run(testBody, this, [done]);
    };
  }

Note that it doesn't check to see if the function body is defined before reading its length.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR for it: angular/zone.js#659
But the zone.js project has problems of its own :-(

aio/package.json Outdated
"lint": "yarn run check-env && ng lint",
"ng": "yarn check-env && ng",
"start": "yarn check-env && ng serve",
"build": "yarn check-env && yarn docs && ng build -prod -aot -sm",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • -aot the default

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with single dashes? I thought you needed double dash for non-shortcut options.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have separate yarn scripts for dev build vs prod build? Or do we always want the prod build?

Copy link
Contributor Author

@petebacondarwin petebacondarwin Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we "build" a dev version?
If I am doing development work then I use "ng serve"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point taken 😃

aio/package.json Outdated
"pre~~deploy": "yarn run check-env && ng build --prod",
"e2e": "yarn check-env && ng e2e --no-webdriver-update",
"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn ~~deploy",
"pre~~deploy": "yarn check-env && ng build --prod",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it --prod or -prod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the Angular CLI help usage:

--target (String) (Default: development) Defines the build target.
    aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>, --target <value>

So it appears to be -prod. I'll fix this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The search results indicate otherwise: --prod vs -prod
Could it be a typo in the help message?

aio/check-env.js Outdated
requiredNodeVersion: engines.node,
requiredNpmVersion: engines.npm,
requiredYarnVersion: engines.yarn
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a separate check-env.js?
Is it so that we don't rely on stuff outside the aio/ directory?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I would prefer if such scripts were not on the root-level. We already have a scripts/ directory 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have a scripts folder in aio/.
I am cool with moving this to the top level folder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. We don't have right now. But we will have one when #14330 lands 😉

aio/package.json Outdated
"lint": "yarn run check-env && ng lint",
"ng": "yarn check-env && ng",
"start": "yarn check-env && ng serve",
"build": "yarn check-env && yarn docs && ng build -prod -aot -sm",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with single dashes? I thought you needed double dash for non-shortcut options.

aio/package.json Outdated
"lint": "yarn run check-env && ng lint",
"ng": "yarn check-env && ng",
"start": "yarn check-env && ng serve",
"build": "yarn check-env && yarn docs && ng build -prod -aot -sm",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have separate yarn scripts for dev build vs prod build? Or do we always want the prod build?

"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn run ~~deploy",
"pre~~deploy": "yarn run check-env && ng build --prod",
"e2e": "yarn check-env && ng e2e --no-webdriver-update",
"deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn ~~deploy",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! We don't need run anymore with yarn? 🕺

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is something that yarn really got right!

@petebacondarwin petebacondarwin force-pushed the aio-remove-gulp branch 2 times, most recently from 801ce6b to 9f68109 Compare March 3, 2017 11:19
@petebacondarwin
Copy link
Contributor Author

Addressed all comments, rebased on master, aio tasks in the Travis build now pass.

@IgorMinar
Copy link
Contributor

@petebacondarwin I rebased your PR and pushed to your branch. I'm about to merge this in if CI passes, so please do not make more changes in this branch

@IgorMinar IgorMinar added the action: merge The PR is ready for merge by the caretaker label Mar 5, 2017
@IgorMinar IgorMinar merged commit 00fdcf4 into angular:master Mar 5, 2017
@petebacondarwin petebacondarwin deleted the aio-remove-gulp branch March 13, 2017 20:14
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move all the gulp tasks to yarn
4 participants