diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..ac273ca10 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +build/* +dist.js +node_modules/* +playground/* +vm.js +vm.min.js diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..103710fec --- /dev/null +++ b/.gitattributes @@ -0,0 +1,32 @@ +# 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 + +# Prefer LF for most file types +*.frag 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 +*.vert text eol=lf +*.xml text eol=lf + +# Prefer LF for these files +.editorconfig text eol=lf +.eslintrc text eol=lf +.gitattributes text eol=lf +.gitignore text eol=lf +.gitmodules 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 diff --git a/Makefile b/Makefile deleted file mode 100644 index 14a5870ba..000000000 --- a/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -ESLINT=./node_modules/.bin/eslint -NODE=node -TAP=./node_modules/.bin/tap -WEBPACK=./node_modules/.bin/webpack --progress --colors -WEBPACK_DEV_SERVER=./node_modules/.bin/webpack-dev-server - -# ------------------------------------------------------------------------------ - -build: - $(WEBPACK) - -watch: - $(WEBPACK) --watch - -serve: - $(WEBPACK_DEV_SERVER) - -# ------------------------------------------------------------------------------ - -lint: - $(ESLINT) ./src/*.js - $(ESLINT) ./src/**/*.js - $(ESLINT) ./test/**/*.js - -test: - @make lint - $(TAP) ./test/{unit,integration}/*.js - -coverage: - $(TAP) ./test/{unit,integration}/*.js --coverage --coverage-report=lcov - -# ------------------------------------------------------------------------------ - -.PHONY: build lint test coverage benchmark serve diff --git a/README.md b/README.md index b701ca103..9a6ec8035 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ To run the Playground, make sure the dev server's running and go to [http://loca ## Standalone Build ```bash -make build +npm run build ``` ```html @@ -104,11 +104,11 @@ The VM's block representation contains all the important information for executi ## Testing ```bash -make test +npm test ``` ```bash -make coverage +npm run coverage ``` ## Donate diff --git a/StartServerWindows.bat b/StartServerWindows.bat deleted file mode 100644 index 73a4d84db..000000000 --- a/StartServerWindows.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -node_modules\.bin\webpack-dev-server --host 0.0.0.0 --content-base .\playground diff --git a/package.json b/package.json index 15f2dd459..abee4ac4e 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,16 @@ }, "main": "./dist.js", "scripts": { - "prepublish": "./node_modules/.bin/webpack --bail", - "start": "webpack-dev-server", - "build": "webpack --colors --progress", - "test": "make test", + "build": "./node_modules/.bin/webpack --progress --colors --bail", + "coverage": "./node_modules/.bin/tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov", + "lint": "./node_modules/.bin/eslint .", + "prepublish": "npm run build", + "prepublish-watch": "npm run watch", + "start": "./node_modules/.bin/webpack-dev-server", + "tap-integration": "./node_modules/.bin/tap ./test/integration/*.js", + "tap-unit": "./node_modules/.bin/tap ./test/unit/*.js", + "test": "npm run lint && npm run tap-unit && npm run tap-integration", + "watch": "./node_modules/.bin/webpack --progress --colors --watch", "version": "./node_modules/.bin/json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"" }, "devDependencies": {