Skip to content

Commit

Permalink
chore(build): update build to match ngM2 build processes (#342)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ThomasBurleson authored and andrewseguin committed Jul 27, 2017
1 parent 6b42a27 commit 21c34f7
Show file tree
Hide file tree
Showing 218 changed files with 7,611 additions and 6,491 deletions.
76 changes: 20 additions & 56 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,62 +1,26 @@
# Logs
logs
*.log
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Runtime data
pids
*.pid
*.seed

# Coverage directory used by tools like istanbul
coverage

# Webpack Analyzer
report.html
# compiled output
/dist
/tmp
/deploy
/screenshots

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# dependencies
node_modules
/bower_components

# Users Environment Variables
.lock-wscript
yarn.lock
yarn-error.log
# IDEs
/.idea
/.vscode

# OS generated files #
# misc
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Node Files #
/node_modules
/bower_components
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log

# Coverage #
/coverage/

# Typing #
/src/typings/tsd/
/typings/
/tsd_typings/

# Dist #
/dist
/demos
/public/__build__/
/src/*/__build__/
/__build__/**
/public/dist/
/src/*/dist/
/dist/**
/.awcache
.webpack.json

# Doc #
/doc/

# IDE #
.idea/
.vscode/
*.swp
!/src/lib/flexbox/media-query/media-query-activation.ts
testem.log
/.chrome
!/test/karma.conf.js
50 changes: 30 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,54 @@
language: node_js
sudo: false
dist: trusty

node_js:
- '6.9.4'
- '--lts'

addons:
jwt:
# SAUCE_ACCESS_KEY<=secret for FIREBASE_ACCESS_TOKEN to work around travis-ci/travis-ci#7223, unencrypted value in valentine as FIREBASE_ACCESS_TOKEN>
# we alias FIREBASE_ACCESS_TOKEN to $SAUCE_ACCESS_KEY in env.sh and set the SAUCE_ACCESS_KEY there
- 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="
chrome: stable

branches:
only:
- master

jobs:
include:
- env: "MODE=lint"
- env: "MODE=aot"
- env: "MODE=closure-compiler"
- env: "MODE=saucelabs_required"
- env: "MODE=browserstack_required"
- env: "MODE=travis_required"
- stage: Deploy
env: "DEPLOY_MODE=build-artifacts"
env:
global:
- LOGS_DIR=/tmp/flex-layout-build/logs
- SAUCE_USERNAME=angular-ci
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
- SAUCE_READY_FILE=/tmp/sauce-readyfile
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
- BROWSER_PROVIDER_READY_FILE=/tmp/flex-layout-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/flex-layout-build/errorfile

cache:
yarn: true
directories:
- node_modules/
- tmp/angular.js

jobs:
include:
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
- env: "MODE=lint"
- env: "MODE=saucelabs_required"
- env: "MODE=browserstack_required"
- env: "MODE=saucelabs_optional"
- env: "MODE=browserstack_optional"
- stage: Deploy
script: ./tools/scripts/ci/after-success.sh
env: "MODE=release"
before_install:
- source ./scripts/ci/env.sh
- npm i -g npm@^5.3

install:
- npm install

before_script:
- mkdir -p $LOGS_DIR

script:
- ./tools/scripts/ci/build-and-test.sh
- ./scripts/ci/travis-script.sh

cache:
directories:
- $HOME/.npm
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2016-2017 Google, Inc.
Copyright (c) 2017 Google, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flex Layout
# Angular Flex-Layout

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

#### Deprecated support for Angular 2.4.x

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.
With recent changes build and source changes, @angular/flex-layout (Beta.9 or higher)
will no longer support Angular 2.4.x. These changes were required to support to the revised
Angular v4.1 AOT and Renderers.

---

Expand Down
25 changes: 25 additions & 0 deletions build-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Build configuration for the packaging tool. This file will be automatically detected and used
* to build the different packages inside of Material.
*/
const {join} = require('path');

/** Current version of the project*/
const buildVersion = require('./package.json').version;

/** License that will be placed inside of all created bundles. */
const buildLicense = `/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/`;

module.exports = {
projectVersion: buildVersion,
projectDir: __dirname,
packagesDir: join(__dirname, 'src'),
outputDir: join(__dirname, 'dist'),
licenseBanner: buildLicense
};
11 changes: 2 additions & 9 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"public": "dist",
"public": "dist/packages/demo-app",
"rewrites": [
{
"source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))",
Expand All @@ -19,14 +19,7 @@
}
],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**",
"tmp",
"deploy",
"typings",
"tools",
"src"
"firebase.json"
]
}
}
15 changes: 13 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@

const path = require('path');

//Register TS compilation.
const tsconfigPath = path.join(__dirname, 'tools/gulp/tsconfig.json');
const tsconfig = require(tsconfigPath);

// Register TS compilation.
require('ts-node').register({
project: path.join(__dirname, 'tools/gulp')
project: tsconfigPath
});

// The gulp tsconfig file maps specific imports to relative paths. In combination with ts-node
// this doesn't work because the JavaScript output will still refer to the imports instead of
// to the relative path. Tsconfig-paths can be used to support path mapping inside of Node.
require('tsconfig-paths').register({
baseUrl: path.dirname(tsconfigPath),
paths: tsconfig.compilerOptions.paths
});

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

0 comments on commit 21c34f7

Please sign in to comment.