[Pkg-javascript-commits] [node-loose-envify] 02/02: improve description and provide manpage

Paolo Greppi paolog-guest at moszumanska.debian.org
Mon Dec 5 09:37:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

paolog-guest pushed a commit to branch master
in repository node-loose-envify.

commit 7809354ba530f4324d1790e3bbfd42fdb2d8d288
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Mon Dec 5 09:21:01 2016 +0000

    improve description and provide manpage
---
 debian/changelog                  |  4 +++-
 debian/control                    |  9 ++++++---
 debian/loose-envify.md            | 40 +++++++++++++++++++++++++++++++++++++++
 debian/node-loose-envify.manpages |  1 +
 debian/rules                      |  8 +++++++-
 5 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 44093e2..2e050ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 node-loose-envify (1.3.0-1) unstable; urgency=low
 
   * Initial release (Closes: #846206)
+  * Patch out a test case missing sources.
+  * Provide manpage.
 
- -- Paolo Greppi <paolo.greppi at libpf.com>  Fri, 02 Dec 2016 23:58:35 +0000
+ -- Paolo Greppi <paolo.greppi at libpf.com>  Mon, 05 Dec 2016 09:21:05 +0000
diff --git a/debian/control b/debian/control
index a8fddce..e907d75 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Paolo Greppi <paolo.greppi at libpf.com>
 Build-Depends:
  debhelper (>= 9)
  , dh-buildinfo
+ , node-marked-man
  , nodejs
 Standards-Version: 3.9.8
 Homepage: https://github.com/zertosh/loose-envify
@@ -18,8 +19,10 @@ Depends:
  ${misc:Depends}
  , nodejs
  , node-js-tokens (>= 2.0.0)
-Description: Replace node.js environment variables
- Node.js module to efficiently replace process.env environment
- variables with plain strings.
+Description: Replace Node.js environment variables with plain strings
+ Performs a Javascript source-to-source transformation (transpiling),
+ that efficiently replaces process.env environment variables with plain
+ strings. This makes the environment variable checks faster and easier to
+ optimize out.
  .
  Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/loose-envify.md b/debian/loose-envify.md
new file mode 100644
index 0000000..267cbf9
--- /dev/null
+++ b/debian/loose-envify.md
@@ -0,0 +1,40 @@
+# loose-envify - replace Node.js environment variables with plain strings
+
+## SYNOPSIS
+loose-envify <javascript_source_file.js>
+
+## DESCRIPTION
+Performs a Javascript source-to-source transformation (transpiling), that efficiently replaces Node.js process.env environment variables with plain strings. This makes the environment variable checks faster and easier to optimize out.
+
+## EXAMPLES
+Running this source code:
+```
+if (process.env.NODE_ENV === "development") {
+  console.log('development only')
+}
+```
+through loose-envify:
+```
+loose-envify index.js > bundle.js
+```
+with NODE_ENV set to production results in:
+```
+if ("production" === "development") {
+  console.log('development only')
+}
+```
+which, when run through a minifier, would be stripped out completely.
+
+However, if you run the same script through loose-envify with NODE_ENV set to development it gives:
+```
+if ("development" === "development") {
+  console.log('development only')
+}
+```
+The if statement will evaluate to true, so the code won't be removed.
+
+## AUTHOR
+Andres Suarez https://github.com/zertosh
+
+## COPYRIGHT
+Manpage Copyright (c) 2016 Paolo Greppi
diff --git a/debian/node-loose-envify.manpages b/debian/node-loose-envify.manpages
new file mode 100644
index 0000000..8303d1a
--- /dev/null
+++ b/debian/node-loose-envify.manpages
@@ -0,0 +1 @@
+debian/loose-envify.1
diff --git a/debian/rules b/debian/rules
index 316bfa8..a939081 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,13 @@
 %:
 	dh $@
 
-#override_dh_auto_build:
+override_dh_auto_build:
+	marked-man --version v1.3.0 --section 1 --manual 'Man Utilities' debian/loose-envify.md > debian/loose-envify.1
+	dh_auto_build
+
+override_dh_clean:
+	dh_clean
+	rm -f debian/loose-envify.1
 
 #override_dh_auto_test:
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-loose-envify.git



More information about the Pkg-javascript-commits mailing list