Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fde53d1

Browse filesBrowse files
Add exported meta object (#190)
* add meta object * fix: lint error * fix: fix path and write comment * chore: add plugin * set version with replacing
1 parent 36a4929 commit fde53d1
Copy full SHA for fde53d1

File tree

Expand file treeCollapse file tree

3 files changed

+15
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+15
-1
lines changed

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"rimraf": "^3.0.2",
5757
"rollup": "^2.60.0",
5858
"rollup-plugin-node-resolve": "^5.2.0",
59+
"rollup-plugin-replace": "^2.2.0",
5960
"rollup-plugin-sourcemaps": "^0.6.3",
6061
"ts-node": "^10.4.0",
6162
"typescript": "~4.8.4",

‎rollup.config.js

Copy file name to clipboardExpand all lines: rollup.config.js
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
import resolve from "rollup-plugin-node-resolve"
77
import sourcemaps from "rollup-plugin-sourcemaps"
8+
import replace from "rollup-plugin-replace"
89

910
const pkg = require("./package.json")
1011
const deps = new Set(
@@ -23,6 +24,12 @@ export default {
2324
* See LICENSE file in root directory for full license.
2425
*/`,
2526
},
26-
plugins: [sourcemaps(), resolve()],
27+
plugins: [
28+
sourcemaps(),
29+
resolve(),
30+
replace({
31+
"process.env.PACKAGE_VERSION": `"${pkg.version}"`,
32+
}),
33+
],
2734
external: id => deps.has(id) || id.startsWith("lodash"),
2835
}

‎src/index.ts

Copy file name to clipboardExpand all lines: src/index.ts
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,9 @@ function parseAsScript(code: string, options: ParserOptions) {
208208
}),
209209
})
210210
}
211+
212+
export const meta = {
213+
name: "vue-eslint-parser",
214+
// eslint-disable-next-line no-process-env
215+
version: process.env.PACKAGE_VERSION,
216+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.