Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit67ccaae

Browse files
committed
Polish
1 parent721b35f commit67ccaae

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

‎README.md‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ See the announcement here: https://github.com/facebook/reason/blob/master/HISTOR
66

77
##How do I upgrade my project?
88

9+
Do this at the root of your project:
10+
911
```
1012
npm install -g upgrade-reason-syntax
11-
upgradeSyntaxFrom2To3 myProject/src/*
13+
npm install --save-dev bs-platform@2.0.0
14+
upgradeSyntaxFrom2To3 mySource/*
1215
```
1316

14-
Then feel free to uninstall this library.
17+
The script accepts a list of files to convert. It'll intelligently skip over any file that's not Reason.
18+
19+
After you're gone converting your projects, feel free to uninstall this library!
20+
21+
##How does it work?
1522

16-
##API
23+
It's a simple node.js script that takes the old`refmt` and the new`refmt3` from your project's BuckleScript 2.0.0's source at`node_modules/bs-platform`, and then:
1724

25+
- Turns your Reason files into an AST (abstract syntax tree) using`refmt`
26+
- Turns the ASTs into the new syntax using`refmt3`
1827

28+
That's it! Enjoy =)

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name":"upgrade-reason-syntax",
3-
"version":"1.0.0-beta1",
3+
"version":"1.0.0-beta2",
44
"description":"",
55
"main":"upgradeSyntaxFrom2To3.js",
66
"bin": {
7-
"upgradeSyntaxFrom2To3":"./upgradeSyntaxFrom2To3.js"
7+
"upgradeSyntaxFrom2To3":"upgradeSyntaxFrom2To3.js"
88
},
99
"repository": {
1010
"type":"git",

‎upgradeSyntaxFrom2To3.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env node
12
'use strict';
23

34
constfs=require('fs');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp