initialize dot files derived from scratch-vm

This commit is contained in:
Michael "Z" Goddard 2018-12-04 15:37:41 -05:00
parent 03d147992a
commit a4added08b
No known key found for this signature in database
GPG key ID: 762CD40DD5349872
19 changed files with 9547 additions and 0 deletions

11
.editorconfig Normal file
View file

@ -0,0 +1,11 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_size = 4
trim_trailing_whitespace = true
[*.{js,html}]
indent_style = space

4
.eslintignore Normal file
View file

@ -0,0 +1,4 @@
coverage/*
dist/*
node_modules/*
playground/*

3
.eslintrc.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
extends: ['scratch', 'scratch/node', 'scratch/es6']
};

36
.gitattributes vendored Normal file
View file

@ -0,0 +1,36 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly specify line endings for as many files as possible.
# People who (for example) rsync between Windows and Linux need this.
# File types which we know are binary
*.sb binary
*.sb2 binary
# Prefer LF for most file types
*.css text eol=lf
*.htm text eol=lf
*.html text eol=lf
*.iml text eol=lf
*.js text eol=lf
*.js.map text eol=lf
*.json text eol=lf
*.md text eol=lf
*.xml text eol=lf
*.yml text eol=lf
# Prefer LF for these files
.editorconfig text eol=lf
.eslintignore text eol=lf
.eslintrc text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
.gitmodules text eol=lf
.npmignore text eol=lf
LICENSE text eol=lf
Makefile text eol=lf
README text eol=lf
TRADEMARK text eol=lf
# Use CRLF for Windows-specific file types

13
.github/CONTRIBUTING.md vendored Normal file
View file

@ -0,0 +1,13 @@
## Contributing
The development of Scratch is an ongoing process, and we love to have people in the Scratch and open source communities help us along the way.
If you're interested in contributing, please take a look at the [issues](https://github.com/LLK/scratch-sb1-converter/issues) on this repository.
Two great ways of helping are by identifying bugs and documenting them as issues, or fixing issues and creating pull requests. When looking for bugs to fix, please look for the ["Help Wanted" label](https://github.com/LLK/scratch-sb1-converter/issues?q=label%3A%22help+wanted%22). Bugs with this label have been specifically set aside for Open Source contributors. Issues without the label can also be worked on but we ask that you comment on the issue prior to starting work. When submitting pull requests please be patient -- it can take a while to find time to review them. The organization and class structures can't be radically changed without significant coordination and collaboration from the Scratch Team, so these types of changes should be avoided.
It's been said that the Scratch Team spends about one hour of design discussion for every pixel in Scratch, but some think that estimate is a little low. While we welcome suggestions for new features in our [suggestions forum](https://scratch.mit.edu/discuss/1/) (especially ones that come with mockups), we are unlikely to accept PRs with new features that haven't been thought through and discussed as a group. Why? Because we have a strong belief in the value of keeping things simple for new users. To learn more about our design philosophy, see [the Scratch Developers page](https://scratch.mit.edu/developers), or [this paper](http://web.media.mit.edu/~mres/papers/Scratch-CACM-final.pdf).
Beyond this repo, there are also some other resources that you might want to take a look at:
* [Community Guidelines](https://github.com/LLK/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
* [Open Source forum](https://scratch.mit.edu/discuss/49/) on Scratch
* [Suggestions forum](https://scratch.mit.edu/discuss/1/) on Scratch
* [Bugs & Glitches forum](https://scratch.mit.edu/discuss/3/) on Scratch

15
.github/ISSUE_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,15 @@
### Expected Behavior
_Please describe what should happen_
### Actual Behavior
_Describe what actually happens_
### Steps to Reproduce
_Explain what someone needs to do in order to see what's described in *Actual behavior* above_
### Operating System and Browser
_e.g. Mac OS 10.11.6 Safari 10.0_

15
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,15 @@
### Resolves
_What Github issue does this resolve (please include link)?_
### Proposed Changes
_Describe what this Pull Request does_
### Reason for Changes
_Explain why these changes should be made_
### Test Coverage
_Please show how you have added tests to cover your changes_

20
.jsdoc.json Normal file
View file

@ -0,0 +1,20 @@
{
"plugins": ["plugins/markdown"],
"templates": {
"default": {
"includeDate": false,
"outputSourceFiles": false
}
},
"source": {
"include": ["src"]
},
"opts": {
"destination": "playground/docs",
"pedantic": true,
"private": true,
"readme": "README.md",
"recurse": true,
"template": "node_modules/docdash"
}
}

18
.npmignore Normal file
View file

@ -0,0 +1,18 @@
# Development files
.eslintrc.js
/.editorconfig
/.eslintignore
/.gitattributes
/.github
/.travis.yml
/test
# Build created files
/playground
# Coverage created files
/.nyc_output
/coverage
# Exclude already built packages from testing with npm pack
/scratch-sb1-converter-*.{tar,tgz}

54
.travis.yml Normal file
View file

@ -0,0 +1,54 @@
elanguage: node_js
node_js:
- 8
- node
env:
global:
- NODE_ENV=production
matrix:
- NPM_SCRIPT="test:unit -- --jobs=4"
- NPM_SCRIPT="test:integration -- --jobs=4"
cache:
directories:
- "$HOME/.npm"
before_install:
# package-lock.json was introduced in npm@5
- '[[ $(node -v) =~ ^v9.*$ ]] || npm install -g npm@latest' # skipped when using node 9
- npm install -g greenkeeper-lockfile
install:
- if [[ ${TRAVIS_BRANCH:0:11} = greenkeeper ]]; then npm install --production=false; else npm ci --production=false; fi
before_script: greenkeeper-lockfile-update
script: npm run $NPM_SCRIPT
after_script: greenkeeper-lockfile-upload
jobs:
include:
- env: NPM_SCRIPT=lint
node_js: 8
- env: NPM_SCRIPT=build
node_js: 8
if: not (branch in (master, develop) and type != pull_request)
# TODO: Activate when going public.
# - stage: release
# node_js: 8
# env: NPM_SCRIPT=build
# before_deploy:
# - npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%Y%m%d%H%M%S)
# - git config --global user.email "$(git log --pretty=format:"%ae" -n1)"
# - git config --global user.name "$(git log --pretty=format:"%an" -n1)"
# deploy:
# - provider: npm
# on:
# all_branches: true
# skip_cleanup: true
# email: $NPM_EMAIL
# api_key: $NPM_TOKEN
# - provider: script
# on:
# all_branches: true
# skip_cleanup: true
# script: npm run --silent deploy -- -x -r $GH_PAGES_REPO
stages:
- test
# TODO: Activate when going public.
# - name: release
# if: branch in (master, develop) and type != pull_request

1
README.md Normal file
View file

@ -0,0 +1 @@
## scratch-sb1-converter

0
index.js Normal file
View file

9278
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

48
package.json Normal file
View file

@ -0,0 +1,48 @@
{
"name": "scratch-sb1-converter",
"version": "0.0.0",
"description": "Scratch 1 (.sb) to Scratch 2 (.sb2) conversion library for Scratch 3.0",
"author": "Massachusetts Institute of Technology",
"license": "BSD-3-Clause",
"homepage": "https://github.com/LLK/scratch-sb1-converter#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/LLK/scratch-sb1-converter.git"
},
"main": "index.js",
"scripts": {
"build": "npm run docs && webpack --progress --colors --bail",
"coverage": "tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov",
"deploy": "touch playground/.nojekyll && gh-pages -t -d playground -m \"Build for $(git log --pretty=format:%H -n1)\"",
"docs": "jsdoc -c .jsdoc.json",
"lint": "eslint .",
"prepublish": "in-publish && npm run build || not-in-publish",
"start": "webpack-dev-server",
"test:unit": "tap ./test/unit/*.js",
"test:integration": "tap ./test/integration/*.js",
"test": "npm run lint && npm run docs && npm run test:unit && npm run test:integration",
"watch": "webpack --progress --colors --watch",
"version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
},
"dependencies": {
"minilog": "3.1.0",
"text-encoding": "0.6.4"
},
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"docdash": "^1.0.0",
"eslint": "^5.3.0",
"eslint-config-scratch": "^5.0.0",
"gh-pages": "^1.2.0",
"in-publish": "^2.0.0",
"jsdoc": "^3.5.5",
"json": "^9.0.4",
"tap": "^12.0.1",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
}
}

7
src/.eslintrc.js Normal file
View file

@ -0,0 +1,7 @@
module.exports = {
root: true,
extends: ['scratch', 'scratch/es6'],
env: {
browser: true
}
};

5
test/.eslintrc.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
rules: {
'no-undefined': [0]
}
};

View file

@ -0,0 +1,8 @@
const test = require('tap').test;
const SB1 = require('../..');
test('loads package', t => {
t.type(SB1, Object);
t.end();
});

8
test/unit/index.js Normal file
View file

@ -0,0 +1,8 @@
const test = require('tap').test;
const SB1 = require('../..');
test('loads package', t => {
t.type(SB1, Object);
t.end();
});

3
webpack.config.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
entry: './index.js'
};