svelte-preprocess
Advanced tools
Comparing version 5.0.3 to 5.0.4
@@ -10,3 +10,3 @@ "use strict"; | ||
// Mixins to use svelte template features | ||
const GET_MIXINS = (identationType) => `mixin if(condition) | ||
const GET_MIXINS = (indentationType) => `mixin if(condition) | ||
%_| {#if !{condition}} | ||
@@ -54,3 +54,3 @@ %_block | ||
mixin debug(variables) | ||
%_| {@debug !{variables}}`.replace(/%_/g, identationType === 'tab' ? '\t' : ' '); | ||
%_| {@debug !{variables}}`.replace(/%_/g, indentationType === 'tab' ? '\t' : ' '); | ||
const transformer = async ({ content, filename, options, }) => { | ||
@@ -66,4 +66,4 @@ var _a; | ||
}; | ||
const { type: identationType } = (0, detect_indent_1.default)(content); | ||
const input = `${GET_MIXINS(identationType !== null && identationType !== void 0 ? identationType : 'space')}\n${content}`; | ||
const { type: indentationType } = (0, detect_indent_1.default)(content); | ||
const input = `${GET_MIXINS(indentationType !== null && indentationType !== void 0 ? indentationType : 'space')}\n${content}`; | ||
const compiled = pug_1.default.compile(input, pugOptions); | ||
@@ -70,0 +70,0 @@ let code; |
{ | ||
"name": "svelte-preprocess", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"license": "MIT", | ||
@@ -29,17 +29,2 @@ "main": "dist/index.js", | ||
], | ||
"scripts": { | ||
"prebuild": "node scripts.js rmrf ./dist", | ||
"build": "tsc --build tsconfig.build.json", | ||
"dev": "pnpm build -w", | ||
"test": "jest", | ||
"lint": "eslint --ext js,ts .", | ||
"format": "prettier --write \"**/*.{ts,js,json}\"", | ||
"postinstall": "echo \"[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\"", | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1 && git add CHANGELOG.md", | ||
"patch": "npm version patch -m 'chore(release): %s'", | ||
"minor": "npm version minor -m 'chore(release): %s'", | ||
"major": "npm version major -m 'chore(release): %s'", | ||
"prepublishOnly": "pnpm test && pnpm build", | ||
"prepare": "husky install" | ||
}, | ||
"commitlint": { | ||
@@ -108,3 +93,3 @@ "extends": [ | ||
"sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", | ||
"svelte": "^3.23.0", | ||
"svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0", | ||
"typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" | ||
@@ -143,3 +128,16 @@ }, | ||
} | ||
}, | ||
"scripts": { | ||
"prebuild": "node scripts.js rmrf ./dist", | ||
"build": "tsc --build tsconfig.build.json", | ||
"dev": "pnpm build -w", | ||
"test": "jest", | ||
"lint": "eslint --ext js,ts .", | ||
"format": "prettier --write \"**/*.{ts,js,json}\"", | ||
"postinstall": "echo \"[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\"", | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1 && git add CHANGELOG.md", | ||
"patch": "npm version patch -m 'chore(release): %s'", | ||
"minor": "npm version minor -m 'chore(release): %s'", | ||
"major": "npm version major -m 'chore(release): %s'" | ||
} | ||
} | ||
} |
163521