Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d987b28
update to Angular 8.2.14
Feb 24, 2020
e8f39be
update example project to Angular 8.2.14
Feb 24, 2020
63a67a9
update to Angular 9.0.2
Feb 24, 2020
765fde4
add missing tslib to example project
Feb 24, 2020
5dc11a1
update tsconfig to have latest settings
Feb 26, 2020
a1fa6e0
update example project with all the latest configuration
Feb 26, 2020
c49e4ba
update example project with new updated settings
Feb 29, 2020
4876bf8
move angular playground to new folder structure and update to work wi…
Feb 29, 2020
a71e5e4
add configuration needed for sandboxes dynamically to compiled js files
Mar 3, 2020
ec60eac
setup builds for running example app with playground
Mar 3, 2020
2f315f8
fix issue with public host name
Mar 3, 2020
bf5764e
make verify sandboxes and check snapshots work with the new building …
Mar 3, 2020
6dbd881
change verify sandboxes to not load an new page for every scenario er…
Mar 3, 2020
6391266
fix checking for if the playground component is loaded
Mar 3, 2020
918fb3a
fix all tests
Mar 4, 2020
ee2ae7a
setup build for schematics to output to dist
Mar 4, 2020
6ba8c3e
add optional uniqueId to sandboxes for making sandbox urls more perma…
Mar 5, 2020
bd2f000
fix issue with embed mode not hiding overlay
Mar 5, 2020
1be5c4f
update readme
Mar 5, 2020
fcf9984
update changelog
Mar 5, 2020
3e7124b
7.0.0-rc.0
Mar 5, 2020
2d6aead
add visual regression sleep duration to configuration and command lin…
Mar 5, 2020
b5297f7
use official cli way of adding playground to dev dependencies on ng add
Mar 5, 2020
f4e552d
allow verify-sandboxes build to run on a specified directory using th…
Mar 5, 2020
8c9fb76
fix missing packages
Mar 5, 2020
caffe76
fix build script to not build twice
Mar 5, 2020
e0b7264
update changelog
Mar 5, 2020
c32fe4c
7.0.0-rc.1
Mar 5, 2020
622204d
update migrations to replace files and configuration that work with l…
Mar 6, 2020
6e35eac
update changelog
Mar 6, 2020
9038947
7.0.0
Mar 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand Down
47 changes: 24 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/packages/angular-playground/dist/
/packages/angular-playground/build/
/src/**/*.ngfactory.ts
*.ngsummary.json
**/.idea/*
/dist
/tmp
/out-tsc
/_stage
# Only exists if Bazel was run
/bazel-out

# dependencies
node_modules
/bower_components
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage
/libpeerconnection.log
npm-debug.log*
npm-debug.log
yarn-error.log
testem.log
/typings
/packages/angular-playground/output.json
/packages/angular-playground/sandboxes_modified.js

# e2e
/e2e/*.js
/e2e/*.map

# schematics
/packages/angular-playground/schematics/**/*.js
/packages/angular-playground/schematics/**/*.d.ts
/packages/angular-playground/schematics/**/*.map

#System Files
# System Files
.DS_Store
Thumbs.db
/debug.log
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
language: node_js
node_js:
- "node"
env:
- TEST_DIR=packages/angular-playground
script: cd $TEST_DIR && npm install && npm test
script: npm install && npm test
44 changes: 44 additions & 0 deletions packages/angular-playground/CHANGELOG.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
# 7.0.0 (2020-3-6)

<a name="7.0.0"></a>

### Features
* **angular:** Upgrade to be compatible with Angular version 9 and work with Ivy compiler
* **verify sandboxes:** Change verify sandboxes to not load an new page for every scenario error check to improve performance
* **verify sandboxes:** Add ability to filter based on a path to only check a subset of sandboxes
* **embeding:** Add ability to add a uniqueId to sandboxes to allow for URL not to be tied to the file location of the sandbox file
* **visual regressions:** Make visual regression sleep duration configurable

### Bug Fixes
* **navigation menu:** Fixed issue with overlay not hiding when set to embed mode
* **verify sandboxes:** Fix issue with verify sandboxes not catching compilation errors
* **schematics:** Fix issue upgrading Angular Playground not updating dependent files

# 7.0.0-rc.1 (2020-3-5)

<a name="7.0.0-rc.1"></a>

### Features
* **angular:** Upgrade to be compatible with Angular version 9 and work with Ivy compiler
* **verify sandboxes:** Change verify sandboxes to not load an new page for every scenario error check to improve performance
* **verify sandboxes:** Add ability to filter based on a path to only check a subset of sandboxes
* **embeding:** Add ability to add a uniqueId to sandboxes to allow for URL not to be tied to the file location of the sandbox file
* **visual regressions:** Make visual regression sleep duration configurable

### Bug Fixes
* **navigation menu:** Fixed issue with overlay not hiding when set to embed mode
* **verify sandboxes:** Fix issue with verify sandboxes not catching compilation errors

# 7.0.0-rc.0 (2020-3-4)

<a name="7.0.0-rc.0"></a>

### Features
* **angular:** Upgrade to be compatible with Angular version 9 and work with Ivy compiler
* **verify sandboxes:** Change verify sandboxes to not load an new page for every scenario error check to improve performance
* **embeding:** Add ability to add a uniqueId to sandboxes to allow for URL not to be tied to the file location of the sandbox file

### Bug Fixes
* **navigation menu:** Fixed issue with overlay not hiding when set to embed mode
* **verify sandboxes:** Fix issue with verify sandboxes not catching compilation errors

# 6.2.0 (2020-1-8)

<a name="6.2.0"></a>
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ fix broken UI.

## Documentation (<http://www.angularplayground.it/>)

* Angular 6.x and up
* [CLI quick-start](http://www.angularplayground.it/docs/getting-started/angular-cli)

## Articles

* [Developing and Running Components in a Sandbox!](https://blog.codewithdan.com/2017/11/21/angular-playground-developing-and-running-components-in-a-sandbox/)
* [Front-end Workflows: Re-envisioned](https://hackernoon.com/front-end-workflow-re-envisioned-43f800bb01bd)

## Contributing

Expand All @@ -37,4 +35,4 @@ Angular Playground is [MIT licensed](./LICENSE).

## Latest Changes

[Playground Changelog](./packages/angular-playground/CHANGELOG.md)
[Playground Changelog](./CHANGELOG.md)
47 changes: 47 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"playground": {
"projectType": "library",
"root": "projects/playground",
"sourceRoot": "projects/playground/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/playground/tsconfig.lib.json",
"project": "projects/playground/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/playground/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/playground/src/test.ts",
"tsConfig": "projects/playground/tsconfig.spec.json",
"karmaConfig": "projects/playground/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/playground/tsconfig.lib.json",
"projects/playground/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}},
"defaultProject": "playground"
}
2 changes: 1 addition & 1 deletion examples/cli-example/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand Down
34 changes: 23 additions & 11 deletions examples/cli-example/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -40,10 +41,21 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -69,7 +81,7 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"styles.css"
Expand All @@ -85,8 +97,8 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
Expand All @@ -109,7 +121,7 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"tsConfig": "e2e/tsconfig.json",
"exclude": [
"**/node_modules/**"
]
Expand All @@ -129,7 +141,8 @@
"index": "src/index.html",
"main": "src/main.playground.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.playground.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
Expand All @@ -152,10 +165,9 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false
"buildOptimizer": true
}
}
},
Expand All @@ -169,4 +181,4 @@
}
},
"defaultProject": "cli-example"
}
}
12 changes: 12 additions & 0 deletions examples/cli-example/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
8 changes: 6 additions & 2 deletions examples/cli-example/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
Expand All @@ -21,7 +25,7 @@ exports.config = {
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
Expand Down
11 changes: 10 additions & 1 deletion examples/cli-example/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe('workspace-project App', () => {
let page: AppPage;
Expand All @@ -9,6 +10,14 @@ describe('workspace-project App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
expect(page.getTitleText()).toEqual('test-ang-nine app is running!');
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
8 changes: 4 additions & 4 deletions examples/cli-example/e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
Expand All @@ -10,4 +10,4 @@
"node"
]
}
}
}
Loading