Repository navigation
Add remark dependencies #17320
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
Closed
Closed
Add remark dependencies #17320
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tools: add update-remark.sh
- Loading branch information
commit 99484c233145473d4f9a4b8056e5bf8120350d56
There are no files selected for viewing
This file contains hidden or 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,48 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Shell script to update remark in the source tree to the latest release. | ||
|
|
||
| # Depends on npm and node being in $PATH. | ||
|
|
||
| # This script must be be in the tools directory when it runs because it uses | ||
| # $BASH_SOURCE[0] to determine directories to work in. | ||
|
|
||
| cd "$( dirname "${BASH_SOURCE[0]}" )" | ||
| rm -rf remark-cli | ||
| mkdir remark-cli-tmp | ||
| cd remark-cli-tmp | ||
| npm init --yes | ||
|
|
||
| npm install --global-style --no-bin-links --production --no-package-lock remark-cli@latest | ||
|
|
||
| cd node_modules/remark-cli | ||
| npm dedupe | ||
| cd ../.. | ||
|
|
||
| # Install dmn if it is not in path. | ||
| type -P dmn || npm install -g dmn | ||
|
|
||
| # Use dmn to remove some unneeded files. | ||
| dmn -f clean | ||
|
|
||
| cd .. | ||
| mv remark-cli-tmp/node_modules/remark-cli remark-cli | ||
| rm -rf remark-cli-tmp/ | ||
|
|
||
| rm -rf remark-preset-lint-node | ||
| mkdir remark-preset-lint-node-tmp | ||
| cd remark-preset-lint-node-tmp | ||
| npm init --yes | ||
|
|
||
| npm install --global-style --no-bin-links --production --no-package-lock remark-preset-lint-node@latest | ||
|
|
||
| cd node_modules/remark-preset-lint-node | ||
| npm dedupe | ||
| cd ../.. | ||
|
|
||
| # Use dmn to remove some unneeded files. | ||
| dmn -f clean | ||
|
|
||
| cd .. | ||
| mv remark-preset-lint-node-tmp/node_modules/remark-preset-lint-node remark-preset-lint-node | ||
| rm -rf remark-preset-lint-node-tmp/ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think we don't need this one if dmn has been installed globally in L23?