Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
54a2bec1
Commit
54a2bec1
authored
Mar 09, 2016
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation on the CoffeeScript -> JS conversion process
parent
c0a2709b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
decaf.js
scripts/decaf/decaf.js
+27
-0
No files found.
scripts/decaf/decaf.js
View file @
54a2bec1
...
@@ -9,6 +9,33 @@
...
@@ -9,6 +9,33 @@
// an initial CoffeeScript -> ES2015 conversion,
// an initial CoffeeScript -> ES2015 conversion,
// then reformats the result using TypeScript formatter
// then reformats the result using TypeScript formatter
// and JSCS
// and JSCS
//
// The conversion process for H source is as follows:
//
// 1. Run this script on the .coffee file(s) to
// perform an initial conversion.
//
// If there is anything in the CoffeeScript that
// decaffeinate cannot handle, you might need to
// simplify the offending CoffeeScript (as indicated
// by the error output) and try again.
//
// 2. Remove the input .coffee files from the source tree.
// 3. Remove any ES2015-isms which are not currently allowed
// in the main codebase, also check for common issues
// in the converted source from the list below.
// 4. Re-run the tests and verify that everything works.
// 5. Repeat steps 1-4 with the '-test.coffee' file that
// corresponds to the converted source file.
//
// Issues to look out for in the converted source:
//
// - Run JSHint on the generated output and check for any
// violations (eg. unused variables)
// - Unnecessary 'return' statements in the last
// line of a function. CoffeeScript implicitly returns
// the last expression in a function, so the generated
// JS source has to do the same.
var
Checker
=
require
(
'jscs'
);
var
Checker
=
require
(
'jscs'
);
var
babylon
=
require
(
'babylon'
);
var
babylon
=
require
(
'babylon'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment