-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vitaly Puzrin
committed
Oct 13, 2020
1 parent
cb42dad
commit a2cf20d
Showing
7 changed files
with
111 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import nodeResolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import nodePolyfills from 'rollup-plugin-node-polyfills'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
|
||
const plugins = [ | ||
nodeResolve({ preferBuiltins: true }), | ||
commonjs(), | ||
json({ namedExports: false }), | ||
nodePolyfills(), | ||
// Here terser is used only to force ascii output | ||
terser({ | ||
mangle: false, | ||
compress: false, | ||
format: { | ||
comments: 'all', | ||
beautify: true, | ||
ascii_only: true, | ||
indent_level: 2 | ||
} | ||
}) | ||
]; | ||
|
||
export default [ | ||
{ | ||
input: 'index.js', | ||
output: { | ||
file: 'demo/markdown-it.js', | ||
format: 'umd', | ||
name: 'markdownit' | ||
}, | ||
plugins: plugins | ||
}, | ||
{ | ||
input: 'support/demo_template/index.js', | ||
output: { | ||
file: 'demo/index.js', | ||
format: 'iife', | ||
name: 'demo' | ||
}, | ||
plugins: plugins | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import nodeResolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import nodePolyfills from 'rollup-plugin-node-polyfills'; | ||
import pkg from '../package.json'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
|
||
export default { | ||
input: 'index.js', | ||
output: [ | ||
{ | ||
file: 'dist/markdown-it.js', | ||
format: 'umd', | ||
name: 'markdownit', | ||
plugins: [ | ||
// Here terser is used only to force ascii output | ||
terser({ | ||
mangle: false, | ||
compress: false, | ||
format: { | ||
comments: 'all', | ||
beautify: true, | ||
ascii_only: true, | ||
indent_level: 2 | ||
} | ||
}) | ||
] | ||
}, | ||
{ | ||
file: 'dist/markdown-it.min.js', | ||
format: 'umd', | ||
name: 'markdownit', | ||
plugins: [ | ||
terser({ | ||
format: { | ||
ascii_only: true, | ||
} | ||
}) | ||
] | ||
} | ||
], | ||
plugins: [ | ||
nodeResolve({ preferBuiltins: true }), | ||
commonjs(), | ||
json({ namedExports: false }), | ||
nodePolyfills(), | ||
{ | ||
banner() { | ||
return `/*! ${pkg.name} ${pkg.version} https://github.com/${pkg.repository} @license ${pkg.license} */`; | ||
} | ||
} | ||
] | ||
}; |