postcss-single-charset
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "postcss-single-charset", | ||
"description": "Pop first @charset rule in CSS file.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "Kyo Nagashima <hail2u@gmail.com> (https://kyonagashima.com/)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -20,6 +20,42 @@ postcss-single-charset | ||
var input = fs.readFileSync('input.css', 'utf8'); | ||
var output = postcss().use(require('postcss-single-charset')()).process(input).css; | ||
var output = postcss().use( | ||
require('postcss-single-charset')() | ||
).process(input).css; | ||
fs.writeFileSync('output.css', output); | ||
### As Grunt plugin | ||
This package also includes Grunt plugin. You can load like that: | ||
grunt.loadNpmTasks('postcss-single-charset'); | ||
And configure like that: | ||
grunt.initConfig({ | ||
single_charset: { | ||
basic: { | ||
files: { | ||
'dest/basic.css': ['src/basic.css'] | ||
} | ||
}, | ||
with_options: { | ||
options: { | ||
map: { | ||
inline: false | ||
} | ||
}, | ||
files: { | ||
'dest/with_options.css': ['src/with_options.css'] | ||
} | ||
} | ||
} | ||
}); | ||
`options` are mainly for Source Maps. See [PostCSS document][1] for more | ||
information. | ||
LICENSE | ||
@@ -29,1 +65,4 @@ ------- | ||
MIT: http://hail2u.mit-license.org/2015 | ||
[1]: https://github.com/postcss/postcss#source-map-1 |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
3546
6
48
67
1