Skip to content

Commit

Permalink
Merge pull request #63 from razroo/downgrade-t-cjs
Browse files Browse the repository at this point in the history
downgrade to cjs for aws lambdax
  • Loading branch information
CharlieGreenman authored Oct 26, 2023
2 parents 2cc98d1 + 34f2726 commit 9267f85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
21 changes: 13 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"main": "./lib/cjs/index.js",
"scripts": {
"clean": "rm -rf ./lib",
"build": "npm run clean && npm run build:esm && npm run build:cjs && npm run babel:build",
"build": "npm run clean && npm run build:esm && npm run build:cjs",
"build:esm": "tsc -p ./tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs",
"build:cjs": "tsc -p ./tsconfig.cjs.json",
"babel:build": "babel lib/cjs --out-dir lib/cjs",
"babel:build": "babel lib/cjs --out-dir lib/cjs && babel node_modules/angular-html-parser --out-dir node_modules/angular-html-parser",
"prepack": "npm run build",
"format": "prettier --write \"src/**/*.(js|ts)\"",
"lint": "eslint src --ext .js,.ts",
Expand Down Expand Up @@ -87,7 +87,7 @@
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
"@types/ejs": "^3.1.2",
"angular-html-parser": "^4.0.1",
"angular-html-parser": "1.8.0",
"ejs": "^3.1.9",
"fast-glob": "3.2.7",
"glob": "^8.0.3",
Expand Down
8 changes: 1 addition & 7 deletions src/rz/angular/morph-angular-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ import { addPropertyToHtmlTag } from './add-property-to-html-tag/add-property-to
import { astToHtml } from './ast-to-html/ast-to-html';
import * as prettier from 'prettier';
import * as parserHtml from 'prettier/parser-html';

// hack to allow esm to load
let angularHtmlParse: any;
(async function () {
const module = await import('angular-html-parser');
angularHtmlParse = module.parse
})();
import {parse as angularHtmlParse} from 'angular-html-parser';

export function convertToAngularHtmlAndPrettify(htmlAst: any): string {
const htmlString = astToHtml(htmlAst.rootNodes);
Expand Down

0 comments on commit 9267f85

Please sign in to comment.