Socket
Socket
Sign inDemoInstall

svelte-preprocess

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-preprocess - npm Package Compare versions

Comparing version 2.16.0 to 3.0.0

20

CHANGELOG.md

@@ -0,5 +1,25 @@

# [3.0.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.16.0...v3.0.0) (2019-08-28)
### Performance Improvements
* ⚡️ make postcss-load-config optional for better pkg size ([7ab9c72](https://github.com/kaisermann/svelte-preprocess/commit/7ab9c72))
### BREAKING CHANGES
* To load PostCSS config automatically from a file, now it's needed to
manually install "postcss-load-config".
# [2.16.0](https://github.com/kaisermann/svelte-preprocess/compare/v2.15.2...v2.16.0) (2019-08-28)
### Features
* 🎸 add "transpileOnly" option to skip type check ([3e46741](https://github.com/kaisermann/svelte-preprocess/commit/3e46741)), closes [#54](https://github.com/kaisermann/svelte-preprocess/issues/54)
## [2.15.2](https://github.com/kaisermann/svelte-preprocess/compare/v2.15.0...v2.15.2) (2019-08-28)

@@ -6,0 +26,0 @@

6

package.json
{
"name": "svelte-preprocess",
"version": "2.16.0",
"version": "3.0.0",
"license": "MIT",

@@ -28,3 +28,3 @@ "main": "src/index.js",

"format": "prettier --loglevel silent --write \"src/**/*.js\" && eslint --fix \"src/**/*.js\"",
"postinstall": "node -e \"console.log('\\u001b[36m\\u001b[1m[svelte-preprocess] Don\\'t forget to install the preprocessors packages that will be used: \\u001b[22m\\u001b[39m\\u001b[34mnode-sass/sass, stylus, less, postcss, coffeescript, pug, etc...\\u001b[0m')\"",
"postinstall": "node -e \"console.log('\\u001b[36m\\u001b[1m[svelte-preprocess] Don\\'t forget to install the preprocessors packages that will be used: \\u001b[22m\\u001b[39m\\u001b[34mnode-sass/sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...\\u001b[0m')\"",
"version": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",

@@ -62,2 +62,3 @@ "tag": "git tag -a v$npm_package_version -m 'Release v$npm_package_version'",

"postcss-easy-import": "^3.0.0",
"postcss-load-config": "^2.1.0",
"prettier": "^1.16.4",

@@ -75,5 +76,4 @@ "pug": "^2.0.3",

"detect-indent": "^6.0.0",
"postcss-load-config": "^2.0.0",
"strip-indent": "^2.0.0"
}
}

@@ -32,14 +32,16 @@ # Svelte Preprocess

`npm install --save-dev svelte-preprocess`
`npm install -D svelte-preprocess`
The preprocessor module installation is up to the developer.
- `postcss`: `npm install --save-dev postcss`
- `coffeescript`: `npm install --save-dev coffeescript`
- `typescript`: `npm install --save-dev typescript`
- `less`: `npm install --save-dev less`
- `sass`: `npm install --save-dev node-sass`
- `pug`: `npm install --save-dev pug`
- `stylus`: `npm install --save-dev stylus`
- `postcss`: `npm install -D postcss postcss-load-config`
- `coffeescript`: `npm install -D coffeescript`
- `typescript`: `npm install -D typescript`
- `less`: `npm install -D less`
- `sass`: `npm install -D node-sass`
- `pug`: `npm install -D pug`
- `stylus`: `npm install -D stylus`
_Note: If you want to load your `postcss` configuration from a external file, make sure to also install `postcss-load-config`._
## Features

@@ -46,0 +48,0 @@

const postcss = require('postcss')
const postcssLoadConfig = require(`postcss-load-config`)

@@ -40,6 +39,11 @@ const process = async (

/** If not, look for a postcss config file */
const postcssLoadConfig = require(`postcss-load-config`)
options = await postcssLoadConfig(options, options.configFilePath)
} catch (e) {
/** Something went wrong, do nothing */
console.error(e.message)
if (e.code === 'MODULE_NOT_FOUND') {
console.error(
`[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file, make sure to install "postcss-load-config" and try again ʕ•ᴥ•ʔ`,
)
}
return { code: content, map }

@@ -46,0 +50,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc