svelte-preprocess
Advanced tools
Comparing version 2.16.0 to 3.0.0
@@ -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 @@ |
{ | ||
"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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
45217
3
775
455
23
- Removedpostcss-load-config@^2.0.0
- Removedargparse@1.0.10(transitive)
- Removedcaller-callsite@2.0.0(transitive)
- Removedcaller-path@2.0.0(transitive)
- Removedcallsites@2.0.0(transitive)
- Removedcosmiconfig@5.2.1(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedesprima@4.0.1(transitive)
- Removedimport-cwd@2.1.0(transitive)
- Removedimport-fresh@2.0.0(transitive)
- Removedimport-from@2.1.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-directory@0.3.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpostcss-load-config@2.1.2(transitive)
- Removedresolve-from@3.0.0(transitive)
- Removedsprintf-js@1.0.3(transitive)