[nodejs-es5-shim] Initial import (#1141877)

Ralph Bean ralph at fedoraproject.org
Wed Sep 17 13:41:33 UTC 2014


commit a54476be61445c71c7c014c3ade136efd5d99f6c
Author: Ralph Bean <rbean at redhat.com>
Date:   Wed Sep 17 09:41:27 2014 -0400

    Initial import (#1141877)

 .gitignore           |    1 +
 nodejs-es5-shim.spec |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    1 +
 3 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3062662 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/es5-shim-4.0.3.tgz
diff --git a/nodejs-es5-shim.spec b/nodejs-es5-shim.spec
new file mode 100644
index 0000000..11032ee
--- /dev/null
+++ b/nodejs-es5-shim.spec
@@ -0,0 +1,82 @@
+# This macro is needed at the start for building on EL6
+%{?nodejs_find_provides_and_requires}
+
+%global enable_tests 0
+
+%global barename es5-shim
+
+Name:               nodejs-es5-shim
+Version:            4.0.3
+Release:            2%{?dist}
+Summary:            ECMAScript 5 compatibility shims for legacy JavaScript engines
+
+Group:              Development/Libraries
+License:            MIT
+URL:                https://www.npmjs.org/package/es5-shim
+Source0:            http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
+BuildArch:          noarch
+%if 0%{?fedora} >= 19
+ExclusiveArch:      %{nodejs_arches} noarch
+%else
+ExclusiveArch:      %{ix86} x86_64 %{arm} noarch
+%endif
+
+BuildRequires:      nodejs-packaging >= 6
+BuildRequires:      npm
+BuildRequires:      npm(uglify-js)
+
+%if 0%{?enable_tests}
+BuildRequires:      npm(jscs)
+BuildRequires:      npm(jasmine-node)
+%endif
+
+%description
+es5-shim.js and es5-shim.min.js monkey-patch a JavaScript context to contain
+all EcmaScript 5 methods that can be faithfully emulated with a legacy
+JavaScript engine.
+
+es5-sham.js and es5-sham.min.js monkey-patch other ES5 methods as closely as
+possible. For these methods, as closely as possible to ES5 is not very close.
+Many of these shams are intended only to allow code to be written to ES5
+without causing run-time errors in older engines. In many cases, this means
+that these shams cause many ES5 methods to silently fail. Decide carefully
+whether this is what you want. Note: es5-sham.js requires es5-shim.js to be
+able to work properly.
+
+%prep
+%setup -q -n package
+
+# Remove bundled node_modules if there are any..
+rm -rf node_modules/
+
+%nodejs_fixdep --caret
+
+%build
+%nodejs_symlink_deps --build
+
+npm run minify
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/es5-shim
+cp -pr package.json es5-shim.js es5-sham.min.js es5-sham.js es5-shim.min.js \
+    %{buildroot}%{nodejs_sitelib}/es5-shim
+
+%nodejs_symlink_deps
+
+%check
+%if 0%{?enable_tests}
+%nodejs_symlink_deps --check
+npm run lint && jasmine-node --matchall ./ tests/spec/
+%endif
+
+%files
+%doc LICENSE README.md
+%{nodejs_sitelib}/es5-shim/
+
+%changelog
+* Mon Sep 15 2014 Ralph Bean <rbean at redhat.com> - 4.0.3-2
+- Run minify/uglify step in the build section as per review request.
+- Added BR on uglify-js.
+
+* Mon Sep 15 2014 Ralph Bean <rbean at redhat.com> - 4.0.3-1
+- Initial packaging for Fedora.
diff --git a/sources b/sources
index e69de29..7efece7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c25b313284b80ac11f81bf87e89bafe7  es5-shim-4.0.3.tgz


More information about the scm-commits mailing list