Get started with prettier CDN
MIT licensed
Code formatter: Prettier formats JS/TypeScript consistently in development environments.
Tags:- format
Stable version
Copied!
How to start using prettier CDN
<html>
<head>
<title>Get started with prettier CDN - cdnhub.io</title>
<script src="https://cdn.jsdelivr.net/npm/prettier/[email protected]"></script>
</head>
<body>
<script>
const prettier = require('prettier/standalone');
const fs = require('fs');
const path = require('path');
const filePath = path.join(__filename, 'input.js');
const output = prettier.formatFileSync(filePath, { parser: 'babel' });
fs.writeFileSync(filePath, output);
console.log('Formatted file:', filePath);
</script>
<script src="input.js"></script>
</body>
</html>
Copied!
Copied!
All versions
2.0.3
2.0.4
2.0.5
2.1.0
2.1.1
2.1.2
2.2.0
2.2.1
2.3.0
2.3.1
2.3.2
2.4.0
2.4.1
2.5.0
2.5.1
2.6.0
2.6.1
2.6.2
2.7.0
2.7.1
2.8.0
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
2.8.6
2.8.7
2.8.8
3.0.0
3.0.0-alpha.0
3.0.0-alpha.1
3.0.0-alpha.10
3.0.0-alpha.11
3.0.0-alpha.12
3.0.0-alpha.2
3.0.0-alpha.3
3.0.0-alpha.4
3.0.0-alpha.5
3.0.0-alpha.6
3.0.0-alpha.7-for-vscode
3.0.0-alpha.8-for-vscode
3.0.0-alpha.9-for-vscode
3.0.1
3.0.2
3.0.3
3.1.0
3.1.1
3.2.0
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.3.0
3.3.1
3.3.2
3.3.3
3.4.0
*** 3.4.1
4.0.0-alpha.0
4.0.0-alpha.1
4.0.0-alpha.10
4.0.0-alpha.2
4.0.0-alpha.3
4.0.0-alpha.4
4.0.0-alpha.5
4.0.0-alpha.6
4.0.0-alpha.7
4.0.0-alpha.8
4.0.0-alpha.9