Add prepublish script and change main

Building TS before publish and pointing the main entry to the builded files.
This commit is contained in:
Christian Budde Christensen
2016-12-13 20:34:19 +01:00
parent 60a59be4d3
commit e7045f2b8a
3 changed files with 22 additions and 3 deletions
+1
View File
@@ -2,6 +2,7 @@ node_modules/
*.swp *.swp
.lock-wscript .lock-wscript
out/ out/
lib/
Makefile.gyp Makefile.gyp
*.Makefile *.Makefile
*.target.gyp.mk *.target.gyp.mk
+14
View File
@@ -0,0 +1,14 @@
node_modules/
*.swp
.lock-wscript
out/
Makefile.gyp
*.Makefile
*.target.gyp.mk
*.node
example/*.log
docs/
npm-debug.log
/.idea/
.env
build/
+7 -3
View File
@@ -6,9 +6,12 @@
"test", "test",
".gitignore" ".gitignore"
], ],
"main": "dist/xterm.js", "main": "lib/xterm.js",
"repository": "https://github.com/sourcelair/xterm.js", "repository": "https://github.com/sourcelair/xterm.js",
"license": "MIT", "license": "MIT",
"files": [
"lib"
],
"devDependencies": { "devDependencies": {
"@types/chai": "^3.4.34", "@types/chai": "^3.4.34",
"@types/mocha": "^2.2.33", "@types/mocha": "^2.2.33",
@@ -30,8 +33,9 @@
}, },
"scripts": { "scripts": {
"start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'", "start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'",
"test": "./bin/build && mocha --recursive ./out", "test": "mocha --recursive ./lib",
"build:docs": "jsdoc -c jsdoc.json", "build:docs": "jsdoc -c jsdoc.json",
"build": "./bin/build" "build": "./bin/build",
"prepublish": "tsc --outDir lib"
} }
} }