@stencil/postcss
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -5,7 +5,9 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var postCss = _interopDefault(require('postcss')); | ||
var postCss = require('postcss'); | ||
var path = require('path'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var postCss__default = /*#__PURE__*/_interopDefaultLegacy(postCss); | ||
function loadDiagnostic(context, postcssError, filePath) { | ||
@@ -114,3 +116,3 @@ if (!postcssError || !context) { | ||
function usePlugin(fileName) { | ||
return /(\.css|\.pcss)$/i.test(fileName); | ||
return /(\.css|\.pcss|\.postcss)$/i.test(fileName); | ||
} | ||
@@ -164,3 +166,3 @@ function getRenderOptions(opts, sourceText, context) { | ||
return new Promise(resolve => { | ||
postCss(renderOpts.plugins) | ||
postCss__default['default'](renderOpts.plugins) | ||
.process(renderOpts.data, { | ||
@@ -167,0 +169,0 @@ from: fileName |
@@ -107,3 +107,3 @@ import postCss from 'postcss'; | ||
function usePlugin(fileName) { | ||
return /(\.css|\.pcss)$/i.test(fileName); | ||
return /(\.css|\.pcss|\.postcss)$/i.test(fileName); | ||
} | ||
@@ -110,0 +110,0 @@ function getRenderOptions(opts, sourceText, context) { |
import * as path from 'path'; | ||
export function usePlugin(fileName) { | ||
return /(\.css|\.pcss)$/i.test(fileName); | ||
return /(\.css|\.pcss|\.postcss)$/i.test(fileName); | ||
} | ||
@@ -5,0 +5,0 @@ export function getRenderOptions(opts, sourceText, context) { |
{ | ||
"name": "@stencil/postcss", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -23,18 +23,18 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"postcss": "~7.0.17" | ||
"postcss": "~8.2.1" | ||
}, | ||
"peerDependencies": { | ||
"@stencil/core": "^1.0.2" | ||
"@stencil/core": ">=2.3.0" | ||
}, | ||
"devDependencies": { | ||
"@stencil/core": "^1.0.2", | ||
"@types/jest": "^24.0.13", | ||
"@types/node": "^12.0.7", | ||
"jest": "^24.8.0", | ||
"np": "^5.0.3", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^1.14.1", | ||
"tslint": "^5.9.1", | ||
"@types/jest": "^26.0.19", | ||
"@types/node": "^14.14.13", | ||
"jest": "^26.6.3", | ||
"np": "^7.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.35.0", | ||
"tslint": "^5.20.1", | ||
"tslint-ionic-rules": "0.0.21", | ||
"typescript": "^3.5.1" | ||
"typescript": "^4.1.3" | ||
}, | ||
@@ -41,0 +41,0 @@ "repository": { |
@@ -11,3 +11,3 @@ # @stencil/postcss | ||
Next, within the project's `stencil.config.js` file, import the plugin and add | ||
Next, within the project's `stencil.config.ts` file, import the plugin and add | ||
it to the `plugins` config. In the example below we're using the `autoprefixer` postcss plugin, so you'll also have to run: | ||
@@ -19,2 +19,4 @@ | ||
This plugin requires Node.js 14 or higher. For older Node versions, see the 1.x release. | ||
#### stencil.config.ts | ||
@@ -24,3 +26,3 @@ ```ts | ||
import { postcss } from '@stencil/postcss'; | ||
import * as autoprefixer from 'autoprefixer'; | ||
import autoprefixer from 'autoprefixer'; | ||
@@ -79,2 +81,6 @@ export const config: Config = { | ||
## Valid file extensions | ||
This plugin will only transpile files whose extensions are `.css`, `.pcss`, or `.postcss`. | ||
## Related | ||
@@ -81,0 +87,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28555
549
96
1
+ Added@stencil/core@4.25.1(transitive)
+ Addedcolorette@1.4.0(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addedpostcss@8.2.15(transitive)
- Removed@stencil/core@1.17.4(transitive)
- Removedpicocolors@0.2.1(transitive)
- Removedpostcss@7.0.39(transitive)
- Removedtypescript@3.9.7(transitive)
Updatedpostcss@~8.2.1