diff --git a/.gitignore b/.gitignore index e69de29..7eece86 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/formatio-1.1.2.tgz diff --git a/nodejs-formatio.spec b/nodejs-formatio.spec new file mode 100644 index 0000000..87f1779 --- /dev/null +++ b/nodejs-formatio.spec @@ -0,0 +1,61 @@ +# test dependency not yet in Fedora +%global enable_tests 0 +%global srcname formatio + +Name: nodejs-%{srcname} +Version: 1.1.2 +Release: 1%{?dist} +Summary: Human-readable object formatting +License: BSD +URL: https://github.com/busterjs/formatio +Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: npm(buster) +%endif + +%description +Pretty formatting of arbitrary JavaScript values. Currently only supports +ascii formatting, suitable for command-line utilities. Like JSON.stringify, it +formats objects recursively, but unlike JSON.stringify, it can handle regular +expressions, functions, circular objects and more. + +formatio is a general-purpose library. It works in browsers (including old and +rowdy ones, like IE6) and Node. It will define itself as an AMD module if you +want it to (i.e. if there's a define function available). + +%prep +%setup -q -n package + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} +cp -pr package.json lib/ \ + %{buildroot}%{nodejs_sitelib}/%{srcname} +%nodejs_symlink_deps + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +%{__nodejs} node_modules/buster/bin/buster-test --node +%endif + +%files +%doc AUTHORS Readme.md +%license LICENSE +%{nodejs_sitelib}/%{srcname} + + +%changelog +* Fri Jan 02 2015 Piotr Popieluch - 1.1.2-1 +- updated to latest upstream + +* Tue Nov 18 2014 Piotr Popieluch - 1.1.1-1 +- Initial package diff --git a/sources b/sources index e69de29..8f0ed26 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +28285c937b41414f5a2a3206f99cb04f formatio-1.1.2.tgz