-
Notifications
You must be signed in to change notification settings - Fork 367
Cleanups #206
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
Merged
Merged
Cleanups #206
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68c031b
Make a more sane directory structure.
fitzgen e6d110c
Add the built files to the repository.
fitzgen fc5abc0
Create a CONTRIBUTING.md guide.
fitzgen 6bf8158
Expand the API docs with examples for every documented method.
fitzgen c7f5a50
Add a table of contents to the CONTRIBUTING.md guide and reorder sect…
fitzgen 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
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 |
|---|---|---|
| @@ -1 +1,18 @@ | ||
| bench/scalajs-runtime-sourcemap.js binary | ||
| dist/source-map.debug.js binary | ||
| dist/source-map.js binary | ||
| dist/source-map.min.js binary | ||
| dist/source-map.min.js.map binary | ||
|
|
||
| dist/test/test_api.js binary | ||
| dist/test/test_array_set.js binary | ||
| dist/test/test_base64.js binary | ||
| dist/test/test_base64_vlq.js binary | ||
| dist/test/test_binary_search.js binary | ||
| dist/test/test_dog_fooding.js binary | ||
| dist/test/test_quick_sort.js binary | ||
| dist/test/test_source_map_consumer.js binary | ||
| dist/test/test_source_map_generator.js binary | ||
| dist/test/test_source_node.js binary | ||
| dist/test/test_util.js binary | ||
|
|
||
| bench/scalajs-runtime-sourcemap.js binary | ||
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 |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| dist/* | ||
| node_modules/* |
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,124 @@ | ||
| # Contributing | ||
|
|
||
| Thank you for your interest in contributing to this library! Contributions are | ||
| very appreciated. | ||
|
|
||
| -------------------------------------------------------------------------------- | ||
|
|
||
| <!-- `npm run toc` to regenerate the Table of Contents --> | ||
|
|
||
| <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
| <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
| ## Table of Contents | ||
|
|
||
| - [Filing Issues](#filing-issues) | ||
| - [Building From Source](#building-from-source) | ||
| - [Submitting Pull Requests](#submitting-pull-requests) | ||
| - [Running Tests](#running-tests) | ||
| - [Writing New Tests](#writing-new-tests) | ||
|
|
||
| <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
|
||
|
|
||
|
|
||
| ## Filing Issues | ||
|
|
||
| If you are filing an issue for a bug or other misbehavior, please provide: | ||
|
|
||
| * **A test case.** The more minimal the better, but sometimes a larger test case | ||
| cannot be helped. This should be in the form of a gist, node script, | ||
| repository, etc. | ||
|
|
||
| * **Steps to reproduce the bug.** The more exact and specific the better. | ||
|
|
||
| * **The result you expected.** | ||
|
|
||
| * **The actual result.** | ||
|
|
||
| ## Building From Source | ||
|
|
||
| Install Node.js and then run | ||
|
|
||
| $ git clone https://github.com/mozilla/source-map.git | ||
| $ cd source-map/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| $ npm install | ||
|
|
||
| Next, run | ||
|
|
||
| $ npm run build | ||
|
|
||
| This will create the following files: | ||
|
|
||
| * `dist/source-map.js` - The plain browser build. | ||
|
|
||
| * `dist/source-map.min.js` - The minified browser build. | ||
|
|
||
| * `dist/source-map.min.js.map` - The source map for the minified browser build. | ||
|
|
||
| * `dist/source-map.debug.js` - The debug browser build. | ||
|
|
||
| * `dist/source-map.debug.js.map` - The source map for the debug browser build. | ||
|
|
||
| * `dist/test/*` - These are the test files built for running as xpcshell unit | ||
| tests within mozilla-central. | ||
|
|
||
| ## Submitting Pull Requests | ||
|
|
||
| Make sure that tests pass locally before creating a pull request. | ||
|
|
||
| Use a feature branch and pull request for each change, with logical commits. If | ||
| your reviewer asks you to make changes before the pull request is accepted, | ||
| fixup your existing commit(s) rather than adding follow up commits, and then | ||
| force push to the remote branch to update the pull request. | ||
|
|
||
| ## Running Tests | ||
|
|
||
| The test suite is written for node.js. Install node.js `0.10.0` or greater and | ||
| then run the tests with `npm test`: | ||
|
|
||
| ```shell | ||
| $ npm test | ||
| > source-map@0.5.0 test /Users/fitzgen/src/source-map | ||
| > node test/run-tests.js | ||
|
|
||
|
|
||
| 119 / 119 tests passed. | ||
| ``` | ||
|
|
||
| ## Writing New Tests | ||
|
|
||
| To add new tests, create a new file named `test/test-your-new-test-name.js` and | ||
| export your test functions with names that start with "test", for example: | ||
|
|
||
| ```js | ||
| exports["test issue #123: doing the foo bar"] = function (assert) { | ||
| ... | ||
| }; | ||
| ``` | ||
|
|
||
| The new tests will be located and run automatically when you run the full test | ||
| suite. | ||
|
|
||
| The `assert` argument is a cut down version of node's assert module. You have | ||
| access to the following assertion functions: | ||
|
|
||
| * `doesNotThrow` | ||
|
|
||
| * `equal` | ||
|
|
||
| * `ok` | ||
|
|
||
| * `strictEqual` | ||
|
|
||
| * `throws` | ||
|
|
||
| (The reason for the restricted set of test functions is because we need the | ||
| tests to run inside Firefox's test suite as well and Firefox has a shimmed | ||
| version of the assert module.) | ||
|
|
||
| There are additional test utilities and helpers in `./test/util.js` which you | ||
| can use as well: | ||
|
|
||
| ```js | ||
| var util = require('./util'); | ||
| ``` | ||
Oops, something went wrong.
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.
Is the only reason for this so the github interface doesn't show it? I don't really think it's worth it; it would make conflicts harder to figure out, which is more likely with the dist files committed.
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.
It makes
git diffnot spew changes for that file as well. I think it is worth it since the best way to handle conflicts in the generated files is to kill them and regenerate them.