Socket
Socket
Sign inDemoInstall

svelte-preprocess

Package Overview
Dependencies
2
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0 to 6.0.1

22

dist/index.d.ts
import { sveltePreprocess } from './autoProcess';
/** @deprecated Use the named export instead: `import { sveltePreprocess } from 'svelte-preprocess'` */
declare const _default: typeof sveltePreprocess;
export default _default;
export { default as pug } from './processors/pug';
export { default as coffeescript } from './processors/coffeescript';
export { default as typescript } from './processors/typescript';
export { default as less } from './processors/less';
export { default as scss, default as sass } from './processors/scss';
export { default as stylus } from './processors/stylus';
export { default as postcss } from './processors/postcss';
export { default as globalStyle } from './processors/globalStyle';
export { default as babel } from './processors/babel';
export { default as replace } from './processors/replace';
export { sveltePreprocess } from './autoProcess';
export { pug } from './processors/pug';
export { coffeescript } from './processors/coffeescript';
export { typescript } from './processors/typescript';
export { less } from './processors/less';
export { scss, sass } from './processors/scss';
export { stylus } from './processors/stylus';
export { postcss } from './processors/postcss';
export { globalStyle } from './processors/globalStyle';
export { babel } from './processors/babel';
export { replace } from './processors/replace';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.replace = exports.babel = exports.globalStyle = exports.postcss = exports.stylus = exports.sass = exports.scss = exports.less = exports.typescript = exports.coffeescript = exports.pug = void 0;
exports.replace = exports.babel = exports.globalStyle = exports.postcss = exports.stylus = exports.sass = exports.scss = exports.less = exports.typescript = exports.coffeescript = exports.pug = exports.sveltePreprocess = void 0;
const autoProcess_1 = require("./autoProcess");
// default auto processor
// crazy es6/cjs export mix for backward compatibility
/** @deprecated Use the named export instead: `import { sveltePreprocess } from 'svelte-preprocess'` */
// eslint-disable-next-line no-multi-assign
exports.default = exports = module.exports = autoProcess_1.sveltePreprocess;
// stand-alone processors to be included manually */
// also export auto preprocessor as named export to sidestep default export type issues with "module": "NodeNext" in tsconfig.
// Don't just do export { sveltePreprocess } because the transpiled output is wrong then.
var autoProcess_2 = require("./autoProcess");
Object.defineProperty(exports, "sveltePreprocess", { enumerable: true, get: function () { return autoProcess_2.sveltePreprocess; } });
// stand-alone processors to be included manually, use their named exports for better transpilation or else node will not detect the named exports properly
var pug_1 = require("./processors/pug");
Object.defineProperty(exports, "pug", { enumerable: true, get: function () { return __importDefault(pug_1).default; } });
Object.defineProperty(exports, "pug", { enumerable: true, get: function () { return pug_1.pug; } });
var coffeescript_1 = require("./processors/coffeescript");
Object.defineProperty(exports, "coffeescript", { enumerable: true, get: function () { return __importDefault(coffeescript_1).default; } });
Object.defineProperty(exports, "coffeescript", { enumerable: true, get: function () { return coffeescript_1.coffeescript; } });
var typescript_1 = require("./processors/typescript");
Object.defineProperty(exports, "typescript", { enumerable: true, get: function () { return __importDefault(typescript_1).default; } });
Object.defineProperty(exports, "typescript", { enumerable: true, get: function () { return typescript_1.typescript; } });
var less_1 = require("./processors/less");
Object.defineProperty(exports, "less", { enumerable: true, get: function () { return __importDefault(less_1).default; } });
Object.defineProperty(exports, "less", { enumerable: true, get: function () { return less_1.less; } });
var scss_1 = require("./processors/scss");
Object.defineProperty(exports, "scss", { enumerable: true, get: function () { return __importDefault(scss_1).default; } });
Object.defineProperty(exports, "sass", { enumerable: true, get: function () { return __importDefault(scss_1).default; } });
Object.defineProperty(exports, "scss", { enumerable: true, get: function () { return scss_1.scss; } });
Object.defineProperty(exports, "sass", { enumerable: true, get: function () { return scss_1.sass; } });
var stylus_1 = require("./processors/stylus");
Object.defineProperty(exports, "stylus", { enumerable: true, get: function () { return __importDefault(stylus_1).default; } });
Object.defineProperty(exports, "stylus", { enumerable: true, get: function () { return stylus_1.stylus; } });
var postcss_1 = require("./processors/postcss");
Object.defineProperty(exports, "postcss", { enumerable: true, get: function () { return __importDefault(postcss_1).default; } });
Object.defineProperty(exports, "postcss", { enumerable: true, get: function () { return postcss_1.postcss; } });
var globalStyle_1 = require("./processors/globalStyle");
Object.defineProperty(exports, "globalStyle", { enumerable: true, get: function () { return __importDefault(globalStyle_1).default; } });
Object.defineProperty(exports, "globalStyle", { enumerable: true, get: function () { return globalStyle_1.globalStyle; } });
var babel_1 = require("./processors/babel");
Object.defineProperty(exports, "babel", { enumerable: true, get: function () { return __importDefault(babel_1).default; } });
Object.defineProperty(exports, "babel", { enumerable: true, get: function () { return babel_1.babel; } });
var replace_1 = require("./processors/replace");
Object.defineProperty(exports, "replace", { enumerable: true, get: function () { return __importDefault(replace_1).default; } });
Object.defineProperty(exports, "replace", { enumerable: true, get: function () { return replace_1.replace; } });
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options?: Options.Babel) => PreprocessorGroup;
export default _default;
declare const babel: (options?: Options.Babel) => PreprocessorGroup;
export default babel;
export { babel };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.babel = void 0;
const utils_1 = require("../modules/utils");
const tagInfo_1 = require("../modules/tagInfo");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const babel = (options) => ({
async script(svelteFile) {

@@ -47,1 +48,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/babel')));

});
exports.babel = babel;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = babel;
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options?: Options.Coffeescript) => PreprocessorGroup;
export default _default;
declare const coffeescript: (options?: Options.Coffeescript) => PreprocessorGroup;
export default coffeescript;
export { coffeescript };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.coffeescript = void 0;
const tagInfo_1 = require("../modules/tagInfo");
const utils_1 = require("../modules/utils");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const coffeescript = (options) => ({
async script(svelteFile) {

@@ -56,1 +57,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/coffeescript')));

});
exports.coffeescript = coffeescript;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = coffeescript;
import type { PreprocessorGroup } from '../types';
declare const _default: () => PreprocessorGroup;
export default _default;
declare const globalStyle: () => PreprocessorGroup;
export default globalStyle;
export { globalStyle };

@@ -26,3 +26,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = () => {
exports.globalStyle = void 0;
const globalStyle = () => {
return {

@@ -38,1 +39,5 @@ async style({ content, attributes, filename }) {

};
exports.globalStyle = globalStyle;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = globalStyle;
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options?: Options.Less) => PreprocessorGroup;
export default _default;
declare const less: (options?: Options.Less) => PreprocessorGroup;
export default less;
export { less };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.less = void 0;
const tagInfo_1 = require("../modules/tagInfo");
const utils_1 = require("../modules/utils");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const less = (options) => ({
async style(svelteFile) {

@@ -50,1 +51,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/less')));

});
exports.less = less;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = less;
import type { PreprocessorGroup, Options } from '../types';
/** Adapted from https://github.com/TehShrike/svelte-preprocess-postcss */
declare const _default: (options?: Options.Postcss) => PreprocessorGroup;
export default _default;
declare const postcss: (options?: Options.Postcss) => PreprocessorGroup;
export { postcss };
export default postcss;

@@ -26,2 +26,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.postcss = void 0;
const tagInfo_1 = require("../modules/tagInfo");

@@ -31,3 +32,3 @@ const utils_1 = require("../modules/utils");

/** Adapted from https://github.com/TehShrike/svelte-preprocess-postcss */
exports.default = (options) => ({
const postcss = (options) => ({
async style(svelteFile) {

@@ -50,1 +51,3 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/postcss')));

});
exports.postcss = postcss;
exports.default = postcss;
import type { Options, PreprocessorGroup } from '../types/index';
declare const _default: (options?: Options.Pug) => PreprocessorGroup;
export default _default;
declare const pug: (options?: Options.Pug) => PreprocessorGroup;
export default pug;
export { pug };

@@ -26,5 +26,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.pug = void 0;
const prepareContent_1 = require("../modules/prepareContent");
const markup_1 = require("../modules/markup");
exports.default = (options) => ({
const pug = (options) => ({
async markup({ content, filename }) {

@@ -42,1 +43,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/pug')));

});
exports.pug = pug;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = pug;
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options: Options.Replace) => PreprocessorGroup;
export default _default;
declare const replace: (options: Options.Replace) => PreprocessorGroup;
export default replace;
export { replace };

@@ -26,3 +26,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (options) => ({
exports.replace = void 0;
const replace = (options) => ({
async markup({ content, filename }) {

@@ -33,1 +34,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/replace')));

});
exports.replace = replace;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = replace;
import type { PreprocessorGroup, Options } from '../types';
declare const _default: (options?: Options.Sass) => PreprocessorGroup;
export default _default;
declare const scss: (options?: Options.Sass) => PreprocessorGroup;
export default scss;
export { scss, scss as sass };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.sass = exports.scss = void 0;
const tagInfo_1 = require("../modules/tagInfo");
const utils_1 = require("../modules/utils");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const scss = (options) => ({
async style(svelteFile) {

@@ -57,1 +58,6 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/scss')));

});
exports.scss = scss;
exports.sass = scss;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = scss;
import type { Options, PreprocessorGroup } from '../types';
declare const _default: (options?: Options.Stylus) => PreprocessorGroup;
export default _default;
declare const stylus: (options?: Options.Stylus) => PreprocessorGroup;
export default stylus;
export { stylus };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stylus = void 0;
const tagInfo_1 = require("../modules/tagInfo");
const utils_1 = require("../modules/utils");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const stylus = (options) => ({
async style(svelteFile) {

@@ -56,1 +57,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/stylus')));

});
exports.stylus = stylus;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = stylus;
import type { Options, PreprocessorGroup } from '../types';
declare const _default: (options?: Options.Typescript) => PreprocessorGroup;
export default _default;
declare const typescript: (options?: Options.Typescript) => PreprocessorGroup;
export default typescript;
export { typescript };

@@ -26,6 +26,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.typescript = void 0;
const tagInfo_1 = require("../modules/tagInfo");
const utils_1 = require("../modules/utils");
const prepareContent_1 = require("../modules/prepareContent");
exports.default = (options) => ({
const typescript = (options) => ({
async script(svelteFile) {

@@ -51,1 +52,5 @@ const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/typescript')));

});
exports.typescript = typescript;
// both for backwards compat with old svelte-preprocess versions
// (was only default export once, now is named export because of transpilation causing node not to detect the named exports of 'svelte-preprocess' otherwise)
exports.default = typescript;
{
"name": "svelte-preprocess",
"version": "6.0.0",
"version": "6.0.1",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "commonjs",
"exports": {

@@ -8,0 +9,0 @@ ".": {

@@ -44,6 +44,6 @@ # Svelte Preprocess

```js
import preprocess from 'svelte-preprocess';
import { sveltePreprocess } from 'svelte-preprocess';
const config = {
preprocess: preprocess({ ... })
preprocess: sveltePreprocess({ ... })
}

@@ -125,5 +125,5 @@

```js
import preprocess from 'svelte-preprocess'
import { sveltePreprocess } from 'svelte-preprocess'
...
preprocess: preprocess({
preprocess: sveltePreprocess({
babel: {

@@ -174,3 +174,3 @@ presets: [

```svelte
{#if "production" !== 'development'}
{#if 'production' !== 'development'}
<h1>Production environment!</h1>

@@ -177,0 +177,0 @@ {/if}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc