Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): es5 compatibility for browser #5560

Merged
merged 1 commit into from Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .azure-pipelines/lint-dist.yml
@@ -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"
9 changes: 9 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/build.js
Expand Up @@ -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 "));
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/rollup-plugins/evaluate.js
Expand Up @@ -20,7 +20,7 @@ module.exports = function() {
);

return {
code: `const json = ${json}; export default json;`,
code: `var json = ${json}; export default json;`,
map: { mappings: "" }
};
}
Expand Down