-
Notifications
You must be signed in to change notification settings - Fork 465
Proposal to add bs-stdlib #2171
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
jchavarri
wants to merge
5
commits into
rescript-lang:master
from
jchavarri:proposal-bs-stdlib-package
+85
−2
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
09a2953
Add bs-stdlib package
jchavarri f8d5169
Create new folder belt-js
jchavarri f8abc79
Add belt-js to every template
jchavarri 899114f
Finish prepublish.sh
jchavarri bd0e6b8
Add belt-js as dependency of bs-platform. Remove deps from templates
jchavarri 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
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 @@ | ||
lib/ |
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,23 @@ | ||
Copyright (C) 2015-2016 Bloomberg Finance L.P. | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
In addition to the permissions granted to you by the LGPL, you may combine | ||
or link a "work that uses the Library" with a publicly distributed version | ||
of this file to produce a combined library or application, then distribute | ||
that combined work under the terms of your choosing, with no requirement | ||
to comply with the obligations normally placed on you by section 4 of the | ||
LGPL version 3 (or the corresponding section of a later version of the LGPL | ||
should you choose to use a later version). | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
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,29 @@ | ||
{ | ||
"name": "belt-js", | ||
"version": "2.2.3", | ||
"description": "BuckleScript compiled standard libraries", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/bucklescript/bucklescript.git" | ||
}, | ||
"keywords": [ | ||
"ocaml", | ||
"bucklescript", | ||
"stdlib", | ||
"functional programming" | ||
], | ||
"author": { | ||
"name": "Hongbo Zhang" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "hongbo_zhang", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"license": "SEE LICENSE IN LICENSE", | ||
"bugs": { | ||
"url": "https://github.com/bucklescript/bucklescript/issues" | ||
}, | ||
"homepage": "https://github.com/bucklescript/bucklescript#readme" | ||
} |
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
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
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,21 @@ | ||
#!/bin/sh | ||
BELT_FOLDER_NAME="belt-js" | ||
MAIN_PACKAGE_VERSION=$(node -p -e "require('./package.json').version") | ||
BELT_IMPORTED_PACKAGE_VERSION=$(node -p -e "require('./package.json').dependencies['belt-js']") | ||
BELT_PACKAGE_VERSION=$(node -p -e "require('./$BELT_FOLDER_NAME/package.json').version") | ||
|
||
echo "**Preparing and publishing belt-js...**\n" | ||
|
||
if [ $MAIN_PACKAGE_VERSION != $BELT_PACKAGE_VERSION ]; then | ||
echo "Error: bs-platform and belt-js don't have the same version.\nbs-platform is $MAIN_PACKAGE_VERSION and belt-js is $BELT_PACKAGE_VERSION" | ||
elif [ $BELT_IMPORTED_PACKAGE_VERSION != $BELT_PACKAGE_VERSION ]; then | ||
echo "Error: the imported version of belt-js in bs-platform is not the latest.\nbs-platform is dependent on $BELT_IMPORTED_PACKAGE_VERSION and belt-js version is $BELT_PACKAGE_VERSION" | ||
else | ||
make && make install && \ | ||
cd jscomp && cd ../belt-js && \ | ||
mkdir -p ./lib/js && cp ../lib/js/* ./lib/js && \ | ||
mkdir -p ./lib/amdjs && cp ../lib/amdjs/* ./lib/amdjs && \ | ||
mkdir -p ./lib/es6 && cp ../lib/es6/* ./lib/es6 && \ | ||
echo "Finished prepublishing $BELT_FOLDER_NAME, version $BELT_PACKAGE_VERSION" && \ | ||
npm publish | ||
fi |
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.
This really does seem like the wrong place to make the swap, and it also breaks
-global
module system users (of which I am one)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.
Happy to move it somewhere else, if you have suggestions. I'll try to fix the
-global
platform.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 wish I could help, but I sadly haven't looked at the BuckleScript code much at all.
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 also thought about this
package_name
inbs_version
, that gets generated frombuild_version
. @bobzhang would that be better? I'm unsure if that'd break other things.