mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
@@ -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
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user