Browse Source

Let `npm pack` create the assets tarball for us

That way the tarball we upload to Github is the same as the one that we
get from installing Converse via NPM.

CC @ChaosKid42

To create the tarball containing the assets, just run `npm pack`.
This is the same tarball that gets uploaded to https://npmjs.org
JC Brand 6 years ago
parent
commit
476069ec50
2 changed files with 6 additions and 20 deletions
  1. 1 16
      Makefile
  2. 5 4
      package.json

+ 1 - 16
Makefile

@@ -99,22 +99,7 @@ release:
 	make po
 	make po
 	make po2json
 	make po2json
 	make build
 	make build
-	mkdir -p 'converse-assets-$(VERSION)'
-	$(INSTALL) -D dist/converse.js 'converse-assets-$(VERSION)/converse.js'
-	$(INSTALL) -D dist/converse.min.js 'converse-assets-$(VERSION)/converse.min.js'
-	$(INSTALL) -D dist/converse.min.js.map 'converse-assets-$(VERSION)/converse.min.js.map'
-	$(INSTALL) -D dist/converse-headless.js 'converse-assets-$(VERSION)/converse-headless.js'
-	$(INSTALL) -D dist/converse-headless.min.js 'converse-assets-$(VERSION)/converse-headless.min.js'
-	$(INSTALL) -D dist/converse-headless.min.js.map 'converse-assets-$(VERSION)/converse-headless.min.js.map'
-	$(INSTALL) -D dist/converse.css 'converse-assets-$(VERSION)/dist/converse.css'
-	$(INSTALL) -D dist/converse.min.css 'converse-assets-$(VERSION)/dist/converse.min.css'
-	cp -r dist/webfonts 'converse-assets-$(VERSION)/dist/'
-	cp -r sounds 'converse-assets-$(VERSION)/'
-	find locale -type f -name '*.json' \
-		-exec $(INSTALL) -D '{}' 'converse-assets-$(VERSION)/{}' \;
-	zip -r 'converse-assets-$(VERSION).zip' 'converse-assets-$(VERSION)'
-	rm -rf 'converse-assets-$(VERSION)'
-
+	npm run pack
 
 
 ########################################################################
 ########################################################################
 ## Install dependencies
 ## Install dependencies

+ 5 - 4
package.json

@@ -4,11 +4,12 @@
   "description": "Browser based XMPP chat client",
   "description": "Browser based XMPP chat client",
   "main": "dist/converse.min.js",
   "main": "dist/converse.min.js",
   "files": [
   "files": [
-    "dist/",
-    "locale/",
-    "src/",
     "CHANGES.md",
     "CHANGES.md",
-    "README.md"
+    "README.md",
+    "dist/",
+    "locale/**/*.json",
+    "sounds/",
+    "src/"
   ],
   ],
   "scripts": {
   "scripts": {
     "converse.css": "webpack --type=css --mode=development && rm -r tmp",
     "converse.css": "webpack --type=css --mode=development && rm -r tmp",