Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5.8k
conversion to ESM, and deletion of CommonJS#2106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
62d756c9079393eb3706cd34fef3376c92dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| .eslintignore | ||
| .eslintrc | ||
| .eslintrc.cjs | ||
| .github | ||
| .gitignore | ||
| .travis.yml |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "arrowParens": "avoid", | ||
| "singleQuote": true | ||
| } |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "presets": [ | ||
| [ | ||
| "@babel/preset-env", | ||
| { | ||
| "targets": { | ||
| "node": "current" | ||
| } | ||
| } | ||
| ] | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,17 @@ | ||
| var fs = require('fs') | ||
| var read = fs.readFileSync | ||
| var write = fs.writeFileSync | ||
| var version = process.env.VERSION || require('../package.json').version | ||
| import fs from 'fs'; | ||
| import { relative } from './util.js'; | ||
| var read = fs.readFileSync; | ||
| var write = fs.writeFileSync; | ||
| const pkgPath = relative(import.meta, '..', 'package.json'); | ||
| const pkg = JSON.parse(read(pkgPath).toString()); | ||
| var version = process.env.VERSION || pkg.version; | ||
| var file = __dirname + '/../docs/_coverpage.md' | ||
| var cover = read(file, 'utf8').toString() | ||
| var file = relative(import.meta, '..', 'docs', '_coverpage.md'); | ||
| var cover = read(file, 'utf8').toString(); | ||
| console.log('Replace version number in cover page...') | ||
| console.log('Replace version number in cover page...'); | ||
| cover = cover.replace( | ||
| /<small>(\S+)?<\/small>/g, | ||
| '<small>' + version + '</small>' | ||
| ) | ||
| write(file, cover) | ||
| ); | ||
| write(file, cover); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import url from 'url'; | ||
| import path from 'path'; | ||
| /** Get a new path relative to the current module (pass import.meta). */ | ||
| export const relative = (meta, ...to) => | ||
| path.resolve(path.dirname(url.fileURLToPath(meta.url)), ...to); |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These scripts were out of date. Now you can run them in VS Code! Give it a try!