Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/spookey/slick.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrieder Griesshammer <frieder.griesshammer@der-beweis.de>2021-05-14 20:16:37 +0300
committerFrieder Griesshammer <frieder.griesshammer@der-beweis.de>2021-05-14 20:16:37 +0300
commit2202aff184070bd7900168fe9ad889a5dc78ad22 (patch)
tree55f74da1a37ddc90290378f716e6c26fc4c9a4f0
parent6e8b1f48a1d04c08f6b9b61ed17e1fe4d9882c82 (diff)
Drop pointless function definitions and calls from rollup config
-rw-r--r--CHANGELOG.md3
-rw-r--r--rollup.config.js120
2 files changed, 60 insertions, 63 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5ff296e..2b3ecc8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,7 +18,8 @@ and this project adheres to
``source-sans`` and ``source-serif`` (got renamed).
### Fixed
-- Display of line numbers in inline code blocks
+- Display of line numbers in inline code blocks.
+- Some cruft inside `rollup.config.js`.
## [v0.3.3]
diff --git a/rollup.config.js b/rollup.config.js
index 08c8280..bf5dabb 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -26,73 +26,69 @@ const STATIC = path.normalize(path.join(
__dirname, 'static',
));
-const assetStyle = () => {
- return {
- input: path.join(SOURCES, '_style.css'),
- output: {
- file: path.join(ASSETS, 'style.css'),
- format: 'system',
- },
- plugins: [
- postcss({
- plugins: [
- cssimport(),
- cssurl({
- url: 'copy',
- assetsPath: path.join(STATIC, 'assets', 'fonts'),
- useHash: true,
- }),
- cssurl({
- url: (asset) => path.relative(
- STATIC, path.join(NODE_M, asset.url)
- ),
- }),
- cssprefixer(),
- cssdiscard({
- removeAll: true,
- }),
- ],
- extract: true,
- minimize: !DEVELOP,
- sourceMap: (DEVELOP ? 'inline' : false),
- }),
- copier({
- items: [{
- src: path.join(NODE_M, 'purecss', 'LICENSE'),
- dest: path.join(STATIC, 'assets', 'license-purecss'),
- }, {
- src: path.join(NODE_M, 'source-code-pro', 'LICENSE.md'),
- dest: path.join(STATIC, 'assets', 'license-source-code-pro.md'),
- }, {
- src: path.join(NODE_M, 'source-sans', 'LICENSE.md'),
- dest: path.join(STATIC, 'assets', 'license-source-sans-pro.md'),
- }, {
- src: path.join(NODE_M, 'source-serif', 'LICENSE.md'),
- dest: path.join(STATIC, 'assets', 'license-source-serif-pro.md'),
- }],
- }),
- ],
- };
+const assetStyle = {
+ input: path.join(SOURCES, '_style.css'),
+ output: {
+ file: path.join(ASSETS, 'style.css'),
+ format: 'system',
+ },
+ plugins: [
+ postcss({
+ plugins: [
+ cssimport(),
+ cssurl({
+ url: 'copy',
+ assetsPath: path.join(STATIC, 'assets', 'fonts'),
+ useHash: true,
+ }),
+ cssurl({
+ url: (asset) => path.relative(
+ STATIC, path.join(NODE_M, asset.url)
+ ),
+ }),
+ cssprefixer(),
+ cssdiscard({
+ removeAll: true,
+ }),
+ ],
+ extract: true,
+ minimize: !DEVELOP,
+ sourceMap: (DEVELOP ? 'inline' : false),
+ }),
+ copier({
+ items: [{
+ src: path.join(NODE_M, 'purecss', 'LICENSE'),
+ dest: path.join(STATIC, 'assets', 'license-purecss'),
+ }, {
+ src: path.join(NODE_M, 'source-code-pro', 'LICENSE.md'),
+ dest: path.join(STATIC, 'assets', 'license-source-code-pro.md'),
+ }, {
+ src: path.join(NODE_M, 'source-sans', 'LICENSE.md'),
+ dest: path.join(STATIC, 'assets', 'license-source-sans-pro.md'),
+ }, {
+ src: path.join(NODE_M, 'source-serif', 'LICENSE.md'),
+ dest: path.join(STATIC, 'assets', 'license-source-serif-pro.md'),
+ }],
+ }),
+ ],
};
-const assetScript = () => {
- return {
- input: path.join(SOURCES, '_script.ts'),
- output: {
- file: path.join(ASSETS, 'script.js'),
- format: 'iife',
- sourcemap: DEVELOP,
- },
- plugins: [
- typescript(),
- (DEVELOP ? null : terser()),
- ],
- };
+const assetScript = {
+ input: path.join(SOURCES, '_script.ts'),
+ output: {
+ file: path.join(ASSETS, 'script.js'),
+ format: 'iife',
+ sourcemap: DEVELOP,
+ },
+ plugins: [
+ typescript(),
+ (DEVELOP ? null : terser()),
+ ],
};
export default [
- assetStyle(),
- assetScript(),
+ assetStyle,
+ assetScript,
];