chore(build): es5 compatibility for browser (#5560)
parent
4dd7c79bbf
commit
bd3834010c
|
@ -0,0 +1,14 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "$(node_version)"
|
||||
displayName: "Install Node.js"
|
||||
|
||||
- script: yarn install --frozen-lockfile
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- script: yarn build
|
||||
displayName: "Build dist"
|
||||
|
||||
- script: yarn lint-dist
|
||||
displayName: "Lint dist"
|
|
@ -16,6 +16,15 @@ jobs:
|
|||
steps:
|
||||
- template: .azure-pipelines/lint.yml
|
||||
|
||||
- job: Lint_Dist_Linux_Node_v10
|
||||
displayName: Lint Dist on Linux Node v10
|
||||
pool:
|
||||
vmImage: "Ubuntu 16.04"
|
||||
variables:
|
||||
node_version: 10
|
||||
steps:
|
||||
- template: .azure-pipelines/lint-dist.yml
|
||||
|
||||
- job: Dev_Test_Windows_Node_v10
|
||||
displayName: Dev Tests on Windows Node v10
|
||||
pool:
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
|
||||
"lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter",
|
||||
"lint-docs": "prettylint {.,docs,website,website/blog}/*.md",
|
||||
"lint-dist": "eslint --no-eslintrc --no-ignore --env=browser \"dist/!(bin-prettier|index|third-party).js\"",
|
||||
"build": "node --max-old-space-size=2048 ./scripts/build/build.js",
|
||||
"build-docs": "node ./scripts/build-docs.js",
|
||||
"check-deps": "node ./scripts/check-deps.js"
|
||||
|
|
|
@ -99,7 +99,7 @@ async function run(params) {
|
|||
await execa("rm", ["-rf", ".cache"]);
|
||||
}
|
||||
|
||||
const bundleCache = new Cache(".cache/", "v7");
|
||||
const bundleCache = new Cache(".cache/", "v8");
|
||||
await bundleCache.load();
|
||||
|
||||
console.log(chalk.inverse(" Building packages "));
|
||||
|
|
|
@ -20,7 +20,7 @@ module.exports = function() {
|
|||
);
|
||||
|
||||
return {
|
||||
code: `const json = ${json}; export default json;`,
|
||||
code: `var json = ${json}; export default json;`,
|
||||
map: { mappings: "" }
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue