Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/public-ui/kolibri into n…
Browse files Browse the repository at this point in the history
…g/add-angular-app-sample
  • Loading branch information
deleonio committed Mar 20, 2024
2 parents b22d0c4 + 89a0e9a commit 91ef2be
Show file tree
Hide file tree
Showing 118 changed files with 897 additions and 2,255 deletions.
25 changes: 10 additions & 15 deletions packages/adapters/angular/v11/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "11.2.14",
"@angular/compiler": "11.2.14",
"@angular/compiler-cli": "11.2.14",
"@angular/core": "11.2.14",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v12/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "12.2.17",
"@angular/compiler": "12.2.17",
"@angular/compiler-cli": "12.2.17",
"@angular/core": "12.2.17",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v13/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "13.4.0",
"@angular/compiler": "13.4.0",
"@angular/compiler-cli": "13.4.0",
"@angular/core": "13.4.0",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v14/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "14.3.0",
"@angular/compiler": "14.3.0",
"@angular/compiler-cli": "14.3.0",
"@angular/core": "14.3.0",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v15/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "15.2.10",
"@angular/compiler": "15.2.10",
"@angular/compiler-cli": "15.2.10",
"@angular/core": "15.2.10",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v16/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "16.2.12",
"@angular/compiler": "16.2.12",
"@angular/compiler-cli": "16.2.12",
"@angular/core": "16.2.12",
Expand Down
25 changes: 10 additions & 15 deletions packages/adapters/angular/v17/ng-module.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
const fs = require('fs');
const path = require('path');

let ngComponents = fs.readFileSync('./src/components.ts', 'utf-8');
// ngFile = ngFile.replace(/, NgModule/g, '');
// ngFile = ngFile.replace(/\/\* AutoGen NgModule(.*\n?)*/, '');

const componentList = ngComponents.split('export class');
componentList.splice(0, 1);
componentList.forEach((component, index) => {
componentList[index] = component.replace(/ \{(.*\n?)*/, '').trim();
});

const componentFileContents = fs.readFileSync('./src/components.ts', 'utf-8');
const componentList = [...componentFileContents.matchAll(/export class ([^ ]+)/g)].map((group) => group[1]);
const componentListStr = componentList.join(', ');

fs.writeFileSync(
'./src/index.ts',
`
/* AutoGen NgModule */
import { NgModule } from '@angular/core';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ${componentListStr} } from './components';
export { ${componentListStr} }
import { ReplaceTagDirective } from './angular-component-lib/ReplaceTagDirective';
export { setTagNameTransformer } from './angular-component-lib/tagNameTransformer';
@NgModule({
declarations: [${componentListStr}],
declarations: [ReplaceTagDirective, ${componentListStr}],
exports: [${componentListStr}],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class KoliBriModule {}
export { ${componentListStr} }
`,
'utf-8'
'utf-8',
);
1 change: 1 addition & 0 deletions packages/adapters/angular/v17/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"import": "./dist/index.js"
},
"devDependencies": {
"@angular/common": "17.3.0",
"@angular/compiler": "17.3.0",
"@angular/compiler-cli": "17.3.0",
"@angular/core": "17.3.0",
Expand Down
Binary file not shown.
10 changes: 5 additions & 5 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@
"markdown-it": "14.0.0"
},
"devDependencies": {
"@stencil/angular-output-target": "0.8.4",
"@public-ui/stencil-angular-output-target": "0.9.0",
"@public-ui/stencil-react-output-target": "0.6.0",
"@public-ui/stencil-solid-output-target": "0.2.0",
"@public-ui/stencil-vue-output-target": "0.9.0",
"@stencil/core": "4.12.6",
"@stencil/postcss": "2.1.0",
"@stencil/sass": "3.0.10",
"@stencil/react-output-target": "0.5.3",
"@stencil/solid-output-target": "file:node_martin/stencil-solid-output-target-0.0.1.tgz",
"@stencil/vue-output-target": "0.8.7",
"@types/jest": "26.0.24",
"@types/markdown-it": "13.0.7",
"@types/mustache": "4.2.5",
Expand All @@ -90,9 +90,9 @@
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"autoprefixer": "10.4.18",
"clsx": "2.1.0",
"color-rgba": "2.4.0",
"cross-env": "7.0.3",
"clsx": "2.1.0",
"cssnano": "6.1.0",
"eslint": "8.57.0",
"eslint-plugin-html": "8.0.0",
Expand Down
Loading

0 comments on commit 91ef2be

Please sign in to comment.