Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
extends: ['@commitlint/config-angular'],
rules: {
'type-enum': [
2,
'always',
[
// Minor
'feat',
// Patch
'build',
'docs',
'fix',
'perf',
'refactor',
// None
'chore',
'ci',
'revert',
'test',
],
],
'scope-empty': [0],
'scope-enum': [
2,
'always',
['docs', 'test', 'package', 'website', 'angular-jss'],
],
},
ignores: [(message) => message.toLowerCase().startsWith('wip')],
};
62 changes: 62 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Labels: define labels for Issues and Pull Requests
labels:
# type
- name: 'type: bug'
description: 'App is not working correctly.'
color: 'fbca04'
- name: 'type: discussion'
description: 'Discussing usage, best practices, questions, etc.'
color: 'e99695'
- name: 'type: documentation'
description: 'Related to improving documentation and the wiki.'
color: '6addf7'
- name: 'type: security'
description: 'Questions, concerns, or suggestions for improving the security of the app.'
color: '1d76db'
- name: 'type: enhancement'
description: 'A new feature suggestion or improvement upon an existing feature.'
color: '84b6eb'
- name: 'type: maintenance'
color: 'fbca04'
- name: 'type: question'
color: 'cc317c'
- name: 'type: feature'
color: '1d76db'

#status
- name: 'status: in progress️'
description: 'Currently being developed for a future release.'
color: 'cccccc'
- name: 'status: on hold'
description: 'Work has stopped. There may be one or more blockers or needs more information.'
color: 'e11d21'
- name: 'status: abandoned'
color: '000000'
- name: 'status: accepted'
color: '009800'
- name: 'status: available'
color: 'bfe5bf'
- name: 'status: blocked'
color: 'e11d21'
- name: 'status: completed'
description: 'This has been addressed in a branch and will be scheduled for release in the assigned milestone.'
color: '006b75'
- name: 'status: pending'
color: 'fef2c0'
- name: 'status: review needed'
color: 'fbca04'

# priority
- name: 'priority: critical'
description: 'Critical priority, needs immediate response'
color: 'e11d21'
- name: 'priority: high'
description: 'High priority, needs immediate response'
color: 'eb6420'
- name: 'priority: medium'
description: 'Medium priority'
color: 'fbca04'
- name: 'priority: low'
description: 'Low priority'
color: '009800'

62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI
on:
push:
branches:
- main
pull_request:

env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true

jobs:
main:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v2
name: Checkout [main]
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm install --no-package-lock
- run: npx nx-cloud start-ci-run
- run: npx nx affected --target=build --parallel --max-parallel=3
- run: npx nx affected --target=test --parallel --max-parallel=2
- run: npx nx-cloud stop-all-agents
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm install --no-package-lock
- run: npx nx-cloud start-ci-run
- run: npx nx affected --target=build --parallel --max-parallel=3
- run: npx nx affected --target=test --parallel --max-parallel=2
- run: npx nx-cloud stop-all-agents
agents:
runs-on: ubuntu-latest
name: Agent 1
timeout-minutes: 60
strategy:
matrix:
agent: [1, 2, 3]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm install --no-package-lock
- name: Start Nx Agent ${{ matrix.agent }}
run: npx nx-cloud start-agent
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches:
- master
- next
- beta
- alpha

env:
CI: true

jobs:
release:
name: Build, Release & Publish
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v1
- name: Install Dependencies
run: npm ci
- name: Lint Workspace & Code
run: |
npm run nx -- workspace-lint
npm run affected:lint -- --all
- name: Unit Tests
run: npm run affected:test -- --all
- name: Build, Release on GitHub & Publish to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
run: npm run release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ npm-debug.log
yarn-error.log
testem.log
/typings
/package-lock.json

# System Files
.DS_Store
Expand Down
5 changes: 3 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": 2,
"projects": {
"angular-jss": "apps/angular-jss",
"angular-jss-e2e": "apps/angular-jss-e2e"
"webpage": "apps/webpage",
"webpage-e2e": "apps/webpage-e2e",
"angular-jss": "libs/angular-jss"
}
}
28 changes: 0 additions & 28 deletions apps/angular-jss-e2e/project.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"supportFile": "./src/support/index.ts",
"pluginsFile": false,
"video": true,
"videosFolder": "../../dist/cypress/apps/angular-jss-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/angular-jss-e2e/screenshots",
"videosFolder": "../../dist/cypress/apps/webpage-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/webpage-e2e/screenshots",
"chromeWebSecurity": false
}
28 changes: 28 additions & 0 deletions apps/webpage-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": "apps/webpage-e2e",
"sourceRoot": "apps/webpage-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/webpage-e2e/cypress.json",
"devServerTarget": "webpage:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "webpage:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/webpage-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["webpage"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions apps/webpage/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
displayName: 'webpage',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/apps/webpage',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};
39 changes: 18 additions & 21 deletions apps/angular-jss/project.json → apps/webpage/project.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"projectType": "application",
"root": "apps/angular-jss",
"sourceRoot": "apps/angular-jss/src",
"root": "apps/webpage",
"sourceRoot": "apps/webpage/src",
"prefix": "angular-jss",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/angular-jss",
"index": "apps/angular-jss/src/index.html",
"main": "apps/angular-jss/src/main.ts",
"polyfills": "apps/angular-jss/src/polyfills.ts",
"tsConfig": "apps/angular-jss/tsconfig.app.json",
"assets": [
"apps/angular-jss/src/favicon.ico",
"apps/angular-jss/src/assets"
],
"styles": ["apps/angular-jss/src/styles.css"],
"outputPath": "dist/apps/webpage",
"index": "apps/webpage/src/index.html",
"main": "apps/webpage/src/main.ts",
"polyfills": "apps/webpage/src/polyfills.ts",
"tsConfig": "apps/webpage/tsconfig.app.json",
"assets": ["apps/webpage/src/favicon.ico", "apps/webpage/src/assets"],
"styles": ["apps/webpage/src/styles.css"],
"scripts": []
},
"configurations": {
Expand All @@ -36,8 +33,8 @@
],
"fileReplacements": [
{
"replace": "apps/angular-jss/src/environments/environment.ts",
"with": "apps/angular-jss/src/environments/environment.prod.ts"
"replace": "apps/webpage/src/environments/environment.ts",
"with": "apps/webpage/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
Expand All @@ -57,34 +54,34 @@
"executor": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "angular-jss:build:production"
"browserTarget": "webpage:build:production"
},
"development": {
"browserTarget": "angular-jss:build:development"
"browserTarget": "webpage:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-jss:build"
"browserTarget": "webpage:build"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/angular-jss/src/**/*.ts",
"apps/angular-jss/src/**/*.html"
"apps/webpage/src/**/*.ts",
"apps/webpage/src/**/*.html"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/angular-jss"],
"outputs": ["coverage/apps/webpage"],
"options": {
"jestConfig": "apps/angular-jss/jest.config.js",
"jestConfig": "apps/webpage/jest.config.js",
"passWithNoTests": true
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading