feat(elements): set up the `elements` package
This commit is contained in:
parent
a28d616e10
commit
ebfa204af0
|
@ -279,6 +279,14 @@ groups:
|
|||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
|
||||
elements:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/elements/*"
|
||||
users:
|
||||
- mhevery #primary
|
||||
- IgorMinar #fallback
|
||||
|
||||
benchpress:
|
||||
conditions:
|
||||
files:
|
||||
|
|
|
@ -211,6 +211,7 @@ The following is the list of supported scopes:
|
|||
* **compiler**
|
||||
* **compiler-cli**
|
||||
* **core**
|
||||
* **elements**
|
||||
* **forms**
|
||||
* **http**
|
||||
* **language-service**
|
||||
|
|
|
@ -48,6 +48,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
|||
'common/testing/index.ts',
|
||||
'core/index.ts',
|
||||
'core/testing/index.ts',
|
||||
'elements/index.ts',
|
||||
'forms/index.ts',
|
||||
'http/index.ts',
|
||||
'http/testing/index.ts',
|
||||
|
|
|
@ -11,15 +11,16 @@ const { API_SOURCE_PATH } = require('../config');
|
|||
|
||||
const packageMap = {
|
||||
animations: ['animations/index.ts', 'animations/browser/index.ts', 'animations/browser/testing/index.ts'],
|
||||
common: ['common/index.ts', 'common/testing/index.ts'],
|
||||
common: ['common/index.ts', 'common/testing/index.ts', 'common/http/index.ts', 'common/http/testing/index.ts'],
|
||||
core: ['core/index.ts', 'core/testing/index.ts'],
|
||||
elements: ['elements/index.ts'],
|
||||
forms: ['forms/index.ts'],
|
||||
http: ['http/index.ts', 'http/testing/index.ts'],
|
||||
'platform-browser': ['platform-browser/index.ts', 'platform-browser/animations/index.ts', 'platform-browser/testing/index.ts'],
|
||||
'platform-browser-dynamic': ['platform-browser-dynamic/index.ts', 'platform-browser-dynamic/testing/index.ts'],
|
||||
'platform-server': ['platform-server/index.ts', 'platform-server/testing/index.ts'],
|
||||
'platform-webworker': ['platform-webworker/index.ts'],
|
||||
'platform-webworker-dynamic': 'platform-webworker-dynamic/index.ts',
|
||||
'platform-webworker-dynamic': ['platform-webworker-dynamic/index.ts'],
|
||||
router: ['router/index.ts', 'router/testing/index.ts', 'router/upgrade/index.ts'],
|
||||
'service-worker': ['service-worker/index.ts'],
|
||||
upgrade: ['upgrade/index.ts', 'upgrade/static/index.ts']
|
||||
|
|
3
build.sh
3
build.sh
|
@ -24,7 +24,8 @@ PACKAGES=(core
|
|||
compiler-cli
|
||||
language-service
|
||||
benchpress
|
||||
service-worker)
|
||||
service-worker
|
||||
elements)
|
||||
|
||||
TSC_PACKAGES=(compiler-cli
|
||||
language-service
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
// This file is not used to build this module. It is only used during editing
|
||||
// by the TypeScript language service and during build for verification. `ngc`
|
||||
// replaces this file with production index.ts when it rewrites private symbol
|
||||
// names.
|
||||
|
||||
export * from './public_api';
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "@angular/elements",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - library for using Angular in a web browser",
|
||||
"main": "./bundles/elements.umd.js",
|
||||
"module": "./esm5/elements.js",
|
||||
"es2015": "./esm2015/elements.js",
|
||||
"typings": "./elements.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^1.7.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "0.0.0-PLACEHOLDER",
|
||||
"@angular/platform-browser": "0.0.0-PLACEHOLDER"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.git"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* @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
|
||||
* @description
|
||||
* Entry point for all public APIs of the `elements` package.
|
||||
*/
|
||||
export {VERSION} from './src/version';
|
||||
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
const resolve = require('rollup-plugin-node-resolve');
|
||||
const sourcemaps = require('rollup-plugin-sourcemaps');
|
||||
|
||||
const globals = {
|
||||
'@angular/core': 'ng.core',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
entry: '../../dist/packages-dist/elements/esm5/elements.js',
|
||||
dest: '../../dist/packages-dist/elements/bundles/elements.umd.js',
|
||||
format: 'umd',
|
||||
exports: 'named',
|
||||
amd: {id: '@angular/elements'},
|
||||
moduleName: 'ng.elements',
|
||||
plugins: [resolve(), sourcemaps()],
|
||||
external: Object.keys(globals),
|
||||
globals: globals
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import {Version} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": ".",
|
||||
"paths": {
|
||||
"@angular/common": ["../../dist/packages/common"],
|
||||
"@angular/core": ["../../dist/packages/core"],
|
||||
"@angular/platform-browser": ["../../dist/packages/platform-browser"]
|
||||
},
|
||||
"outDir": "../../dist/packages/elements"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts",
|
||||
"../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": false,
|
||||
"skipTemplateCodegen": true,
|
||||
"flatModuleOutFile": "elements.js",
|
||||
"flatModuleId": "@angular/elements"
|
||||
}
|
||||
}
|
|
@ -62,6 +62,7 @@ System.config({
|
|||
'@angular/platform-server': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/platform-webworker': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/platform-webworker-dynamic': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/elements': {main: 'index.js', defaultExtension: 'js'},
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ var specFiles: any =
|
|||
'@angular/router/test/integration/bootstrap_spec.*',
|
||||
'@angular/integration_test/symbol_inspector/**',
|
||||
'@angular/upgrade/**',
|
||||
'@angular/elements/**',
|
||||
'@angular/**/e2e_test/**',
|
||||
'angular1_router/**',
|
||||
'payload_tests/**',
|
||||
|
|
|
@ -28,7 +28,7 @@ const entrypoints = [
|
|||
'dist/packages-dist/service-worker/service-worker.d.ts',
|
||||
'dist/packages-dist/service-worker/config.d.ts', 'dist/packages-dist/animations/browser.d.ts',
|
||||
'dist/packages-dist/animations/browser/testing.d.ts',
|
||||
'dist/packages-dist/platform-browser/animations.d.ts'
|
||||
'dist/packages-dist/platform-browser/animations.d.ts', 'dist/packages-dist/elements/elements.d.ts'
|
||||
];
|
||||
|
||||
const publicApiDir = 'tools/public_api_guard';
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/** @experimental */
|
||||
export declare const VERSION: Version;
|
|
@ -21,6 +21,7 @@
|
|||
"compiler",
|
||||
"compiler-cli",
|
||||
"core",
|
||||
"elements",
|
||||
"forms",
|
||||
"http",
|
||||
"language-service",
|
||||
|
|
|
@ -51,19 +51,19 @@ describe('validate-commit-message.js', function() {
|
|||
expect(validateMessage('refactor(docs): something')).toBe(INVALID);
|
||||
['INVALID COMMIT MSG: "fix(Compiler): something"\n' +
|
||||
' => ERROR: "Compiler" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, elements, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
'INVALID COMMIT MSG: "feat(bah): something"\n' +
|
||||
' => ERROR: "bah" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, elements, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
'INVALID COMMIT MSG: "style(webworker): something"\n' +
|
||||
' => ERROR: "webworker" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, elements, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
'INVALID COMMIT MSG: "refactor(security): something"\n' +
|
||||
' => ERROR: "security" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, elements, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog',
|
||||
'INVALID COMMIT MSG: "refactor(docs): something"\n' +
|
||||
' => ERROR: "docs" is not an allowed scope.\n' +
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog']
|
||||
' => SCOPES: aio, animations, bazel, benchpress, common, compiler, compiler-cli, core, elements, forms, http, language-service, platform-browser, platform-browser-dynamic, platform-server, platform-webworker, platform-webworker-dynamic, router, service-worker, upgrade, packaging, changelog']
|
||||
.forEach((expectedErrorMessage, index) => {
|
||||
expect(expectedErrorMessage).toEqual(errors[index]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue