build: update packaging to match angular/angular (#3751)

* build: restructure release output

* build: inline metadata.json resources

* build: output re-export meatadata.json file in package root
This commit is contained in:
Jeremy Elbourn
2017-03-24 14:06:45 -07:00
committed by GitHub
parent a25e7bb09b
commit 71229756a5
38 changed files with 940 additions and 698 deletions
+4 -4
View File
@@ -4,12 +4,12 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 3000;
__karma__.loaded = function () {};
var baseDir = '/base/dist/';
var configFile = baseDir + '@angular/material/system-config-spec.js';
var baseDir = '/base';
var configFile = baseDir + '/dist/packages/material/system-config-spec.js';
var specFiles = Object.keys(window.__karma__.files).filter(isMaterialSpecFile);
// Configure the base path for dist/
System.config({baseURL: baseDir});
System.config({ baseURL: baseDir });
// Load the spec SystemJS configuration file.
System.import(configFile)
@@ -28,7 +28,7 @@ function runMaterialSpecs() {
/** Whether the specified file is part of Angular Material. */
function isMaterialSpecFile(path) {
return path.slice(-8) === '.spec.js' && path.indexOf('vendor') === -1;
return path.slice(-8) === '.spec.js' && path.indexOf('node_modules') === -1;
}
/** Configures Angular's TestBed. */
+18 -25
View File
@@ -16,43 +16,36 @@ module.exports = (config) => {
require('karma-coverage')
],
files: [
{pattern: 'dist/vendor/core-js/client/core.js', included: true, watched: false},
{pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false},
{pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/proxy.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/sync-test.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/jasmine-patch.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false},
{pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false},
{pattern: 'dist/vendor/hammerjs/hammer.min.js', included: true, watched: false},
{pattern: 'node_modules/core-js/client/core.js', included: true, watched: false},
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/proxy.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/sync-test.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/jasmine-patch.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/async-test.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/fake-async-test.js', included: true, watched: false},
{pattern: 'node_modules/hammerjs/hammer.min.js', included: true, watched: false},
// Include all Angular dependencies
{pattern: 'node_modules/@angular/**/*', included: false, watched: false},
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
{pattern: 'test/karma-test-shim.js', included: true, watched: false},
// paths loaded via module imports
{pattern: 'dist/**/*.js', included: false, watched: true},
// Include a Material theme in the test suite.
{pattern: 'dist/**/core/theming/prebuilt/indigo-pink.css', included: true, watched: true},
// include one of the themes
{pattern: 'dist/**/prebuilt/indigo-pink.css', included: true, watched: true},
// paths loaded via Angular's component compiler
// (these paths need to be rewritten, see proxies section)
{pattern: 'dist/**/*.html', included: false, watched: true},
{pattern: 'dist/**/*.css', included: false, watched: true},
{pattern: 'dist/packages/material/**/*', included: false, watched: true},
// paths to support debugging with source maps in dev tools
{pattern: 'dist/**/*.ts', included: false, watched: false},
{pattern: 'dist/**/*.js.map', included: false, watched: false}
],
proxies: {
// required for component assets fetched by Angular's compiler
'/components/': '/base/dist/components/',
'/core/': '/base/dist/core/',
},
customLaunchers: customLaunchers,
preprocessors: {
'dist/@angular/material/**/*.js': ['sourcemap']
'dist/**/*.js': ['sourcemap']
},
reporters: ['dots'],