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
.lock-wscript
out/
lib/
Makefile.gyp
*.Makefile
*.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",
".gitignore"
],
"main": "dist/xterm.js",
"main": "lib/xterm.js",
"repository": "https://github.com/sourcelair/xterm.js",
"license": "MIT",
"files": [
"lib"
],
"devDependencies": {
"@types/chai": "^3.4.34",
"@types/mocha": "^2.2.33",
@@ -30,8 +33,9 @@
},
"scripts": {
"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": "./bin/build"
"build": "./bin/build",
"prepublish": "tsc --outDir lib"
}
}