Do not preprecess package.json

Before this commit, package.json in the project root directory was
preprocessed in order to insert correct version into it. This made it
invalid JSON and thus unusable for npm purposes.

This commit makes package.json a valid JSON by hardcoding the version
into it. I think that introducing this small duplicity is outweighted by
being able to use npm in project root directory. For example, it is now
possible to make the "npm test" command work and introduce Travis CI
integration.
redux
David Majda 12 years ago
parent b1db42e1b4
commit adfeb87c82

@ -18,12 +18,10 @@ PARSER_OUT_FILE = $(SRC_DIR)/parser.js
PEGJS_SRC_FILE = $(SRC_DIR)/peg.js
PEGJS_LIB_FILE = $(LIB_DIR)/peg.js
PACKAGE_JSON_SRC_FILE = package.json
PACKAGE_JSON_DIST_FILE = $(DIST_NODE_DIR)/package.json
PEGJS_DIST_FILE_DEV = $(DIST_WEB_DIR)/peg-$(PEGJS_VERSION).js
PEGJS_DIST_FILE_MIN = $(DIST_WEB_DIR)/peg-$(PEGJS_VERSION).min.js
PACKAGE_JSON_FILE = package.json
CHANGELOG_FILE = CHANGELOG
LICENSE_FILE = LICENSE
README_FILE = README.md
@ -112,12 +110,12 @@ dist: build
$(LIB_DIR) \
$(BIN_DIR) \
$(EXAMPLES_DIR) \
$(PACKAGE_JSON_FILE) \
$(CHANGELOG_FILE) \
$(LICENSE_FILE) \
$(README_FILE) \
$(VERSION_FILE) \
$(DIST_NODE_DIR)
$(PREPROCESS) $(PACKAGE_JSON_SRC_FILE) > $(PACKAGE_JSON_DIST_FILE)
# Remove distribution file (created by "dist")
distclean:

@ -1,6 +1,6 @@
{
"name": "pegjs",
"version": "@VERSION",
"version": "0.7.0",
"description": "Parser generator for JavaScript",
"homepage": "http://pegjs.majda.cz/",
"author": {

Loading…
Cancel
Save