Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 21c34f7

Browse files
ThomasBurlesonandrewseguin
authored andcommitted
chore(build): update build to match ngM2 build processes (#342)
* fix(build): sync to ngM2 build processes * lint and style fixes * tools and package fixes * npm process improvements * support aot, build, test, lint, demo-app tasks * demo css refactors, lint fixes * stage-deploy:devapp now deploys aot version * feat(lib): remove uses of rxjs patch operators Usages of RxJS operators should use the "longhand" syntax, which avoids polluting the Observable.prototype in userland. Refactors the entire codebase not to use the patch operators from RxJS, because they pollute the user's setup. Instead, opts into importing the operators directly. > Refs angular/components#2622. * chore(demo-app): no longer fallback to index.html file Gulp Connect currently always falls back to the index.html file if a resource could not be found. This is not a good idea because this way the browser or Angular is never able to report not-found errors. * chore(build): more changes base on PR feedback * artifact scripts should push empty commits > When publishing build artifacts (cdk; material) there will be always a change (regardless if something changed in the package or not). This is because the version will be always appended with the current SHA. But when publishing the docs content this is not the case. Sometimes there won't be any change and Git will exit with error code 1 because empty commits are not allowed. * remove unused docs, screenshot, and dashboard tools
1 parent 6b42a27 commit 21c34f7

File tree

218 files changed

+7611
-6491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+7611
-6491
lines changed

.gitignore

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,26 @@
1-
# Logs
2-
logs
3-
*.log
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
42

5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Coverage directory used by tools like istanbul
11-
coverage
12-
13-
# Webpack Analyzer
14-
report.html
3+
# compiled output
4+
/dist
5+
/tmp
6+
/deploy
7+
/screenshots
158

16-
# Compiled binary addons (http://nodejs.org/api/addons.html)
17-
build/Release
9+
# dependencies
10+
node_modules
11+
/bower_components
1812

19-
# Users Environment Variables
20-
.lock-wscript
21-
yarn.lock
22-
yarn-error.log
13+
# IDEs
14+
/.idea
15+
/.vscode
2316

24-
# OS generated files #
17+
# misc
2518
.DS_Store
26-
ehthumbs.db
27-
Icon?
28-
Thumbs.db
29-
30-
# Node Files #
31-
/node_modules
32-
/bower_components
19+
/.sass-cache
20+
/connect.lock
21+
/coverage/*
22+
/libpeerconnection.log
3323
npm-debug.log
34-
35-
# Coverage #
36-
/coverage/
37-
38-
# Typing #
39-
/src/typings/tsd/
40-
/typings/
41-
/tsd_typings/
42-
43-
# Dist #
44-
/dist
45-
/demos
46-
/public/__build__/
47-
/src/*/__build__/
48-
/__build__/**
49-
/public/dist/
50-
/src/*/dist/
51-
/dist/**
52-
/.awcache
53-
.webpack.json
54-
55-
# Doc #
56-
/doc/
57-
58-
# IDE #
59-
.idea/
60-
.vscode/
61-
*.swp
62-
!/src/lib/flexbox/media-query/media-query-activation.ts
24+
testem.log
25+
/.chrome
26+
!/test/karma.conf.js

.travis.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
11
language: node_js
22
sudo: false
3+
dist: trusty
34

45
node_js:
5-
- '6.9.4'
6+
- '--lts'
7+
8+
addons:
9+
jwt:
10+
# SAUCE_ACCESS_KEY<=secret for FIREBASE_ACCESS_TOKEN to work around travis-ci/travis-ci#7223, unencrypted value in valentine as FIREBASE_ACCESS_TOKEN>
11+
# we alias FIREBASE_ACCESS_TOKEN to $SAUCE_ACCESS_KEY in env.sh and set the SAUCE_ACCESS_KEY there
12+
- secure: "PKts/IbxuJRWWOEeiGbl8Z9zds0M+hIdCH/g/E4WbQ9yzSvSbdwzfmRfFccQFjxjsrY7+SJMVjsURZy+xUyBpzqgWYHUItnSVqjZb8DlyAU2IXyg8TM9BVLkGGe6k5k4PIFVmfMMMzQwWMM0X0W9w3oYmfHL5egxwSHvf9HIqLolLNXg8sqamIdS5d5KoCXf1c+oRjN/IMBktzNBR6N4OFOZQXVoepXNiIvTWAcTtOPBvFWdKP2n7RVioHKdm4a85aCUpDJp+LYGaLqiQZoRzmzfVTnAhTAPdd4ao5w/+jojrfZIHV55bqYF9rLnQMTneKsiyVNVYJzOLuxmARa/EEKfZld+J3rX4/o4cogrU38YSZF+T7J9g/7CTsnIZ3F6W6m+8iJbIBh55nGOQi5PVe458Q/nGb3fgQd2Z4+6lK9k479H4Ssh/Y7hbVQbepqEVIXzZKqWX6/ZE4iWoR/Q2dm0hySFmmB/R2etixX5JxhnHvgobTYIQ+1liJVp/3YFW1ru64Yg6yz/V291Bhh9g31znmTROCJ/usAmZZaLUqW1TDKnLIMP+M74MF9XERqcWKywXRFwxP4E5uDnx/vAyN49gL+SDfrBUxUtXrTkKZAlglwo9SgA7cOYEPWrionvKcGm87gCBYHFUmXZNQVzh212fpuJYXb/vy0sPDj8La4="
13+
chrome: stable
614

715
branches:
816
only:
917
- master
1018

19+
jobs:
20+
include:
21+
- env: "MODE=lint"
22+
- env: "MODE=aot"
23+
- env: "MODE=closure-compiler"
24+
- env: "MODE=saucelabs_required"
25+
- env: "MODE=browserstack_required"
26+
- env: "MODE=travis_required"
27+
- stage: Deploy
28+
env: "DEPLOY_MODE=build-artifacts"
1129
env:
1230
global:
1331
- LOGS_DIR=/tmp/flex-layout-build/logs
1432
- SAUCE_USERNAME=angular-ci
15-
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
16-
- SAUCE_READY_FILE=/tmp/sauce-readyfile
1733
- BROWSER_STACK_USERNAME=angularteam1
1834
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
1935
- BROWSER_PROVIDER_READY_FILE=/tmp/flex-layout-build/readyfile
2036
- BROWSER_PROVIDER_ERROR_FILE=/tmp/flex-layout-build/errorfile
2137

22-
cache:
23-
yarn: true
24-
directories:
25-
- node_modules/
26-
- tmp/angular.js
2738

28-
jobs:
29-
include:
30-
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
31-
- env: "MODE=lint"
32-
- env: "MODE=saucelabs_required"
33-
- env: "MODE=browserstack_required"
34-
- env: "MODE=saucelabs_optional"
35-
- env: "MODE=browserstack_optional"
36-
- stage: Deploy
37-
script: ./tools/scripts/ci/after-success.sh
38-
env: "MODE=release"
39+
before_install:
40+
- source ./scripts/ci/env.sh
41+
- npm i -g npm@^5.3
42+
43+
install:
44+
- npm install
3945

4046
before_script:
4147
- mkdir -p $LOGS_DIR
4248

4349
script:
44-
- ./tools/scripts/ci/build-and-test.sh
50+
- ./scripts/ci/travis-script.sh
51+
52+
cache:
53+
directories:
54+
- $HOME/.npm

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2016-2017 Google, Inc.
3+
Copyright (c) 2017 Google, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flex Layout
1+
# Angular Flex-Layout
22

33
[![npm version](https://badge.fury.io/js/%40angular%2Fflex-layout.svg)](https://www.npmjs.com/package/%40angular%2Fflex-layout)
44
[![Build Status](https://travis-ci.org/angular/flex-layout.svg?branch=master)](https://travis-ci.org/angular/flex-layout)
@@ -18,7 +18,9 @@ The **real** power of Flex Layout, however, is its **responsive** engine. The [R
1818

1919
#### Deprecated support for Angular 2.4.x
2020

21-
Support for recent changes to Angular v4.1 AOT and Renderers means that Angular 2.4.x will not be supported after Angular Flex-Layout v2.0.0-beta.7.
21+
With recent changes build and source changes, @angular/flex-layout (Beta.9 or higher)
22+
will no longer support Angular 2.4.x. These changes were required to support to the revised
23+
Angular v4.1 AOT and Renderers.
2224

2325
---
2426

build-config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Build configuration for the packaging tool. This file will be automatically detected and used
3+
* to build the different packages inside of Material.
4+
*/
5+
const {join} = require('path');
6+
7+
/** Current version of the project*/
8+
const buildVersion = require('./package.json').version;
9+
10+
/** License that will be placed inside of all created bundles. */
11+
const buildLicense = `/**
12+
* @license
13+
* Copyright Google Inc. All Rights Reserved.
14+
*
15+
* Use of this source code is governed by an MIT-style license that can be
16+
* found in the LICENSE file at https://angular.io/license
17+
*/`;
18+
19+
module.exports = {
20+
projectVersion: buildVersion,
21+
projectDir: __dirname,
22+
packagesDir: join(__dirname, 'src'),
23+
outputDir: join(__dirname, 'dist'),
24+
licenseBanner: buildLicense
25+
};

firebase.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hosting": {
3-
"public": "dist",
3+
"public": "dist/packages/demo-app",
44
"rewrites": [
55
{
66
"source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))",
@@ -19,14 +19,7 @@
1919
}
2020
],
2121
"ignore": [
22-
"firebase.json",
23-
"**/.*",
24-
"**/node_modules/**",
25-
"tmp",
26-
"deploy",
27-
"typings",
28-
"tools",
29-
"src"
22+
"firebase.json"
3023
]
3124
}
3225
}

gulpfile.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@
66

77
const path = require('path');
88

9-
//Register TS compilation.
9+
const tsconfigPath = path.join(__dirname, 'tools/gulp/tsconfig.json');
10+
const tsconfig = require(tsconfigPath);
11+
12+
// Register TS compilation.
1013
require('ts-node').register({
11-
project: path.join(__dirname, 'tools/gulp')
14+
project: tsconfigPath
15+
});
16+
17+
// The gulp tsconfig file maps specific imports to relative paths. In combination with ts-node
18+
// this doesn't work because the JavaScript output will still refer to the imports instead of
19+
// to the relative path. Tsconfig-paths can be used to support path mapping inside of Node.
20+
require('tsconfig-paths').register({
21+
baseUrl: path.dirname(tsconfigPath),
22+
paths: tsconfig.compilerOptions.paths
1223
});
1324

1425
require('./tools/gulp/gulpfile');

0 commit comments

Comments
 (0)