Skip to content

Commit

Permalink
chore(ci): add version, unify output (#2701)
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Brix <tony@brix.ninja>
fixes undefined
  • Loading branch information
LeoDog896 committed Jan 14, 2023
1 parent d28cc87 commit 886de34
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ jobs:
run: npm ci
- name: Build 🗜️
run: |
SEMANTIC_RELEASE_NEXT_VERSION=$(npx semantic-release --no-ci --dry-run | grep -oP 'The next release version is \K[0-9]+\.[0-9]+\.[0-9]+')
echo "$SEMANTIC_RELEASE_NEXT_VERSION"
npm run build
if ! git diff --quiet; then
git config --global user.email "<>"
Expand All @@ -86,4 +88,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: echo npx semantic-release
4 changes: 2 additions & 2 deletions lib/marked.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)
* marked 4.2.5 - a markdown parser
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/

Expand Down
4 changes: 2 additions & 2 deletions lib/marked.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)
* marked 4.2.5 - a markdown parser
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/

Expand Down
4 changes: 2 additions & 2 deletions lib/marked.umd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* marked - a markdown parser
* Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)
* marked 4.2.5 - a markdown parser
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/

Expand Down
4 changes: 2 additions & 2 deletions marked.min.js

Large diffs are not rendered by default.

24 changes: 10 additions & 14 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import babel from '@rollup/plugin-babel';
import { defineConfig } from 'rollup';
import fs from 'fs';

const pkg = JSON.parse(fs.readFileSync('./package.json'));

const banner = `/**
* marked - a markdown parser
* marked ${process.env.SEMANTIC_RELEASE_NEXT_VERSION || pkg.version} - a markdown parser
* Copyright (c) 2011-${new Date().getFullYear()}, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
Expand All @@ -12,7 +16,7 @@ const banner = `/**
*/
`;

export default [{
export default defineConfig([{
input: 'src/marked.js',
output: {
file: 'lib/marked.esm.js',
Expand All @@ -22,29 +26,21 @@ export default [{
},
{
input: 'src/marked.js',
output: {
output: [{
file: 'lib/marked.umd.js',
format: 'umd',
name: 'marked',
banner
},
plugins: [
babel({
presets: [['@babel/preset-env', { loose: true }]]
})
]
},
{
input: 'src/marked.js',
output: {
{
file: 'lib/marked.cjs',
format: 'cjs',
name: 'marked',
banner
},
}],
plugins: [
babel({
presets: [['@babel/preset-env', { loose: true }]]
})
]
}];
}]);

1 comment on commit 886de34

@vercel
Copy link

@vercel vercel bot commented on 886de34 Jan 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.