Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/*
build/*
dist/*
static/javascripts/*
opal/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ npm-*
# generated translation files
/translations
/locale

# generated opal files
/static/javascripts/setup-opal.js
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:
script:
- npm run test:lint
- npm run test:unit
- npm run clean && $(npm bin)/webpack --colors --bail --silent
- npm run clean && npm run setup-opal && $(npm bin)/webpack --colors --bail --silent
- npm run test:integration
deploy:
- provider: script
Expand Down
8 changes: 4 additions & 4 deletions LEGAL
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ test/unit/lib/ruby-generator.test.jsx

These files are licensed under the MIT License (see the file LICENSE).

static/javascripts/opal.js
static/javascripts/opal.min.js
static/javascripts/opal-parser.js
static/javascripts/opal-parser.min.js
opal/opal.js
opal/opal.min.js
opal/opal-parser.js
opal/opal-parser.min.js

These files are licensed under the MIT License
(see https://github.com/opal/opal/blob/master/LICENSE ).
24 changes: 7 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
Copyright (c) 2018 Ruby Programming Shounendan
All rights reserved.

MIT License
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 4 additions & 0 deletions opal/config-opal-parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Opal.load('opal-parser');
Opal.load('parser');
Opal.load('parser/ruby23');
Opal.Parser.CurrentRuby = Opal.Parser.Ruby23;
2 changes: 2 additions & 0 deletions opal/config-opal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Opal.load('opal');
Opal.config.unsupported_features_severity = 'ignore';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@
"description": "GraphicaL User Interface for creating and running Smalruby 3.0 projects",
"main": "./dist/smalruby3-gui.js",
"scripts": {
"build": "npm run clean && webpack --progress --colors --bail",
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist",
"setup-opal": "if [ ! -e ./static/javascripts/setup-opal.js ]; then mkdir -p ./static/javascripts && (cd opal && cat opal.min.js config-opal.js opal-parser.min.js config-opal-parser.js > ../static/javascripts/setup-opal.js); fi",
"build": "npm run clean && npm run setup-opal && webpack --progress --colors --bail",
"clean": "rimraf ./static/javascripts/setup-opal.js && rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist",
"deploy": "touch build/.nojekyll && gh-pages -t -d build -m \"Build for $(git log --pretty=format:%H -n1)\"",
"prune": "./prune-gh-pages.sh",
"i18n:push": "tx-push-src scratch-editor interface translations/en.json",
"i18n:src": "rimraf ./translations/messages/src && babel src > tmp.js && rimraf tmp.js && build-i18n-src ./translations/messages/src ./translations/ && npm run i18n:push",
"start": "webpack-dev-server",
"start": "npm run setup-opal && webpack-dev-server",
"test": "npm run test:lint && npm run test:unit && npm run build && npm run test:integration",
"test:integration": "jest --runInBand test[\\\\/]integration",
"test:lint": "eslint . --ext .js,.jsx",
"test:unit": "jest test[\\\\/]unit",
"test:smoke": "jest --runInBand test[\\\\/]smoke",
"watch": "webpack --progress --colors --watch"
"watch": "npm run setup-opal && webpack --progress --colors --watch"
},
"author": "Massachusetts Institute of Technology",
"author": "Ruby Programming Shounendan",
"license": "BSD-3-Clause",
"homepage": "https://github.com/smalruby/smalruby3-gui#readme",
"repository": {
Expand Down
11 changes: 1 addition & 10 deletions src/playground/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@
</script>
<!-- /Sentry -->
<% } %>
<script src="static/javascripts/opal.min.js"
onload="Opal.load('opal');
Opal.config.unsupported_features_severity = 'ignore';">
</script>
<script src="static/javascripts/opal-parser.min.js"
onload="Opal.load('opal-parser');
Opal.load('parser');
Opal.load('parser/ruby23');
Opal.Parser.CurrentRuby = Opal.Parser.Ruby23;">
</script>
<script src="static/javascripts/setup-opal.js"></script>
</head>
<body>
</body>
Expand Down
6 changes: 5 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ module.exports = [
defaultsDeep({}, base, {
target: 'web',
entry: {
'scratch-gui': './src/index.js'
'smalruby3-gui': './src/index.js'
},
output: {
libraryTarget: 'umd',
Expand All @@ -212,6 +212,10 @@ module.exports = [
])
},
plugins: base.plugins.concat([
new CopyWebpackPlugin([{
from: 'static/javascripts/setup-opal.js',
to: 'static/javascripts/setup-opal.js'
}]),
new CopyWebpackPlugin([{
from: 'node_modules/scratch-blocks/media',
to: 'static/blocks-media'
Expand Down