Skip to content

Commit

Permalink
Merge pull request #16 from rudderlabs/feat/package-changes
Browse files Browse the repository at this point in the history
feat: update package for prod
  • Loading branch information
akashrpo authored Feb 28, 2024
2 parents 5544e2d + 34fe908 commit 951bcdc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 100
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bin": "./src/cli/index.js",
"scripts": {
"dev": "TS_NODE_FILES=true NODE_ENV=development ts-node ./src/cli",
"prod": "TS_NODE_FILES=true NODE_ENV=production ts-node ./src/cli prod",
"build": "rm -rf dist && tsc && copyfiles --up 1 \"src/**/*.hbs\" dist/src/ && copyfiles \"README.*\" dist/ && copyfiles \"CHANGELOG.*\" dist/",
"test": "jest --testPathIgnorePatterns 'tests/e2e/.*' 'example' --coverage",
"e2e": "make e2e",
Expand Down
2 changes: 1 addition & 1 deletion src/generators/javascript/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const javascript: Generator<
const formattedContents = prettier.format(contents, {
parser: client.options.client.language === Language.TYPESCRIPT ? 'typescript' : 'babel',
// Overwrite a few of the standard prettier settings to match with our RudderTyper configuration:
useTabs: true,
tabWidth: 2,
singleQuote: true,
semi: false,
trailingComma:
Expand Down
2 changes: 1 addition & 1 deletion src/generators/javascript/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export type ViolationHandler = (
violations: {{#if isDevelopment}}ErrorObject{{else}}any{{/if}}[]
) => void

{{#if isDevelopment}}
/**
* The default handler that is fired if none is supplied with setRudderTyperOptions.
{{#if isBrowser}}
Expand All @@ -58,7 +59,6 @@ export type ViolationHandler = (
* a warning message to the console.
{{/if}}
*/
{{#if isDevelopment}}
export const defaultValidationErrorHandler: ViolationHandler = (message, violations) => {
const msg = JSON.stringify({
type: 'RudderTyper JSON Schema Validation Error',
Expand Down

0 comments on commit 951bcdc

Please sign in to comment.