mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 17:27:22 +08:00
This reverts commit2b4a9df2d9. Reason for revert: subsequent presubmit uploads should be fixed now. Original change's description: > Revert "Reland "Update stylelint to 14.0.1"" > > This reverts commitf2ea2c940d. > > Reason for revert: https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_linux/b8831129368825517985/overview > > Original change's description: > > Reland "Update stylelint to 14.0.1" > > > > This reverts commit6c0f161c95. > > > > Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed > > > > Original change's description: > > > Revert "Update stylelint to 14.0.1" > > > > > > This reverts commit1e08ee816b. > > > > > > Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview > > > > > > Original change's description: > > > > Update stylelint to 14.0.1 > > > > > > > > This also upgrades PostCSS to 8.3.11. > > > > > > > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration > > > > R=szuend@chromium.org > > > > > > > > Bug: none > > > > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31 > > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541 > > > > Reviewed-by: Simon Zünd <szuend@chromium.org> > > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> > > > > > > Bug: none > > > Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399 > > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > > > Owners-Override: Alex Rudenko <alexrudenko@chromium.org> > > > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> > > > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration > > > > Bug: none > > Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7 > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206 > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> > > Reviewed-by: Simon Zünd <szuend@chromium.org> > > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> > > Bug: none > Change-Id: Idc6c9f5cc1e225c752799461eb0344e94b4ad1e5 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264222 > Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration Bug: none Change-Id: I609941d48b46bfcf454b03dcc75a76d460fbe674 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264223 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
96 lines
2.6 KiB
JavaScript
96 lines
2.6 KiB
JavaScript
'use strict'
|
|
|
|
let CssSyntaxError = require('./css-syntax-error')
|
|
let Declaration = require('./declaration')
|
|
let LazyResult = require('./lazy-result')
|
|
let Container = require('./container')
|
|
let Processor = require('./processor')
|
|
let stringify = require('./stringify')
|
|
let fromJSON = require('./fromJSON')
|
|
let Document = require('./document')
|
|
let Warning = require('./warning')
|
|
let Comment = require('./comment')
|
|
let AtRule = require('./at-rule')
|
|
let Result = require('./result.js')
|
|
let Input = require('./input')
|
|
let parse = require('./parse')
|
|
let list = require('./list')
|
|
let Rule = require('./rule')
|
|
let Root = require('./root')
|
|
let Node = require('./node')
|
|
|
|
function postcss(...plugins) {
|
|
if (plugins.length === 1 && Array.isArray(plugins[0])) {
|
|
plugins = plugins[0]
|
|
}
|
|
return new Processor(plugins)
|
|
}
|
|
|
|
postcss.plugin = function plugin(name, initializer) {
|
|
if (console && console.warn) {
|
|
console.warn(
|
|
name +
|
|
': postcss.plugin was deprecated. Migration guide:\n' +
|
|
'https://evilmartians.com/chronicles/postcss-8-plugin-migration'
|
|
)
|
|
if (process.env.LANG && process.env.LANG.startsWith('cn')) {
|
|
// istanbul ignore next
|
|
console.warn(
|
|
name +
|
|
': 里面 postcss.plugin 被弃用. 迁移指南:\n' +
|
|
'https://www.w3ctech.com/topic/2226'
|
|
)
|
|
}
|
|
}
|
|
function creator(...args) {
|
|
let transformer = initializer(...args)
|
|
transformer.postcssPlugin = name
|
|
transformer.postcssVersion = new Processor().version
|
|
return transformer
|
|
}
|
|
|
|
let cache
|
|
Object.defineProperty(creator, 'postcss', {
|
|
get() {
|
|
if (!cache) cache = creator()
|
|
return cache
|
|
}
|
|
})
|
|
|
|
creator.process = function (css, processOpts, pluginOpts) {
|
|
return postcss([creator(pluginOpts)]).process(css, processOpts)
|
|
}
|
|
|
|
return creator
|
|
}
|
|
|
|
postcss.stringify = stringify
|
|
postcss.parse = parse
|
|
postcss.fromJSON = fromJSON
|
|
postcss.list = list
|
|
|
|
postcss.comment = defaults => new Comment(defaults)
|
|
postcss.atRule = defaults => new AtRule(defaults)
|
|
postcss.decl = defaults => new Declaration(defaults)
|
|
postcss.rule = defaults => new Rule(defaults)
|
|
postcss.root = defaults => new Root(defaults)
|
|
postcss.document = defaults => new Document(defaults)
|
|
|
|
postcss.CssSyntaxError = CssSyntaxError
|
|
postcss.Declaration = Declaration
|
|
postcss.Container = Container
|
|
postcss.Document = Document
|
|
postcss.Comment = Comment
|
|
postcss.Warning = Warning
|
|
postcss.AtRule = AtRule
|
|
postcss.Result = Result
|
|
postcss.Input = Input
|
|
postcss.Rule = Rule
|
|
postcss.Root = Root
|
|
postcss.Node = Node
|
|
|
|
LazyResult.registerPostcss(postcss)
|
|
|
|
module.exports = postcss
|
|
postcss.default = postcss
|