Skip to content

Commit 5d70ea3

Browse files
Moved package.json to root, added automatic package.json version bumping
1 parent bef7a29 commit 5d70ea3

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules
33
javascript.iml
44
*.js-e
5+
*.json-e
56
upload/*
67
.idea
78
*.iml

Makefile.inc

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ VERSION=$(shell cat $(REPOS_DIR)/VERSION)
44
GOOGLE_MINIFY=/opt/minify/compiler.jar
55
CORE_DIR=$(REPOS_DIR)/core
66
ECHO=/bin/echo
7+
PACKAGE_JSON=$(REPOS_DIR)/package.json
78
PUBNUB_JS=pubnub.js
89
PUBNUB_MIN_JS=pubnub.min.js
910
PUBNUB_VERSION_JS=pubnub-$(VERSION).js

node.js/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ build: $(PUBNUB_JS)
1212
$(PUBNUB_JS): $(PUBNUB_COMMON_JS) $(PUBNUB_NODE_JS)
1313
$(ECHO) "// Version: $(VERSION)" > $(PUBNUB_JS)
1414
cat $(PUBNUB_COMMON_JS) $(PUBNUB_PLATFORM_JS) >> $(PUBNUB_JS)
15+
sed -i -e "s/\"version\"\: \".*\"/\"version\"\: \"$(VERSION)foo\"/g" $(PACKAGE_JSON)
1516
sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS)
1617
sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS)
1718

node.js/package.json renamed to package.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"scripts": {
1515
"test": "grunt test --force"
1616
},
17-
"main": "./pubnub.js",
17+
"main": "./node.js/pubnub.js",
1818
"repository": {
1919
"type": "git",
2020
"url": "git://github.com/pubnub/javascript.git"
@@ -48,5 +48,12 @@
4848
"license": "MIT",
4949
"engine": {
5050
"node": ">=0.2"
51-
}
51+
},
52+
"files": [
53+
"node.js",
54+
"CHANGELOG",
55+
"FUTURE.md",
56+
"LICENSE",
57+
"README.md"
58+
]
5259
}

0 commit comments

Comments
 (0)