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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ name: CI

on:
push:
branches: [ "**" ]
branches: ['**']
pull_request:
branches: [ "**" ]
branches: ['**']

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run test
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '22.x'
- run: npm ci
- run: npm run test

Expand All @@ -25,13 +25,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '22.x'
- run: npm ci
- run: npm run build
# Publish
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '22.x'
registry-url: 'https://wombat-dressing-room.appspot.com/'
- run: npm publish
env:
Expand Down
27 changes: 27 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
module.exports = {
...require('gts/.prettierrc.json'),
overrides: [
{
files: '*.html',
options: {
parser: 'angular',
printWidth: 100,
},
},
],
};
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

11 changes: 6 additions & 5 deletions deploy-ui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import fs from 'fs-extra';
import path from 'path';
import process from 'process';

const cwd = process.cwd();
const uiDist = path.join(cwd, 'src/ui/dist/ui/browser');
Expand All @@ -36,24 +37,24 @@ for (const filename of files) {
let htmlContent = fs.readFileSync(oldPath).toString();
htmlContent = htmlContent.replaceAll(
scriptRegex,
"<?!= include('$1'); ?>\n"
"<?!= include('$1'); ?>\n",
);
htmlContent = htmlContent.replaceAll(
cssRegex,
"\n<?!= include('$1'); ?>\n"
"\n<?!= include('$1'); ?>\n",
);
fs.writeFileSync(newPath, htmlContent);
} else if (path.extname(filename) === '.js') {
newName = path.format({ ...path.parse(filename), base: '', ext: '.html' });
newName = path.format({...path.parse(filename), base: '', ext: '.html'});
const newPath = path.join(cwd, 'dist', newName);
// Add a <script> tag around the js code
const jsContent = fs.readFileSync(oldPath).toString();
fs.writeFileSync(
newPath,
`<script type="module">\n${jsContent}\n</script>`
`<script type="module">\n${jsContent}\n</script>`,
);
} else {
newName = path.format({ ...path.parse(filename), base: '', ext: '.html' });
newName = path.format({...path.parse(filename), base: '', ext: '.html'});
const newPath = path.join(cwd, 'dist', newName);
const cssContent = fs.readFileSync(oldPath).toString();
fs.writeFileSync(newPath, `<style>\n${cssContent}\n</style>`);
Expand Down
49 changes: 49 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
let customConfig = [];
let hasIgnoresFile = false;
try {
require.resolve('./eslint.ignores.cjs');
hasIgnoresFile = true;
} catch {
// eslint.ignores.cjs doesn't exist
}

if (hasIgnoresFile) {
const ignores = require('./eslint.ignores.cjs');
customConfig = [{ignores}];
} else {
try {
require.resolve('./eslint.ignores.js');
const ignores = require('./eslint.ignores.js');
customConfig = [{ignores}];
} catch {
// eslint.ignores.js doesn't exist
}
}

module.exports = [
...customConfig,
...require('gts'),
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
},
},
},
];
27 changes: 27 additions & 0 deletions eslint.ignores.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
module.exports = [
'**/node_modules/**',
'**/.angular/**',
'**/dist/**',
'**/coverage/**',
'**/out-tsc/**',
'**/tmp/**',
'**/build/**',
'**/*.log',
'**/template/**',
'**/template-ui/**',
];
5 changes: 3 additions & 2 deletions fix-animations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import fs from 'fs-extra';
import path from 'path';
import process from 'process';

const cwd = process.cwd();
const appFolder = path.join(cwd, 'src/ui/src/app');
Expand All @@ -25,8 +26,8 @@ let appConfig = fs.readFileSync(appConfigPath).toString();

appConfig = appConfig
.replaceAll(
`import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';`,
`import { provideAnimations } from '@angular/platform-browser/animations';`
"import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';",
"import { provideAnimations } from '@angular/platform-browser/animations';",
)
.replaceAll('provideAnimationsAsync()', 'provideAnimations()');

Expand Down
13 changes: 12 additions & 1 deletion license-config.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
{
"regexIdentifier": "%%",
"ignore": [
".claspignore",
".editorconfig",
".eslintignore",
".gitignore",
".husky/**",
".prettierignore",
".prettierrc.cjs",
".prettierrc.js",
"*.txt",
".github",
"CONTRIBUTING",
"build",
"dist",
"src/ui/.angular"
"eslint.ignores.js",
"eslint.ignores.cjs",
"eslint.config.js",
"eslint.config.cjs",
"src/ui/.angular",
"src/ui/.prettierrc",
"node_modules",
"license-config.json"
],
"license": "license-header.txt",
"licenseFormats": {
Expand Down
2 changes: 1 addition & 1 deletion license-header.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2025 Google LLC
Copyright %%[0-9]{4}%% Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading
Loading