diff --git a/.gitignore b/.gitignore index 62e5019..cbc5d16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,14 @@ -# Compiled Object files -*.pyc -*.pyo - # Editor, IDE and dev environment stuff *~ .project .settings -coverage -node_modules -# Build directories -doc/api -lib/ -build/ \ No newline at end of file +# Build files and directories +/coverage +/doc/api +/build/ +/jodid25519-*.tgz + +# npm things, don't add these to .npmignore +/node_modules +/jodid25519.js* diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..27e8b4b --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +# Editor, IDE and dev environment stuff +*~ +.project +.settings + +# Build files and directories +/coverage +/doc/api +/build/ +/jodid25519-*.tgz diff --git a/Makefile b/Makefile index 36d01f2..e57c484 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,10 @@ ASMCRYPTO_MODULES = utils,aes-cbc,aes-ccm,sha1,sha256,sha512,hmac-sha1,hmac-sha2 all: test api-doc dist test-shared +jodid25519.js: $(BUILDDIR)/jodid25519-shared.min.js + sed -e 's,$<,$@,g' "$<.map" > "$@.map" + sed -e 's,$<,$@,g' "$<" > "$@" + test-timing: KARMA_FLAGS='--preprocessors=' TEST_TIMING=true $(MAKE) test @@ -83,7 +87,7 @@ $(BUILD_DEP_ALL) $(DEP_JSBN): $(NPM) install $(BUILD_DEP_ALL_NAMES) jsbn clean: - rm -rf doc/api/ coverage/ build/ lib/ + rm -rf doc/api/ coverage/ build/ jodid25519.js clean-all: clean rm -f $(BUILD_DEP_ALL) $(DEP_ALL) diff --git a/package.json b/package.json index bb1815b..52929ac 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "main": "index.js", "directories": { "src": "src", - "lib": "lib", "test": "test", "doc": "doc" }, "scripts": { + "prepublish": "make jodid25519.js", "test": "make test test-shared", "test-full": "make test-full", "test-timing": "make test-timing",